[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <D7UPRQW1B51Y.1GI2GOM7XBJOA@bootlin.com>
Date: Mon, 17 Feb 2025 13:19:19 +0100
From: "Mathieu Dubois-Briand" <mathieu.dubois-briand@...tlin.com>
To: "Sander Vanheule" <sander@...nheule.net>, "Lee Jones" <lee@...nel.org>,
"Rob Herring" <robh@...nel.org>, "Krzysztof Kozlowski"
<krzk+dt@...nel.org>, "Conor Dooley" <conor+dt@...nel.org>, "Kamel Bouhara"
<kamel.bouhara@...tlin.com>, "Linus Walleij" <linus.walleij@...aro.org>,
"Bartosz Golaszewski" <brgl@...ev.pl>, "Dmitry Torokhov"
<dmitry.torokhov@...il.com>, Uwe Kleine-König
<ukleinek@...nel.org>, "Michael Walle" <mwalle@...nel.org>, "Mark Brown"
<broonie@...nel.org>, "Greg Kroah-Hartman" <gregkh@...uxfoundation.org>,
"Rafael J. Wysocki" <rafael@...nel.org>, "Danilo Krummrich"
<dakr@...nel.org>
Cc: <devicetree@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
<linux-gpio@...r.kernel.org>, <linux-input@...r.kernel.org>,
<linux-pwm@...r.kernel.org>, <andriy.shevchenko@...el.com>,
Grégory Clement <gregory.clement@...tlin.com>, "Thomas
Petazzoni" <thomas.petazzoni@...tlin.com>
Subject: Re: [PATCH v4 04/10] gpio: regmap: Allow to provide request and
free callbacks
On Sun Feb 16, 2025 at 2:17 PM CET, Sander Vanheule wrote:
> Hi Mathieu,
>
> On Fri, 2025-02-14 at 12:49 +0100, Mathieu Dubois-Briand wrote:
> > Allows to populate the gpio_regmap_config structure with request() and
> > free() callbacks to set on the final gpio_chip structure.
> >
> > Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@...tlin.com>
> > ---
> > drivers/gpio/gpio-regmap.c | 2 ++
> > include/linux/gpio/regmap.h | 7 +++++++
> > 2 files changed, 9 insertions(+)
> >
> > diff --git a/drivers/gpio/gpio-regmap.c b/drivers/gpio/gpio-regmap.c
> > index 05f8781b5204..ba72c23bcf97 100644
> > --- a/drivers/gpio/gpio-regmap.c
> > +++ b/drivers/gpio/gpio-regmap.c
> > @@ -261,6 +261,8 @@ struct gpio_regmap *gpio_regmap_register(const struct
> > gpio_regmap_config *config
> > chip->names = config->names;
> > chip->label = config->label ?: dev_name(config->parent);
> > chip->can_sleep = regmap_might_sleep(config->regmap);
> > + chip->request = config->request;
> > + chip->free = config->free;
> >
> > chip->request = gpiochip_generic_request;
> > chip->free = gpiochip_generic_free;
>
> You probably have a bad rebase here, as the chip->{request,free} functions are immediately
> overwritten by gpiochip_generic_{request,free}. Perhaps those can actually be used if you
> provide a pinctrl driver for the MFD.
>
Thanks, indeed I missed this rebase issue. It's fixed now.
--
Mathieu Dubois-Briand, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
Powered by blists - more mailing lists