[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <D7S874FN28TV.3EJHJXB60GQ76@bootlin.com>
Date: Fri, 14 Feb 2025 15:07:44 +0100
From: "Mathieu Dubois-Briand" <mathieu.dubois-briand@...tlin.com>
To: "Andy Shevchenko" <andriy.shevchenko@...ux.intel.com>
Cc: "Bartosz Golaszewski" <bartosz.golaszewski@...aro.org>,
<linux-gpio@...r.kernel.org>, <linux-kernel@...r.kernel.org>, "Michael
Walle" <mwalle@...nel.org>, "Linus Walleij" <linus.walleij@...aro.org>,
"Bartosz Golaszewski" <brgl@...ev.pl>
Subject: Re: [PATCH v1 0/5] gpio: regmap: Make use of 'ngpios' property
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@...tlin.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@...tlin.com>
Reviewed-by: Mathieu Dubois-Briand <mathieu.dubois-briand@...tlin.com>
--
Mathieu Dubois-Briand, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
Powered by blists - more mailing lists