From: yegorslists@googlemail.com
To: barebox@lists.infradead.org
Subject: [PATCH 2/2] ARM: baltos: use GPIO name for mPCIe power enable pin
Date: Wed, 3 Aug 2022 11:31:10 +0200 [thread overview]
Message-ID: <20220803093110.20915-2-yegorslists@googlemail.com> (raw)
In-Reply-To: <20220803093110.20915-1-yegorslists@googlemail.com>
From: Yegor Yefremov <yegorslists@googlemail.com>
Switch to gpio_find_by_name() method to get the required input line.
Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
---
arch/arm/boards/vscom-baltos/board.c | 4 +++-
arch/arm/dts/am335x-baltos-minimal.dts | 2 +-
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/arch/arm/boards/vscom-baltos/board.c b/arch/arm/boards/vscom-baltos/board.c
index 30553d1838..b9ce356264 100644
--- a/arch/arm/boards/vscom-baltos/board.c
+++ b/arch/arm/boards/vscom-baltos/board.c
@@ -98,6 +98,7 @@ static int baltos_read_eeprom(void)
int rc;
unsigned char mac_addr[6];
uint8_t dip;
+ int mpcie_pwr_pin;
if (!of_machine_is_compatible("vscom,onrisc"))
return 0;
@@ -145,7 +146,8 @@ static int baltos_read_eeprom(void)
globalvar_add_simple("board.id", var_buf);
/* enable mPCIe slot */
- gpio_direction_output(100, 1);
+ mpcie_pwr_pin = gpio_find_by_name("3G_PWR_EN");
+ gpio_direction_output(mpcie_pwr_pin, 1);
/* configure output signals of the external GPIO controller */
if (hw_param.SystemId == 210 || hw_param.SystemId == 211) {
diff --git a/arch/arm/dts/am335x-baltos-minimal.dts b/arch/arm/dts/am335x-baltos-minimal.dts
index e9d57696d1..28a550aa84 100644
--- a/arch/arm/dts/am335x-baltos-minimal.dts
+++ b/arch/arm/dts/am335x-baltos-minimal.dts
@@ -540,7 +540,7 @@
"NC",
"NC",
"NC",
- "NC",
+ "3G_PWR_EN",
"NC",
"NC",
"NC",
--
2.17.0
next prev parent reply other threads:[~2022-08-03 9:33 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-03 9:31 [PATCH 1/2] ARM: baltos: use GPIO names for DIP switches yegorslists
2022-08-03 9:31 ` yegorslists [this message]
2022-08-08 13:08 ` Sascha Hauer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220803093110.20915-2-yegorslists@googlemail.com \
--to=yegorslists@googlemail.com \
--cc=barebox@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox