mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: Barebox List <barebox@lists.infradead.org>
Subject: [PATCH] gpio-vf610: always register 32 GPIOs
Date: Mon,  5 Feb 2024 12:16:27 +0100	[thread overview]
Message-ID: <20240205111627.2397633-1-s.hauer@pengutronix.de> (raw)

The gpio-vf610 driver used to parse the number of GPIOs to register from
the gpio-ranges property. This was ok to do when the gpio-ranges
property only contained a single entry like on the vf610. On i.MX93 we
have multiple entries though, so the first entry doesn't contain the
full number of GPIOs the device supports. We would have to parse all
entries instead. That doesn't give us any gain though, we can equally
well just register the maximum of 32 GPIOs and just have a few GPIOs
registered that are not pinmuxed to the outside.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
 drivers/gpio/gpio-vf610.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpio/gpio-vf610.c b/drivers/gpio/gpio-vf610.c
index 510ee74333..7c535c2e5e 100644
--- a/drivers/gpio/gpio-vf610.c
+++ b/drivers/gpio/gpio-vf610.c
@@ -177,7 +177,7 @@ static int vf610_gpio_probe(struct device *dev)
 	port->need_pinctrl = devtype->need_pinctrl;
 
 	port->pinctrl_base = be32_to_cpu(gpio_ranges[PINCTRL_BASE]);
-	port->chip.ngpio   = be32_to_cpu(gpio_ranges[COUNT]);
+	port->chip.ngpio   = 32;
 
 	/*
 	 * Some old bindings have two register ranges. When we have two ranges
-- 
2.39.2




             reply	other threads:[~2024-02-05 11:17 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-05 11:16 Sascha Hauer [this message]
2024-02-08  7:41 ` 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=20240205111627.2397633-1-s.hauer@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --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