From: "Pali Rohár" <pali@kernel.org>
To: Stefan Roese <sr@denx.de>
Cc: Marek Behun <marek.behun@nic.cz>, Simon Glass <sjg@chromium.org>,
u-boot@lists.denx.de
Subject: [PATCH 6/8] gpio: mvebu_gpio: Read number of gpios from DT
Date: Mon, 25 Jul 2022 13:56:13 +0200 [thread overview]
Message-ID: <20220725115615.420-7-pali@kernel.org> (raw)
In-Reply-To: <20220725115615.420-1-pali@kernel.org>
Device tree property "ngpios" contains number of gpios.
Use it when available.
Signed-off-by: Pali Rohár <pali@kernel.org>
---
drivers/gpio/mvebu_gpio.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpio/mvebu_gpio.c b/drivers/gpio/mvebu_gpio.c
index 888ccfe4d13e..55ed685f70f8 100644
--- a/drivers/gpio/mvebu_gpio.c
+++ b/drivers/gpio/mvebu_gpio.c
@@ -92,7 +92,7 @@ static int mvebu_gpio_probe(struct udevice *dev)
struct mvebu_gpio_priv *priv = dev_get_priv(dev);
priv->regs = dev_read_addr_ptr(dev);
- uc_priv->gpio_count = MVEBU_GPIOS_PER_BANK;
+ uc_priv->gpio_count = dev_read_u32_default(dev, "ngpios", MVEBU_GPIOS_PER_BANK);
priv->name[0] = 'A' + dev_seq(dev);
uc_priv->bank_name = priv->name;
--
2.20.1
next prev parent reply other threads:[~2022-07-25 11:58 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-25 11:56 [PATCH 0/8] arm: mvebu: Add Armada 38x pin muxing support Pali Rohár
2022-07-25 11:56 ` [PATCH 1/8] pinctrl: Add new function pinctrl_generic_set_state_prefix() Pali Rohár
2022-07-28 6:25 ` Stefan Roese
2022-07-25 11:56 ` [PATCH 2/8] mvebu: pinctrl: Add Armada 38x driver Pali Rohár
2022-07-28 6:27 ` Stefan Roese
2022-07-25 11:56 ` [PATCH 3/8] arm: mvebu: Add gpio-ranges into Armada 38x device tree file Pali Rohár
2022-07-28 6:27 ` Stefan Roese
2022-07-25 11:56 ` [PATCH 4/8] pinctrl: Add third argument label for pinctrl_gpio_request() function Pali Rohár
2022-07-28 6:27 ` Stefan Roese
2022-07-28 13:07 ` Stefan Roese
2022-07-28 13:15 ` Pali Rohár
2022-07-28 13:18 ` Stefan Roese
2022-07-28 15:33 ` Pali Rohár
2022-07-25 11:56 ` [PATCH 5/8] gpio: mvebu_gpio: Add .request and .rfree methods for Armada 38x Pali Rohár
2022-07-28 6:28 ` Stefan Roese
2022-07-25 11:56 ` Pali Rohár [this message]
2022-07-28 6:28 ` [PATCH 6/8] gpio: mvebu_gpio: Read number of gpios from DT Stefan Roese
2022-07-25 11:56 ` [PATCH 7/8] gpio: mvebu_gpio: Set bank name to mvebu%d Pali Rohár
2022-07-28 6:29 ` Stefan Roese
2022-07-25 11:56 ` [PATCH 8/8] arm: mvebu: turris_omnia: Enable a38x pinctrl and gpio support Pali Rohár
2022-07-28 6:29 ` Stefan Roese
2022-07-28 21:42 ` Tony Dinh
2022-07-29 7:38 ` Pali Rohár
2022-07-29 8:01 ` Stefan Roese
2022-07-29 1:39 ` [PATCH 0/8] arm: mvebu: Add Armada 38x pin muxing support Tony Dinh
2022-07-29 12:00 ` Stefan Roese
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=20220725115615.420-7-pali@kernel.org \
--to=pali@kernel.org \
--cc=marek.behun@nic.cz \
--cc=sjg@chromium.org \
--cc=sr@denx.de \
--cc=u-boot@lists.denx.de \
/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