* [PATCH] i2c: mux: ltc4306: use new GPIO line value setter callbacks
@ 2025-04-07 7:17 Bartosz Golaszewski
2025-04-07 8:08 ` Peter Rosin
2025-04-15 8:34 ` Linus Walleij
0 siblings, 2 replies; 7+ messages in thread
From: Bartosz Golaszewski @ 2025-04-07 7:17 UTC (permalink / raw)
To: Michael Hennerich, Peter Rosin, Linus Walleij,
Bartosz Golaszewski
Cc: linux-i2c, linux-kernel, linux-gpio, Bartosz Golaszewski
From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
struct gpio_chip now has callbacks for setting line values that return
an integer, allowing to indicate failures. Convert the driver to using
them.
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
---
Peter: I know you've not been very active recently. If you prefer to
just Ack it and let me take it through the GPIO tree, please do.
---
drivers/i2c/muxes/i2c-mux-ltc4306.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/i2c/muxes/i2c-mux-ltc4306.c b/drivers/i2c/muxes/i2c-mux-ltc4306.c
index 8a87f19bf5d5..c688af270a11 100644
--- a/drivers/i2c/muxes/i2c-mux-ltc4306.c
+++ b/drivers/i2c/muxes/i2c-mux-ltc4306.c
@@ -85,13 +85,13 @@ static int ltc4306_gpio_get(struct gpio_chip *chip, unsigned int offset)
return !!(val & BIT(1 - offset));
}
-static void ltc4306_gpio_set(struct gpio_chip *chip, unsigned int offset,
- int value)
+static int ltc4306_gpio_set(struct gpio_chip *chip, unsigned int offset,
+ int value)
{
struct ltc4306 *data = gpiochip_get_data(chip);
- regmap_update_bits(data->regmap, LTC_REG_CONFIG, BIT(5 - offset),
- value ? BIT(5 - offset) : 0);
+ return regmap_update_bits(data->regmap, LTC_REG_CONFIG,
+ BIT(5 - offset), value ? BIT(5 - offset) : 0);
}
static int ltc4306_gpio_get_direction(struct gpio_chip *chip,
@@ -164,7 +164,7 @@ static int ltc4306_gpio_init(struct ltc4306 *data)
data->gpiochip.direction_input = ltc4306_gpio_direction_input;
data->gpiochip.direction_output = ltc4306_gpio_direction_output;
data->gpiochip.get = ltc4306_gpio_get;
- data->gpiochip.set = ltc4306_gpio_set;
+ data->gpiochip.set_rv = ltc4306_gpio_set;
data->gpiochip.set_config = ltc4306_gpio_set_config;
data->gpiochip.owner = THIS_MODULE;
---
base-commit: 0af2f6be1b4281385b618cb86ad946eded089ac8
change-id: 20250331-gpiochip-set-rv-i2c-mux-a060817c1c04
Best regards,
--
Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
^ permalink raw reply related [flat|nested] 7+ messages in thread* Re: [PATCH] i2c: mux: ltc4306: use new GPIO line value setter callbacks
2025-04-07 7:17 [PATCH] i2c: mux: ltc4306: use new GPIO line value setter callbacks Bartosz Golaszewski
@ 2025-04-07 8:08 ` Peter Rosin
2025-04-24 7:16 ` Bartosz Golaszewski
2025-04-15 8:34 ` Linus Walleij
1 sibling, 1 reply; 7+ messages in thread
From: Peter Rosin @ 2025-04-07 8:08 UTC (permalink / raw)
To: Bartosz Golaszewski, Michael Hennerich, Linus Walleij
Cc: linux-i2c, linux-kernel, linux-gpio, Bartosz Golaszewski
Hi!
2025-04-07 at 09:17, Bartosz Golaszewski wrote:
> From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
>
> struct gpio_chip now has callbacks for setting line values that return
> an integer, allowing to indicate failures. Convert the driver to using
> them.
>
> Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
> ---
> Peter: I know you've not been very active recently. If you prefer to
> just Ack it and let me take it through the GPIO tree, please do.
What normally happens is that I just Ack trivial things like this, and
then either Wolfram or Andi picks it. The risk of future conflicts in
this area (and cycle) should be low, so I don't think it really matters
if you pick it, but Wolfram/Andi should have first dibs, since it makes
for slightly neater PRs during the merge window.
Acked-by: Peter Rosin <peda@axentia.se>
Cheers,
Peter
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] i2c: mux: ltc4306: use new GPIO line value setter callbacks
2025-04-07 8:08 ` Peter Rosin
@ 2025-04-24 7:16 ` Bartosz Golaszewski
2025-04-24 8:10 ` Wolfram Sang
2025-04-24 8:27 ` Wolfram Sang
0 siblings, 2 replies; 7+ messages in thread
From: Bartosz Golaszewski @ 2025-04-24 7:16 UTC (permalink / raw)
To: Peter Rosin, Wolfram Sang, Andi Shyti
Cc: Michael Hennerich, Linus Walleij, linux-i2c, linux-kernel,
linux-gpio, Bartosz Golaszewski
On Mon, Apr 7, 2025 at 10:08 AM Peter Rosin <peda@axentia.se> wrote:
>
> Hi!
>
> 2025-04-07 at 09:17, Bartosz Golaszewski wrote:
> > From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
> >
> > struct gpio_chip now has callbacks for setting line values that return
> > an integer, allowing to indicate failures. Convert the driver to using
> > them.
> >
> > Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
> > ---
> > Peter: I know you've not been very active recently. If you prefer to
> > just Ack it and let me take it through the GPIO tree, please do.
>
> What normally happens is that I just Ack trivial things like this, and
> then either Wolfram or Andi picks it. The risk of future conflicts in
> this area (and cycle) should be low, so I don't think it really matters
> if you pick it, but Wolfram/Andi should have first dibs, since it makes
> for slightly neater PRs during the merge window.
>
> Acked-by: Peter Rosin <peda@axentia.se>
>
I just realized their emails didn't pop up in b4 --auto-to-cc. Cc'ed
now. Wolfram, Andi: do you want to pick it up or should I take it via
the GPIO tree?
Bartosz
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] i2c: mux: ltc4306: use new GPIO line value setter callbacks
2025-04-24 7:16 ` Bartosz Golaszewski
@ 2025-04-24 8:10 ` Wolfram Sang
2025-04-24 8:11 ` Bartosz Golaszewski
2025-04-24 8:27 ` Wolfram Sang
1 sibling, 1 reply; 7+ messages in thread
From: Wolfram Sang @ 2025-04-24 8:10 UTC (permalink / raw)
To: Bartosz Golaszewski
Cc: Peter Rosin, Andi Shyti, Michael Hennerich, Linus Walleij,
linux-i2c, linux-kernel, linux-gpio, Bartosz Golaszewski
[-- Attachment #1: Type: text/plain, Size: 236 bytes --]
> I just realized their emails didn't pop up in b4 --auto-to-cc. Cc'ed
> now. Wolfram, Andi: do you want to pick it up or should I take it via
> the GPIO tree?
If there is no dependency in your tree, then I prefer to pick it myself.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] i2c: mux: ltc4306: use new GPIO line value setter callbacks
2025-04-24 8:10 ` Wolfram Sang
@ 2025-04-24 8:11 ` Bartosz Golaszewski
0 siblings, 0 replies; 7+ messages in thread
From: Bartosz Golaszewski @ 2025-04-24 8:11 UTC (permalink / raw)
To: Wolfram Sang, Bartosz Golaszewski, Peter Rosin, Andi Shyti,
Michael Hennerich, Linus Walleij, linux-i2c, linux-kernel,
linux-gpio, Bartosz Golaszewski
On Thu, Apr 24, 2025 at 10:10 AM Wolfram Sang <wsa@the-dreams.de> wrote:
>
>
> > I just realized their emails didn't pop up in b4 --auto-to-cc. Cc'ed
> > now. Wolfram, Andi: do you want to pick it up or should I take it via
> > the GPIO tree?
>
> If there is no dependency in your tree, then I prefer to pick it myself.
>
No, everything's upstream.
Bartosz
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] i2c: mux: ltc4306: use new GPIO line value setter callbacks
2025-04-24 7:16 ` Bartosz Golaszewski
2025-04-24 8:10 ` Wolfram Sang
@ 2025-04-24 8:27 ` Wolfram Sang
1 sibling, 0 replies; 7+ messages in thread
From: Wolfram Sang @ 2025-04-24 8:27 UTC (permalink / raw)
To: Bartosz Golaszewski
Cc: Peter Rosin, Andi Shyti, Michael Hennerich, Linus Walleij,
linux-i2c, linux-kernel, linux-gpio, Bartosz Golaszewski
[-- Attachment #1: Type: text/plain, Size: 574 bytes --]
On Thu, Apr 24, 2025 at 09:16:48AM +0200, Bartosz Golaszewski wrote:
> On Mon, Apr 7, 2025 at 10:08 AM Peter Rosin <peda@axentia.se> wrote:
> >
> > Hi!
> >
> > 2025-04-07 at 09:17, Bartosz Golaszewski wrote:
> > > From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
> > >
> > > struct gpio_chip now has callbacks for setting line values that return
> > > an integer, allowing to indicate failures. Convert the driver to using
> > > them.
> > >
> > > Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Applied to for-next, thanks!
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] i2c: mux: ltc4306: use new GPIO line value setter callbacks
2025-04-07 7:17 [PATCH] i2c: mux: ltc4306: use new GPIO line value setter callbacks Bartosz Golaszewski
2025-04-07 8:08 ` Peter Rosin
@ 2025-04-15 8:34 ` Linus Walleij
1 sibling, 0 replies; 7+ messages in thread
From: Linus Walleij @ 2025-04-15 8:34 UTC (permalink / raw)
To: Bartosz Golaszewski
Cc: Michael Hennerich, Peter Rosin, linux-i2c, linux-kernel,
linux-gpio, Bartosz Golaszewski
On Mon, Apr 7, 2025 at 9:17 AM Bartosz Golaszewski <brgl@bgdev.pl> wrote:
> From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
>
> struct gpio_chip now has callbacks for setting line values that return
> an integer, allowing to indicate failures. Convert the driver to using
> them.
>
> Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2025-04-24 8:27 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-07 7:17 [PATCH] i2c: mux: ltc4306: use new GPIO line value setter callbacks Bartosz Golaszewski
2025-04-07 8:08 ` Peter Rosin
2025-04-24 7:16 ` Bartosz Golaszewski
2025-04-24 8:10 ` Wolfram Sang
2025-04-24 8:11 ` Bartosz Golaszewski
2025-04-24 8:27 ` Wolfram Sang
2025-04-15 8:34 ` Linus Walleij
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox