From: "Mathieu Dubois-Briand" <mathieu.dubois-briand@bootlin.com>
To: "Andy Shevchenko" <andriy.shevchenko@linux.intel.com>
Cc: "Bartosz Golaszewski" <bartosz.golaszewski@linaro.org>,
<linux-gpio@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
"Michael Walle" <mwalle@kernel.org>,
"Linus Walleij" <linus.walleij@linaro.org>,
"Bartosz Golaszewski" <brgl@bgdev.pl>
Subject: Re: [PATCH v1 0/5] gpio: regmap: Make use of 'ngpios' property
Date: Fri, 14 Feb 2025 15:07:44 +0100 [thread overview]
Message-ID: <D7S874FN28TV.3EJHJXB60GQ76@bootlin.com> (raw)
In-Reply-To: <Z69KBATz7I80r0sl@smile.fi.intel.com>
On Fri Feb 14, 2025 at 2:49 PM CET, Andy Shevchenko wrote:
> On Fri, Feb 14, 2025 at 10:18:29AM +0100, Mathieu Dubois-Briand wrote:
> > On Thu Feb 13, 2025 at 8:48 PM CET, Andy Shevchenko wrote:
> > > It appears that regmap GPIO doesn't take into account 'ngpios' property
> > > and requires hard coded values or duplication of the parsing the same
> > > outside of GPIO library. This miniseries addresses that.
> > >
> > > For the record, I have checked all bgpio_init() users and haven't seen
> > > the suspicious code that this series might break, e.g., an equivalent of
> > > something like this:
> > >
> > > static int foo_probe(struct device *dev)
> > > {
> > > struct gpio_chip *gc = devm_kzalloc(...);
> > > struct fwnode_handle *fwnode = ...; // NOT dev_fwnode(dev)!
> > >
> > > ...
> > > gc->parent = dev;
> > > gc->fwnode = fwnode;
> > >
> > > ret = bgpio_init(gc, dev, ...);
> > > ...
> > > }
> > >
> > > Reported-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
>
> ...
>
> > Thanks, I confirm I tested this series and it does fix my case: I can
> > leave the ngpio field uninitialized and its value will be correctly
> > retrieved from the "ngpios" property.
> >
> > Also the whole series looks good to me.
>
> Thank you! Can you give a formal tag(s)?
Sure!
Tested-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Reviewed-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
--
Mathieu Dubois-Briand, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
next prev parent reply other threads:[~2025-02-14 14:07 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-13 19:48 Andy Shevchenko
2025-02-13 19:48 ` [PATCH v1 1/5] gpiolib: Extract gpiochip_choose_fwnode() for wider use Andy Shevchenko
2025-02-13 19:48 ` [PATCH v1 2/5] gpiolib: Use fwnode instead of device in gpiochip_get_ngpios() Andy Shevchenko
2025-02-13 19:48 ` [PATCH v1 3/5] gpio: regmap: Group optional assignments together for better understanding Andy Shevchenko
2025-02-17 7:40 ` Michael Walle
2025-02-13 19:48 ` [PATCH v1 4/5] gpio: regmap: Move optional assignments down in the code Andy Shevchenko
2025-02-17 7:43 ` Michael Walle
2025-02-13 19:48 ` [PATCH v1 5/5] gpio: regmap: Allow ngpio to be read from the property Andy Shevchenko
2025-02-17 7:44 ` Michael Walle
2025-02-14 9:18 ` [PATCH v1 0/5] gpio: regmap: Make use of 'ngpios' property Mathieu Dubois-Briand
2025-02-14 13:49 ` Andy Shevchenko
2025-02-14 14:07 ` Mathieu Dubois-Briand [this message]
2025-02-14 10:50 ` Linus Walleij
2025-02-20 13:18 ` Andy Shevchenko
2025-02-20 13:22 ` Bartosz Golaszewski
2025-02-20 13:40 ` Andy Shevchenko
2025-02-20 13:41 ` Andy Shevchenko
2025-02-20 13:42 ` Bartosz Golaszewski
2025-02-20 14:07 ` Andy Shevchenko
2025-02-20 14:11 ` Bartosz Golaszewski
2025-02-20 14:15 ` Andy Shevchenko
2025-02-21 8:45 ` Bartosz Golaszewski
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=D7S874FN28TV.3EJHJXB60GQ76@bootlin.com \
--to=mathieu.dubois-briand@bootlin.com \
--cc=andriy.shevchenko@linux.intel.com \
--cc=bartosz.golaszewski@linaro.org \
--cc=brgl@bgdev.pl \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mwalle@kernel.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
all inboxes | Powered by JetHome®