i2c: mux: ltc4306: use new GPIO line value setter callbacks
PATCH 1/1 i2c: mux: ltc4306: use new GPIO line value setter callbacks
From: Bartosz Golaszewski <[email protected]>
struct gpio_chip now has callbacks for setting line values that return an integer, allowing to indicate failures. Convert the driver to using them.
---
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(-)
drivers/i2c/muxes/i2c-mux-ltc4306.c +5 -5
@@ -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,
Signature · 1 line
Bartosz Golaszewski <[email protected]>
Hi!
Quoted 10 lines · Bartosz Golaszewski
From: Bartosz Golaszewski <[email protected]>
struct
gpio_chipnow 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 <[email protected]>---
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.
Cheers,
Peter
Quoted 15 lines · Peter Rosin
Hi!
Quoted 10 lines · Bartosz Golaszewski
From: Bartosz Golaszewski <[email protected]>
struct
gpio_chipnow 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 <[email protected]>---
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.
Quoted 8 lines
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 <[email protected]>
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
Quoted 4 lines
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.
Quoted 8 lines · Wolfram Sang
Quoted 5 lines
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
Wolfram Sang
AppliedQuoted 4 lines · Bartosz Golaszewski
Quoted 3 lines · Peter Rosin
Hi!
Quoted 8 lines
Quoted 8 lines
Quoted 7 lines · Bartosz Golaszewski
From: Bartosz Golaszewski <[email protected]>
struct
gpio_chipnow 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 <[email protected]>
Applied to for-next, thanks!
Quoted 7 lines · Bartosz Golaszewski
From: Bartosz Golaszewski <[email protected]>
struct
gpio_chipnow 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 <[email protected]>
Yours,
Linus Walleij