linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 00/12] gpio: convert another round of GPIO drivers to using new line value setters
@ 2025-06-10 12:33 Bartosz Golaszewski
  2025-06-10 12:33 ` [PATCH 01/12] gpio: mmio: use new GPIO line value setter callbacks Bartosz Golaszewski
                   ` (12 more replies)
  0 siblings, 13 replies; 25+ messages in thread
From: Bartosz Golaszewski @ 2025-06-10 12:33 UTC (permalink / raw)
  To: Linus Walleij, Bartosz Golaszewski, Marek Behún,
	Conor Dooley, Daire McNamara, Daniel Palmer, Romain Perier,
	Avi Fishman, Tomer Maimon, Tali Perry, Patrick Venture,
	Nancy Yuen, Benjamin Fair, Grygorii Strashko, Santosh Shilimkar,
	Kevin Hilman
  Cc: linux-gpio, linux-kernel, linux-riscv, linux-arm-kernel, openbmc,
	linux-omap, Bartosz Golaszewski

Commit 98ce1eb1fd87e ("gpiolib: introduce gpio_chip setters that return
values") added new line setter callbacks to struct gpio_chip. They allow
to indicate failures to callers. We're in the process of converting all
GPIO controllers to using them before removing the old ones. This series
converts another round of GPIO drivers.

Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
---
Bartosz Golaszewski (12):
      gpio: mmio: use new GPIO line value setter callbacks
      gpio: mm-lantiq: use new GPIO line value setter callbacks
      gpio: moxtet: use new GPIO line value setter callbacks
      gpio: mpc5200: use new GPIO line value setter callbacks
      gpio: mpfs: use new GPIO line value setter callbacks
      gpio: mpsse: use new GPIO line value setter callbacks
      gpio: msc313: use new GPIO line value setter callbacks
      gpio: nomadik: use new GPIO line value setter callbacks
      gpio: npcm-sgpio: use new GPIO line value setter callbacks
      gpio: octeon: use new GPIO line value setter callbacks
      gpio: omap: use new GPIO line value setter callbacks
      gpio: palmas: use new GPIO line value setter callbacks

 drivers/gpio/gpio-mm-lantiq.c  | 12 +++++-----
 drivers/gpio/gpio-mmio.c       | 53 ++++++++++++++++++++++++++----------------
 drivers/gpio/gpio-moxtet.c     | 16 ++++++-------
 drivers/gpio/gpio-mpc5200.c    | 12 ++++++----
 drivers/gpio/gpio-mpfs.c       | 11 +++++----
 drivers/gpio/gpio-mpsse.c      | 22 ++++++++----------
 drivers/gpio/gpio-msc313.c     |  6 +++--
 drivers/gpio/gpio-nomadik.c    |  8 ++++---
 drivers/gpio/gpio-npcm-sgpio.c |  6 +++--
 drivers/gpio/gpio-octeon.c     |  7 ++++--
 drivers/gpio/gpio-omap.c       | 14 +++++++----
 drivers/gpio/gpio-palmas.c     | 15 ++++++------
 12 files changed, 105 insertions(+), 77 deletions(-)
---
base-commit: 19272b37aa4f83ca52bdf9c16d5d81bdd1354494
change-id: 20250527-gpiochip-set-rv-gpio-5071a2dad129

Best regards,
-- 
Bartosz Golaszewski <bartosz.golaszewski@linaro.org>


^ permalink raw reply	[flat|nested] 25+ messages in thread

* [PATCH 01/12] gpio: mmio: use new GPIO line value setter callbacks
  2025-06-10 12:33 [PATCH 00/12] gpio: convert another round of GPIO drivers to using new line value setters Bartosz Golaszewski
@ 2025-06-10 12:33 ` Bartosz Golaszewski
  2025-06-10 21:16   ` Linus Walleij
                     ` (3 more replies)
  2025-06-10 12:33 ` [PATCH 02/12] gpio: mm-lantiq: " Bartosz Golaszewski
                   ` (11 subsequent siblings)
  12 siblings, 4 replies; 25+ messages in thread
From: Bartosz Golaszewski @ 2025-06-10 12:33 UTC (permalink / raw)
  To: Linus Walleij, Bartosz Golaszewski, Marek Behún,
	Conor Dooley, Daire McNamara, Daniel Palmer, Romain Perier,
	Avi Fishman, Tomer Maimon, Tali Perry, Patrick Venture,
	Nancy Yuen, Benjamin Fair, Grygorii Strashko, Santosh Shilimkar,
	Kevin Hilman
  Cc: linux-gpio, linux-kernel, linux-riscv, linux-arm-kernel, openbmc,
	linux-omap, 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>
---
 drivers/gpio/gpio-mmio.c | 53 ++++++++++++++++++++++++++++++------------------
 1 file changed, 33 insertions(+), 20 deletions(-)

diff --git a/drivers/gpio/gpio-mmio.c b/drivers/gpio/gpio-mmio.c
index 4841e4ebe7a67d0f954e9a6f995ec5758f124edd..9169eccadb238efe944d494054b1e009f16eee7f 100644
--- a/drivers/gpio/gpio-mmio.c
+++ b/drivers/gpio/gpio-mmio.c
@@ -211,11 +211,12 @@ static int bgpio_get_multiple_be(struct gpio_chip *gc, unsigned long *mask,
 	return 0;
 }
 
-static void bgpio_set_none(struct gpio_chip *gc, unsigned int gpio, int val)
+static int bgpio_set_none(struct gpio_chip *gc, unsigned int gpio, int val)
 {
+	return 0;
 }
 
-static void bgpio_set(struct gpio_chip *gc, unsigned int gpio, int val)
+static int bgpio_set(struct gpio_chip *gc, unsigned int gpio, int val)
 {
 	unsigned long mask = bgpio_line2mask(gc, gpio);
 	unsigned long flags;
@@ -230,10 +231,12 @@ static void bgpio_set(struct gpio_chip *gc, unsigned int gpio, int val)
 	gc->write_reg(gc->reg_dat, gc->bgpio_data);
 
 	raw_spin_unlock_irqrestore(&gc->bgpio_lock, flags);
+
+	return 0;
 }
 
-static void bgpio_set_with_clear(struct gpio_chip *gc, unsigned int gpio,
-				 int val)
+static int bgpio_set_with_clear(struct gpio_chip *gc, unsigned int gpio,
+				int val)
 {
 	unsigned long mask = bgpio_line2mask(gc, gpio);
 
@@ -241,9 +244,11 @@ static void bgpio_set_with_clear(struct gpio_chip *gc, unsigned int gpio,
 		gc->write_reg(gc->reg_set, mask);
 	else
 		gc->write_reg(gc->reg_clr, mask);
+
+	return 0;
 }
 
-static void bgpio_set_set(struct gpio_chip *gc, unsigned int gpio, int val)
+static int bgpio_set_set(struct gpio_chip *gc, unsigned int gpio, int val)
 {
 	unsigned long mask = bgpio_line2mask(gc, gpio);
 	unsigned long flags;
@@ -258,6 +263,8 @@ static void bgpio_set_set(struct gpio_chip *gc, unsigned int gpio, int val)
 	gc->write_reg(gc->reg_set, gc->bgpio_data);
 
 	raw_spin_unlock_irqrestore(&gc->bgpio_lock, flags);
+
+	return 0;
 }
 
 static void bgpio_multiple_get_masks(struct gpio_chip *gc,
@@ -298,21 +305,25 @@ static void bgpio_set_multiple_single_reg(struct gpio_chip *gc,
 	raw_spin_unlock_irqrestore(&gc->bgpio_lock, flags);
 }
 
-static void bgpio_set_multiple(struct gpio_chip *gc, unsigned long *mask,
+static int bgpio_set_multiple(struct gpio_chip *gc, unsigned long *mask,
 			       unsigned long *bits)
 {
 	bgpio_set_multiple_single_reg(gc, mask, bits, gc->reg_dat);
+
+	return 0;
 }
 
-static void bgpio_set_multiple_set(struct gpio_chip *gc, unsigned long *mask,
-				   unsigned long *bits)
+static int bgpio_set_multiple_set(struct gpio_chip *gc, unsigned long *mask,
+				  unsigned long *bits)
 {
 	bgpio_set_multiple_single_reg(gc, mask, bits, gc->reg_set);
+
+	return 0;
 }
 
-static void bgpio_set_multiple_with_clear(struct gpio_chip *gc,
-					  unsigned long *mask,
-					  unsigned long *bits)
+static int bgpio_set_multiple_with_clear(struct gpio_chip *gc,
+					 unsigned long *mask,
+					 unsigned long *bits)
 {
 	unsigned long set_mask, clear_mask;
 
@@ -322,6 +333,8 @@ static void bgpio_set_multiple_with_clear(struct gpio_chip *gc,
 		gc->write_reg(gc->reg_set, set_mask);
 	if (clear_mask)
 		gc->write_reg(gc->reg_clr, clear_mask);
+
+	return 0;
 }
 
 static int bgpio_dir_return(struct gpio_chip *gc, unsigned int gpio, bool dir_out)
@@ -510,18 +523,18 @@ static int bgpio_setup_io(struct gpio_chip *gc,
 	if (set && clr) {
 		gc->reg_set = set;
 		gc->reg_clr = clr;
-		gc->set = bgpio_set_with_clear;
-		gc->set_multiple = bgpio_set_multiple_with_clear;
+		gc->set_rv = bgpio_set_with_clear;
+		gc->set_multiple_rv = bgpio_set_multiple_with_clear;
 	} else if (set && !clr) {
 		gc->reg_set = set;
-		gc->set = bgpio_set_set;
-		gc->set_multiple = bgpio_set_multiple_set;
+		gc->set_rv = bgpio_set_set;
+		gc->set_multiple_rv = bgpio_set_multiple_set;
 	} else if (flags & BGPIOF_NO_OUTPUT) {
-		gc->set = bgpio_set_none;
-		gc->set_multiple = NULL;
+		gc->set_rv = bgpio_set_none;
+		gc->set_multiple_rv = NULL;
 	} else {
-		gc->set = bgpio_set;
-		gc->set_multiple = bgpio_set_multiple;
+		gc->set_rv = bgpio_set;
+		gc->set_multiple_rv = bgpio_set_multiple;
 	}
 
 	if (!(flags & BGPIOF_UNREADABLE_REG_SET) &&
@@ -654,7 +667,7 @@ int bgpio_init(struct gpio_chip *gc, struct device *dev,
 	}
 
 	gc->bgpio_data = gc->read_reg(gc->reg_dat);
-	if (gc->set == bgpio_set_set &&
+	if (gc->set_rv == bgpio_set_set &&
 			!(flags & BGPIOF_UNREADABLE_REG_SET))
 		gc->bgpio_data = gc->read_reg(gc->reg_set);
 

-- 
2.48.1


^ permalink raw reply related	[flat|nested] 25+ messages in thread

* [PATCH 02/12] gpio: mm-lantiq: use new GPIO line value setter callbacks
  2025-06-10 12:33 [PATCH 00/12] gpio: convert another round of GPIO drivers to using new line value setters Bartosz Golaszewski
  2025-06-10 12:33 ` [PATCH 01/12] gpio: mmio: use new GPIO line value setter callbacks Bartosz Golaszewski
@ 2025-06-10 12:33 ` Bartosz Golaszewski
  2025-06-10 22:01   ` Linus Walleij
  2025-06-10 12:33 ` [PATCH 03/12] gpio: moxtet: " Bartosz Golaszewski
                   ` (10 subsequent siblings)
  12 siblings, 1 reply; 25+ messages in thread
From: Bartosz Golaszewski @ 2025-06-10 12:33 UTC (permalink / raw)
  To: Linus Walleij, Bartosz Golaszewski, Marek Behún,
	Conor Dooley, Daire McNamara, Daniel Palmer, Romain Perier,
	Avi Fishman, Tomer Maimon, Tali Perry, Patrick Venture,
	Nancy Yuen, Benjamin Fair, Grygorii Strashko, Santosh Shilimkar,
	Kevin Hilman
  Cc: linux-gpio, linux-kernel, linux-riscv, linux-arm-kernel, openbmc,
	linux-omap, 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>
---
 drivers/gpio/gpio-mm-lantiq.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/gpio/gpio-mm-lantiq.c b/drivers/gpio/gpio-mm-lantiq.c
index 14ae257834381186faba94446ea326cb3be99ca2..897a1e004681c085217bcf295bd971f3424011b1 100644
--- a/drivers/gpio/gpio-mm-lantiq.c
+++ b/drivers/gpio/gpio-mm-lantiq.c
@@ -55,9 +55,9 @@ static void ltq_mm_apply(struct ltq_mm *chip)
  * @gpio:   GPIO signal number.
  * @val:    Value to be written to specified signal.
  *
- * Set the shadow value and call ltq_mm_apply.
+ * Set the shadow value and call ltq_mm_apply. Always returns 0.
  */
-static void ltq_mm_set(struct gpio_chip *gc, unsigned offset, int value)
+static int ltq_mm_set(struct gpio_chip *gc, unsigned int offset, int value)
 {
 	struct ltq_mm *chip = gpiochip_get_data(gc);
 
@@ -66,6 +66,8 @@ static void ltq_mm_set(struct gpio_chip *gc, unsigned offset, int value)
 	else
 		chip->shadow &= ~(1 << offset);
 	ltq_mm_apply(chip);
+
+	return 0;
 }
 
 /**
@@ -78,9 +80,7 @@ static void ltq_mm_set(struct gpio_chip *gc, unsigned offset, int value)
  */
 static int ltq_mm_dir_out(struct gpio_chip *gc, unsigned offset, int value)
 {
-	ltq_mm_set(gc, offset, value);
-
-	return 0;
+	return ltq_mm_set(gc, offset, value);
 }
 
 /**
@@ -111,7 +111,7 @@ static int ltq_mm_probe(struct platform_device *pdev)
 
 	chip->mmchip.gc.ngpio = 16;
 	chip->mmchip.gc.direction_output = ltq_mm_dir_out;
-	chip->mmchip.gc.set = ltq_mm_set;
+	chip->mmchip.gc.set_rv = ltq_mm_set;
 	chip->mmchip.save_regs = ltq_mm_save_regs;
 
 	/* store the shadow value if one was passed by the devicetree */

-- 
2.48.1


^ permalink raw reply related	[flat|nested] 25+ messages in thread

* [PATCH 03/12] gpio: moxtet: use new GPIO line value setter callbacks
  2025-06-10 12:33 [PATCH 00/12] gpio: convert another round of GPIO drivers to using new line value setters Bartosz Golaszewski
  2025-06-10 12:33 ` [PATCH 01/12] gpio: mmio: use new GPIO line value setter callbacks Bartosz Golaszewski
  2025-06-10 12:33 ` [PATCH 02/12] gpio: mm-lantiq: " Bartosz Golaszewski
@ 2025-06-10 12:33 ` Bartosz Golaszewski
  2025-06-13 14:40   ` Marek Behún
  2025-06-10 12:33 ` [PATCH 04/12] gpio: mpc5200: " Bartosz Golaszewski
                   ` (9 subsequent siblings)
  12 siblings, 1 reply; 25+ messages in thread
From: Bartosz Golaszewski @ 2025-06-10 12:33 UTC (permalink / raw)
  To: Linus Walleij, Bartosz Golaszewski, Marek Behún,
	Conor Dooley, Daire McNamara, Daniel Palmer, Romain Perier,
	Avi Fishman, Tomer Maimon, Tali Perry, Patrick Venture,
	Nancy Yuen, Benjamin Fair, Grygorii Strashko, Santosh Shilimkar,
	Kevin Hilman
  Cc: linux-gpio, linux-kernel, linux-riscv, linux-arm-kernel, openbmc,
	linux-omap, 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>
---
 drivers/gpio/gpio-moxtet.c | 16 +++++++---------
 1 file changed, 7 insertions(+), 9 deletions(-)

diff --git a/drivers/gpio/gpio-moxtet.c b/drivers/gpio/gpio-moxtet.c
index 61f9efd6c64fb4babef5551fb2541659bf5a542b..27dd9c3e7b7717d43cad3d4c6de019c9401d05c7 100644
--- a/drivers/gpio/gpio-moxtet.c
+++ b/drivers/gpio/gpio-moxtet.c
@@ -52,15 +52,15 @@ static int moxtet_gpio_get_value(struct gpio_chip *gc, unsigned int offset)
 	return !!(ret & BIT(offset));
 }
 
-static void moxtet_gpio_set_value(struct gpio_chip *gc, unsigned int offset,
-				  int val)
+static int moxtet_gpio_set_value(struct gpio_chip *gc, unsigned int offset,
+				 int val)
 {
 	struct moxtet_gpio_chip *chip = gpiochip_get_data(gc);
 	int state;
 
 	state = moxtet_device_written(chip->dev);
 	if (state < 0)
-		return;
+		return state;
 
 	offset -= MOXTET_GPIO_INPUTS;
 
@@ -69,7 +69,7 @@ static void moxtet_gpio_set_value(struct gpio_chip *gc, unsigned int offset,
 	else
 		state &= ~BIT(offset);
 
-	moxtet_device_write(chip->dev, state);
+	return moxtet_device_write(chip->dev, state);
 }
 
 static int moxtet_gpio_get_direction(struct gpio_chip *gc, unsigned int offset)
@@ -104,13 +104,11 @@ static int moxtet_gpio_direction_output(struct gpio_chip *gc,
 	struct moxtet_gpio_chip *chip = gpiochip_get_data(gc);
 
 	if (chip->desc->out_mask & BIT(offset))
-		moxtet_gpio_set_value(gc, offset, val);
+		return moxtet_gpio_set_value(gc, offset, val);
 	else if (chip->desc->in_mask & BIT(offset))
 		return -ENOTSUPP;
-	else
-		return -EINVAL;
 
-	return 0;
+	return -EINVAL;
 }
 
 static int moxtet_gpio_probe(struct device *dev)
@@ -142,7 +140,7 @@ static int moxtet_gpio_probe(struct device *dev)
 	chip->gpio_chip.direction_input = moxtet_gpio_direction_input;
 	chip->gpio_chip.direction_output = moxtet_gpio_direction_output;
 	chip->gpio_chip.get = moxtet_gpio_get_value;
-	chip->gpio_chip.set = moxtet_gpio_set_value;
+	chip->gpio_chip.set_rv = moxtet_gpio_set_value;
 	chip->gpio_chip.base = -1;
 
 	chip->gpio_chip.ngpio = MOXTET_GPIO_NGPIOS;

-- 
2.48.1


^ permalink raw reply related	[flat|nested] 25+ messages in thread

* [PATCH 04/12] gpio: mpc5200: use new GPIO line value setter callbacks
  2025-06-10 12:33 [PATCH 00/12] gpio: convert another round of GPIO drivers to using new line value setters Bartosz Golaszewski
                   ` (2 preceding siblings ...)
  2025-06-10 12:33 ` [PATCH 03/12] gpio: moxtet: " Bartosz Golaszewski
@ 2025-06-10 12:33 ` Bartosz Golaszewski
  2025-06-10 12:33 ` [PATCH 05/12] gpio: mpfs: " Bartosz Golaszewski
                   ` (8 subsequent siblings)
  12 siblings, 0 replies; 25+ messages in thread
From: Bartosz Golaszewski @ 2025-06-10 12:33 UTC (permalink / raw)
  To: Linus Walleij, Bartosz Golaszewski, Marek Behún,
	Conor Dooley, Daire McNamara, Daniel Palmer, Romain Perier,
	Avi Fishman, Tomer Maimon, Tali Perry, Patrick Venture,
	Nancy Yuen, Benjamin Fair, Grygorii Strashko, Santosh Shilimkar,
	Kevin Hilman
  Cc: linux-gpio, linux-kernel, linux-riscv, linux-arm-kernel, openbmc,
	linux-omap, 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>
---
 drivers/gpio/gpio-mpc5200.c | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/drivers/gpio/gpio-mpc5200.c b/drivers/gpio/gpio-mpc5200.c
index 091d96f2d682941378d251e95eed88ff16bd39c2..40d587176a754a6277b87b760f562ed5304b6eef 100644
--- a/drivers/gpio/gpio-mpc5200.c
+++ b/drivers/gpio/gpio-mpc5200.c
@@ -69,7 +69,7 @@ __mpc52xx_wkup_gpio_set(struct gpio_chip *gc, unsigned int gpio, int val)
 	out_8(&regs->wkup_dvo, chip->shadow_dvo);
 }
 
-static void
+static int
 mpc52xx_wkup_gpio_set(struct gpio_chip *gc, unsigned int gpio, int val)
 {
 	unsigned long flags;
@@ -81,6 +81,8 @@ mpc52xx_wkup_gpio_set(struct gpio_chip *gc, unsigned int gpio, int val)
 	spin_unlock_irqrestore(&gpio_lock, flags);
 
 	pr_debug("%s: gpio: %d val: %d\n", __func__, gpio, val);
+
+	return 0;
 }
 
 static int mpc52xx_wkup_gpio_dir_in(struct gpio_chip *gc, unsigned int gpio)
@@ -151,7 +153,7 @@ static int mpc52xx_wkup_gpiochip_probe(struct platform_device *ofdev)
 	gc->direction_input  = mpc52xx_wkup_gpio_dir_in;
 	gc->direction_output = mpc52xx_wkup_gpio_dir_out;
 	gc->get              = mpc52xx_wkup_gpio_get;
-	gc->set              = mpc52xx_wkup_gpio_set;
+	gc->set_rv           = mpc52xx_wkup_gpio_set;
 
 	ret = of_mm_gpiochip_add_data(ofdev->dev.of_node, &chip->mmchip, chip);
 	if (ret)
@@ -228,7 +230,7 @@ __mpc52xx_simple_gpio_set(struct gpio_chip *gc, unsigned int gpio, int val)
 	out_be32(&regs->simple_dvo, chip->shadow_dvo);
 }
 
-static void
+static int
 mpc52xx_simple_gpio_set(struct gpio_chip *gc, unsigned int gpio, int val)
 {
 	unsigned long flags;
@@ -240,6 +242,8 @@ mpc52xx_simple_gpio_set(struct gpio_chip *gc, unsigned int gpio, int val)
 	spin_unlock_irqrestore(&gpio_lock, flags);
 
 	pr_debug("%s: gpio: %d val: %d\n", __func__, gpio, val);
+
+	return 0;
 }
 
 static int mpc52xx_simple_gpio_dir_in(struct gpio_chip *gc, unsigned int gpio)
@@ -311,7 +315,7 @@ static int mpc52xx_simple_gpiochip_probe(struct platform_device *ofdev)
 	gc->direction_input  = mpc52xx_simple_gpio_dir_in;
 	gc->direction_output = mpc52xx_simple_gpio_dir_out;
 	gc->get              = mpc52xx_simple_gpio_get;
-	gc->set              = mpc52xx_simple_gpio_set;
+	gc->set_rv           = mpc52xx_simple_gpio_set;
 
 	ret = of_mm_gpiochip_add_data(ofdev->dev.of_node, &chip->mmchip, chip);
 	if (ret)

-- 
2.48.1


^ permalink raw reply related	[flat|nested] 25+ messages in thread

* [PATCH 05/12] gpio: mpfs: use new GPIO line value setter callbacks
  2025-06-10 12:33 [PATCH 00/12] gpio: convert another round of GPIO drivers to using new line value setters Bartosz Golaszewski
                   ` (3 preceding siblings ...)
  2025-06-10 12:33 ` [PATCH 04/12] gpio: mpc5200: " Bartosz Golaszewski
@ 2025-06-10 12:33 ` Bartosz Golaszewski
  2025-06-10 12:33 ` [PATCH 06/12] gpio: mpsse: " Bartosz Golaszewski
                   ` (7 subsequent siblings)
  12 siblings, 0 replies; 25+ messages in thread
From: Bartosz Golaszewski @ 2025-06-10 12:33 UTC (permalink / raw)
  To: Linus Walleij, Bartosz Golaszewski, Marek Behún,
	Conor Dooley, Daire McNamara, Daniel Palmer, Romain Perier,
	Avi Fishman, Tomer Maimon, Tali Perry, Patrick Venture,
	Nancy Yuen, Benjamin Fair, Grygorii Strashko, Santosh Shilimkar,
	Kevin Hilman
  Cc: linux-gpio, linux-kernel, linux-riscv, linux-arm-kernel, openbmc,
	linux-omap, 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>
---
 drivers/gpio/gpio-mpfs.c | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/drivers/gpio/gpio-mpfs.c b/drivers/gpio/gpio-mpfs.c
index 561a961c97a69f64c21d31c0d924f930c985f131..3415cb7ebb0f1dbe291bfa41b02ae41c18488ff6 100644
--- a/drivers/gpio/gpio-mpfs.c
+++ b/drivers/gpio/gpio-mpfs.c
@@ -99,16 +99,19 @@ static int mpfs_gpio_get(struct gpio_chip *gc, unsigned int gpio_index)
 		return regmap_test_bits(mpfs_gpio->regs, mpfs_gpio->offsets->inp, BIT(gpio_index));
 }
 
-static void mpfs_gpio_set(struct gpio_chip *gc, unsigned int gpio_index, int value)
+static int mpfs_gpio_set(struct gpio_chip *gc, unsigned int gpio_index, int value)
 {
 	struct mpfs_gpio_chip *mpfs_gpio = gpiochip_get_data(gc);
+	int ret;
 
 	mpfs_gpio_get(gc, gpio_index);
 
-	regmap_update_bits(mpfs_gpio->regs, mpfs_gpio->offsets->outp, BIT(gpio_index),
-			   value << gpio_index);
+	ret = regmap_update_bits(mpfs_gpio->regs, mpfs_gpio->offsets->outp,
+				 BIT(gpio_index), value << gpio_index);
 
 	mpfs_gpio_get(gc, gpio_index);
+
+	return ret;
 }
 
 static int mpfs_gpio_probe(struct platform_device *pdev)
@@ -147,7 +150,7 @@ static int mpfs_gpio_probe(struct platform_device *pdev)
 	mpfs_gpio->gc.direction_output = mpfs_gpio_direction_output;
 	mpfs_gpio->gc.get_direction = mpfs_gpio_get_direction;
 	mpfs_gpio->gc.get = mpfs_gpio_get;
-	mpfs_gpio->gc.set = mpfs_gpio_set;
+	mpfs_gpio->gc.set_rv = mpfs_gpio_set;
 	mpfs_gpio->gc.base = -1;
 	mpfs_gpio->gc.ngpio = ngpios;
 	mpfs_gpio->gc.label = dev_name(dev);

-- 
2.48.1


^ permalink raw reply related	[flat|nested] 25+ messages in thread

* [PATCH 06/12] gpio: mpsse: use new GPIO line value setter callbacks
  2025-06-10 12:33 [PATCH 00/12] gpio: convert another round of GPIO drivers to using new line value setters Bartosz Golaszewski
                   ` (4 preceding siblings ...)
  2025-06-10 12:33 ` [PATCH 05/12] gpio: mpfs: " Bartosz Golaszewski
@ 2025-06-10 12:33 ` Bartosz Golaszewski
  2025-06-10 12:33 ` [PATCH 07/12] gpio: msc313: " Bartosz Golaszewski
                   ` (6 subsequent siblings)
  12 siblings, 0 replies; 25+ messages in thread
From: Bartosz Golaszewski @ 2025-06-10 12:33 UTC (permalink / raw)
  To: Linus Walleij, Bartosz Golaszewski, Marek Behún,
	Conor Dooley, Daire McNamara, Daniel Palmer, Romain Perier,
	Avi Fishman, Tomer Maimon, Tali Perry, Patrick Venture,
	Nancy Yuen, Benjamin Fair, Grygorii Strashko, Santosh Shilimkar,
	Kevin Hilman
  Cc: linux-gpio, linux-kernel, linux-riscv, linux-arm-kernel, openbmc,
	linux-omap, 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>
---
 drivers/gpio/gpio-mpsse.c | 22 ++++++++++------------
 1 file changed, 10 insertions(+), 12 deletions(-)

diff --git a/drivers/gpio/gpio-mpsse.c b/drivers/gpio/gpio-mpsse.c
index 3ea32c5e33d1a445dec02996744429f17ec61af7..b17de08e9e03c5ce05ca5c1bbbb8a0f83fc2ba03 100644
--- a/drivers/gpio/gpio-mpsse.c
+++ b/drivers/gpio/gpio-mpsse.c
@@ -160,8 +160,8 @@ static int gpio_mpsse_get_bank(struct mpsse_priv *priv, u8 bank)
 	return buf;
 }
 
-static void gpio_mpsse_set_multiple(struct gpio_chip *chip, unsigned long *mask,
-				    unsigned long *bits)
+static int gpio_mpsse_set_multiple(struct gpio_chip *chip, unsigned long *mask,
+				   unsigned long *bits)
 {
 	unsigned long i, bank, bank_mask, bank_bits;
 	int ret;
@@ -180,11 +180,11 @@ static void gpio_mpsse_set_multiple(struct gpio_chip *chip, unsigned long *mask,
 
 			ret = gpio_mpsse_set_bank(priv, bank);
 			if (ret)
-				dev_err(&priv->intf->dev,
-					"Couldn't set values for bank %ld!",
-					bank);
+				return ret;
 		}
 	}
+
+	return 0;
 }
 
 static int gpio_mpsse_get_multiple(struct gpio_chip *chip, unsigned long *mask,
@@ -227,7 +227,7 @@ static int gpio_mpsse_gpio_get(struct gpio_chip *chip, unsigned int offset)
 		return 0;
 }
 
-static void gpio_mpsse_gpio_set(struct gpio_chip *chip, unsigned int offset,
+static int gpio_mpsse_gpio_set(struct gpio_chip *chip, unsigned int offset,
 			       int value)
 {
 	unsigned long mask = 0, bits = 0;
@@ -236,7 +236,7 @@ static void gpio_mpsse_gpio_set(struct gpio_chip *chip, unsigned int offset,
 	if (value)
 		__set_bit(offset, &bits);
 
-	gpio_mpsse_set_multiple(chip, &mask, &bits);
+	return gpio_mpsse_set_multiple(chip, &mask, &bits);
 }
 
 static int gpio_mpsse_direction_output(struct gpio_chip *chip,
@@ -249,9 +249,7 @@ static int gpio_mpsse_direction_output(struct gpio_chip *chip,
 	scoped_guard(mutex, &priv->io_mutex)
 		priv->gpio_dir[bank] |= BIT(bank_offset);
 
-	gpio_mpsse_gpio_set(chip, offset, value);
-
-	return 0;
+	return gpio_mpsse_gpio_set(chip, offset, value);
 }
 
 static int gpio_mpsse_direction_input(struct gpio_chip *chip,
@@ -450,9 +448,9 @@ static int gpio_mpsse_probe(struct usb_interface *interface,
 	priv->gpio.direction_input = gpio_mpsse_direction_input;
 	priv->gpio.direction_output = gpio_mpsse_direction_output;
 	priv->gpio.get = gpio_mpsse_gpio_get;
-	priv->gpio.set = gpio_mpsse_gpio_set;
+	priv->gpio.set_rv = gpio_mpsse_gpio_set;
 	priv->gpio.get_multiple = gpio_mpsse_get_multiple;
-	priv->gpio.set_multiple = gpio_mpsse_set_multiple;
+	priv->gpio.set_multiple_rv = gpio_mpsse_set_multiple;
 	priv->gpio.base = -1;
 	priv->gpio.ngpio = 16;
 	priv->gpio.offset = priv->intf_id * priv->gpio.ngpio;

-- 
2.48.1


^ permalink raw reply related	[flat|nested] 25+ messages in thread

* [PATCH 07/12] gpio: msc313: use new GPIO line value setter callbacks
  2025-06-10 12:33 [PATCH 00/12] gpio: convert another round of GPIO drivers to using new line value setters Bartosz Golaszewski
                   ` (5 preceding siblings ...)
  2025-06-10 12:33 ` [PATCH 06/12] gpio: mpsse: " Bartosz Golaszewski
@ 2025-06-10 12:33 ` Bartosz Golaszewski
  2025-06-11 22:21   ` Daniel Palmer
  2025-06-10 12:33 ` [PATCH 08/12] gpio: nomadik: " Bartosz Golaszewski
                   ` (5 subsequent siblings)
  12 siblings, 1 reply; 25+ messages in thread
From: Bartosz Golaszewski @ 2025-06-10 12:33 UTC (permalink / raw)
  To: Linus Walleij, Bartosz Golaszewski, Marek Behún,
	Conor Dooley, Daire McNamara, Daniel Palmer, Romain Perier,
	Avi Fishman, Tomer Maimon, Tali Perry, Patrick Venture,
	Nancy Yuen, Benjamin Fair, Grygorii Strashko, Santosh Shilimkar,
	Kevin Hilman
  Cc: linux-gpio, linux-kernel, linux-riscv, linux-arm-kernel, openbmc,
	linux-omap, 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>
---
 drivers/gpio/gpio-msc313.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/gpio/gpio-msc313.c b/drivers/gpio/gpio-msc313.c
index 6db9e469e0dc254e791d497b89a4c6d329d0add4..992339a89d19840fc03ccf849972a83cb86415ae 100644
--- a/drivers/gpio/gpio-msc313.c
+++ b/drivers/gpio/gpio-msc313.c
@@ -486,7 +486,7 @@ struct msc313_gpio {
 	u8 *saved;
 };
 
-static void msc313_gpio_set(struct gpio_chip *chip, unsigned int offset, int value)
+static int msc313_gpio_set(struct gpio_chip *chip, unsigned int offset, int value)
 {
 	struct msc313_gpio *gpio = gpiochip_get_data(chip);
 	u8 gpioreg = readb_relaxed(gpio->base + gpio->gpio_data->offsets[offset]);
@@ -497,6 +497,8 @@ static void msc313_gpio_set(struct gpio_chip *chip, unsigned int offset, int val
 		gpioreg &= ~MSC313_GPIO_OUT;
 
 	writeb_relaxed(gpioreg, gpio->base + gpio->gpio_data->offsets[offset]);
+
+	return 0;
 }
 
 static int msc313_gpio_get(struct gpio_chip *chip, unsigned int offset)
@@ -656,7 +658,7 @@ static int msc313_gpio_probe(struct platform_device *pdev)
 	gpiochip->direction_input = msc313_gpio_direction_input;
 	gpiochip->direction_output = msc313_gpio_direction_output;
 	gpiochip->get = msc313_gpio_get;
-	gpiochip->set = msc313_gpio_set;
+	gpiochip->set_rv = msc313_gpio_set;
 	gpiochip->base = -1;
 	gpiochip->ngpio = gpio->gpio_data->num;
 	gpiochip->names = gpio->gpio_data->names;

-- 
2.48.1


^ permalink raw reply related	[flat|nested] 25+ messages in thread

* [PATCH 08/12] gpio: nomadik: use new GPIO line value setter callbacks
  2025-06-10 12:33 [PATCH 00/12] gpio: convert another round of GPIO drivers to using new line value setters Bartosz Golaszewski
                   ` (6 preceding siblings ...)
  2025-06-10 12:33 ` [PATCH 07/12] gpio: msc313: " Bartosz Golaszewski
@ 2025-06-10 12:33 ` Bartosz Golaszewski
  2025-06-10 22:06   ` Linus Walleij
  2025-06-10 12:33 ` [PATCH 09/12] gpio: npcm-sgpio: " Bartosz Golaszewski
                   ` (4 subsequent siblings)
  12 siblings, 1 reply; 25+ messages in thread
From: Bartosz Golaszewski @ 2025-06-10 12:33 UTC (permalink / raw)
  To: Linus Walleij, Bartosz Golaszewski, Marek Behún,
	Conor Dooley, Daire McNamara, Daniel Palmer, Romain Perier,
	Avi Fishman, Tomer Maimon, Tali Perry, Patrick Venture,
	Nancy Yuen, Benjamin Fair, Grygorii Strashko, Santosh Shilimkar,
	Kevin Hilman
  Cc: linux-gpio, linux-kernel, linux-riscv, linux-arm-kernel, openbmc,
	linux-omap, 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>
---
 drivers/gpio/gpio-nomadik.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/drivers/gpio/gpio-nomadik.c b/drivers/gpio/gpio-nomadik.c
index fa19a44943fd7ae167079b34a48f669a38ec4ae7..296d13845b3009a52068ecacd8d2d6a25eede9d6 100644
--- a/drivers/gpio/gpio-nomadik.c
+++ b/drivers/gpio/gpio-nomadik.c
@@ -347,8 +347,8 @@ static int nmk_gpio_get_input(struct gpio_chip *chip, unsigned int offset)
 	return value;
 }
 
-static void nmk_gpio_set_output(struct gpio_chip *chip, unsigned int offset,
-				int val)
+static int nmk_gpio_set_output(struct gpio_chip *chip, unsigned int offset,
+			       int val)
 {
 	struct nmk_gpio_chip *nmk_chip = gpiochip_get_data(chip);
 
@@ -357,6 +357,8 @@ static void nmk_gpio_set_output(struct gpio_chip *chip, unsigned int offset,
 	__nmk_gpio_set_output(nmk_chip, offset, val);
 
 	clk_disable(nmk_chip->clk);
+
+	return 0;
 }
 
 static int nmk_gpio_make_output(struct gpio_chip *chip, unsigned int offset,
@@ -672,7 +674,7 @@ static int nmk_gpio_probe(struct platform_device *pdev)
 	chip->direction_input = nmk_gpio_make_input;
 	chip->get = nmk_gpio_get_input;
 	chip->direction_output = nmk_gpio_make_output;
-	chip->set = nmk_gpio_set_output;
+	chip->set_rv = nmk_gpio_set_output;
 	chip->dbg_show = nmk_gpio_dbg_show;
 	chip->can_sleep = false;
 	chip->owner = THIS_MODULE;

-- 
2.48.1


^ permalink raw reply related	[flat|nested] 25+ messages in thread

* [PATCH 09/12] gpio: npcm-sgpio: use new GPIO line value setter callbacks
  2025-06-10 12:33 [PATCH 00/12] gpio: convert another round of GPIO drivers to using new line value setters Bartosz Golaszewski
                   ` (7 preceding siblings ...)
  2025-06-10 12:33 ` [PATCH 08/12] gpio: nomadik: " Bartosz Golaszewski
@ 2025-06-10 12:33 ` Bartosz Golaszewski
  2025-06-10 12:33 ` [PATCH 10/12] gpio: octeon: " Bartosz Golaszewski
                   ` (3 subsequent siblings)
  12 siblings, 0 replies; 25+ messages in thread
From: Bartosz Golaszewski @ 2025-06-10 12:33 UTC (permalink / raw)
  To: Linus Walleij, Bartosz Golaszewski, Marek Behún,
	Conor Dooley, Daire McNamara, Daniel Palmer, Romain Perier,
	Avi Fishman, Tomer Maimon, Tali Perry, Patrick Venture,
	Nancy Yuen, Benjamin Fair, Grygorii Strashko, Santosh Shilimkar,
	Kevin Hilman
  Cc: linux-gpio, linux-kernel, linux-riscv, linux-arm-kernel, openbmc,
	linux-omap, 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>
---
 drivers/gpio/gpio-npcm-sgpio.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/gpio/gpio-npcm-sgpio.c b/drivers/gpio/gpio-npcm-sgpio.c
index 26057061454348d383129267e8bb0b8c506ea5c1..b3953d1ae8af45f4bce9b799434547cd8770d9df 100644
--- a/drivers/gpio/gpio-npcm-sgpio.c
+++ b/drivers/gpio/gpio-npcm-sgpio.c
@@ -226,7 +226,7 @@ static int npcm_sgpio_get_direction(struct gpio_chip *gc, unsigned int offset)
 	return GPIO_LINE_DIRECTION_IN;
 }
 
-static void npcm_sgpio_set(struct gpio_chip *gc, unsigned int offset, int val)
+static int npcm_sgpio_set(struct gpio_chip *gc, unsigned int offset, int val)
 {
 	struct npcm_sgpio *gpio = gpiochip_get_data(gc);
 	const struct  npcm_sgpio_bank *bank = offset_to_bank(offset);
@@ -242,6 +242,8 @@ static void npcm_sgpio_set(struct gpio_chip *gc, unsigned int offset, int val)
 		reg &= ~BIT(GPIO_BIT(offset));
 
 	iowrite8(reg, addr);
+
+	return 0;
 }
 
 static int npcm_sgpio_get(struct gpio_chip *gc, unsigned int offset)
@@ -546,7 +548,7 @@ static int npcm_sgpio_probe(struct platform_device *pdev)
 	gpio->chip.direction_output = npcm_sgpio_dir_out;
 	gpio->chip.get_direction = npcm_sgpio_get_direction;
 	gpio->chip.get = npcm_sgpio_get;
-	gpio->chip.set = npcm_sgpio_set;
+	gpio->chip.set_rv = npcm_sgpio_set;
 	gpio->chip.label = dev_name(&pdev->dev);
 	gpio->chip.base = -1;
 

-- 
2.48.1


^ permalink raw reply related	[flat|nested] 25+ messages in thread

* [PATCH 10/12] gpio: octeon: use new GPIO line value setter callbacks
  2025-06-10 12:33 [PATCH 00/12] gpio: convert another round of GPIO drivers to using new line value setters Bartosz Golaszewski
                   ` (8 preceding siblings ...)
  2025-06-10 12:33 ` [PATCH 09/12] gpio: npcm-sgpio: " Bartosz Golaszewski
@ 2025-06-10 12:33 ` Bartosz Golaszewski
  2025-06-10 12:33 ` [PATCH 11/12] gpio: omap: " Bartosz Golaszewski
                   ` (2 subsequent siblings)
  12 siblings, 0 replies; 25+ messages in thread
From: Bartosz Golaszewski @ 2025-06-10 12:33 UTC (permalink / raw)
  To: Linus Walleij, Bartosz Golaszewski, Marek Behún,
	Conor Dooley, Daire McNamara, Daniel Palmer, Romain Perier,
	Avi Fishman, Tomer Maimon, Tali Perry, Patrick Venture,
	Nancy Yuen, Benjamin Fair, Grygorii Strashko, Santosh Shilimkar,
	Kevin Hilman
  Cc: linux-gpio, linux-kernel, linux-riscv, linux-arm-kernel, openbmc,
	linux-omap, 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>
---
 drivers/gpio/gpio-octeon.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/drivers/gpio/gpio-octeon.c b/drivers/gpio/gpio-octeon.c
index afb0e8a791e5a8f1b3029c4ca890a5eb9b8efe44..24966161742a96082baeb850f124c71b894e9057 100644
--- a/drivers/gpio/gpio-octeon.c
+++ b/drivers/gpio/gpio-octeon.c
@@ -47,12 +47,15 @@ static int octeon_gpio_dir_in(struct gpio_chip *chip, unsigned offset)
 	return 0;
 }
 
-static void octeon_gpio_set(struct gpio_chip *chip, unsigned offset, int value)
+static int octeon_gpio_set(struct gpio_chip *chip, unsigned int offset,
+			   int value)
 {
 	struct octeon_gpio *gpio = gpiochip_get_data(chip);
 	u64 mask = 1ull << offset;
 	u64 reg = gpio->register_base + (value ? TX_SET : TX_CLEAR);
 	cvmx_write_csr(reg, mask);
+
+	return 0;
 }
 
 static int octeon_gpio_dir_out(struct gpio_chip *chip, unsigned offset,
@@ -105,7 +108,7 @@ static int octeon_gpio_probe(struct platform_device *pdev)
 	chip->direction_input = octeon_gpio_dir_in;
 	chip->get = octeon_gpio_get;
 	chip->direction_output = octeon_gpio_dir_out;
-	chip->set = octeon_gpio_set;
+	chip->set_rv = octeon_gpio_set;
 	err = devm_gpiochip_add_data(&pdev->dev, chip, gpio);
 	if (err)
 		return err;

-- 
2.48.1


^ permalink raw reply related	[flat|nested] 25+ messages in thread

* [PATCH 11/12] gpio: omap: use new GPIO line value setter callbacks
  2025-06-10 12:33 [PATCH 00/12] gpio: convert another round of GPIO drivers to using new line value setters Bartosz Golaszewski
                   ` (9 preceding siblings ...)
  2025-06-10 12:33 ` [PATCH 10/12] gpio: octeon: " Bartosz Golaszewski
@ 2025-06-10 12:33 ` Bartosz Golaszewski
  2025-06-10 12:33 ` [PATCH 12/12] gpio: palmas: " Bartosz Golaszewski
  2025-06-17  9:14 ` [PATCH 00/12] gpio: convert another round of GPIO drivers to using new line value setters Bartosz Golaszewski
  12 siblings, 0 replies; 25+ messages in thread
From: Bartosz Golaszewski @ 2025-06-10 12:33 UTC (permalink / raw)
  To: Linus Walleij, Bartosz Golaszewski, Marek Behún,
	Conor Dooley, Daire McNamara, Daniel Palmer, Romain Perier,
	Avi Fishman, Tomer Maimon, Tali Perry, Patrick Venture,
	Nancy Yuen, Benjamin Fair, Grygorii Strashko, Santosh Shilimkar,
	Kevin Hilman
  Cc: linux-gpio, linux-kernel, linux-riscv, linux-arm-kernel, openbmc,
	linux-omap, 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>
---
 drivers/gpio/gpio-omap.c | 14 +++++++++-----
 1 file changed, 9 insertions(+), 5 deletions(-)

diff --git a/drivers/gpio/gpio-omap.c b/drivers/gpio/gpio-omap.c
index 54c4bfdccf56812b5f79435a97b6eb90904ca59c..ed5c88a5c5207063e1269763e6239441a42e0c3d 100644
--- a/drivers/gpio/gpio-omap.c
+++ b/drivers/gpio/gpio-omap.c
@@ -953,7 +953,7 @@ static int omap_gpio_set_config(struct gpio_chip *chip, unsigned offset,
 	return ret;
 }
 
-static void omap_gpio_set(struct gpio_chip *chip, unsigned offset, int value)
+static int omap_gpio_set(struct gpio_chip *chip, unsigned int offset, int value)
 {
 	struct gpio_bank *bank;
 	unsigned long flags;
@@ -962,10 +962,12 @@ static void omap_gpio_set(struct gpio_chip *chip, unsigned offset, int value)
 	raw_spin_lock_irqsave(&bank->lock, flags);
 	bank->set_dataout(bank, offset, value);
 	raw_spin_unlock_irqrestore(&bank->lock, flags);
+
+	return 0;
 }
 
-static void omap_gpio_set_multiple(struct gpio_chip *chip, unsigned long *mask,
-				   unsigned long *bits)
+static int omap_gpio_set_multiple(struct gpio_chip *chip, unsigned long *mask,
+				  unsigned long *bits)
 {
 	struct gpio_bank *bank = gpiochip_get_data(chip);
 	void __iomem *reg = bank->base + bank->regs->dataout;
@@ -977,6 +979,8 @@ static void omap_gpio_set_multiple(struct gpio_chip *chip, unsigned long *mask,
 	writel_relaxed(l, reg);
 	bank->context.dataout = l;
 	raw_spin_unlock_irqrestore(&bank->lock, flags);
+
+	return 0;
 }
 
 /*---------------------------------------------------------------------*/
@@ -1042,8 +1046,8 @@ static int omap_gpio_chip_init(struct gpio_bank *bank, struct device *pm_dev)
 	bank->chip.get_multiple = omap_gpio_get_multiple;
 	bank->chip.direction_output = omap_gpio_output;
 	bank->chip.set_config = omap_gpio_set_config;
-	bank->chip.set = omap_gpio_set;
-	bank->chip.set_multiple = omap_gpio_set_multiple;
+	bank->chip.set_rv = omap_gpio_set;
+	bank->chip.set_multiple_rv = omap_gpio_set_multiple;
 	if (bank->is_mpuio) {
 		bank->chip.label = "mpuio";
 		if (bank->regs->wkup_en)

-- 
2.48.1


^ permalink raw reply related	[flat|nested] 25+ messages in thread

* [PATCH 12/12] gpio: palmas: use new GPIO line value setter callbacks
  2025-06-10 12:33 [PATCH 00/12] gpio: convert another round of GPIO drivers to using new line value setters Bartosz Golaszewski
                   ` (10 preceding siblings ...)
  2025-06-10 12:33 ` [PATCH 11/12] gpio: omap: " Bartosz Golaszewski
@ 2025-06-10 12:33 ` Bartosz Golaszewski
  2025-06-17  9:14 ` [PATCH 00/12] gpio: convert another round of GPIO drivers to using new line value setters Bartosz Golaszewski
  12 siblings, 0 replies; 25+ messages in thread
From: Bartosz Golaszewski @ 2025-06-10 12:33 UTC (permalink / raw)
  To: Linus Walleij, Bartosz Golaszewski, Marek Behún,
	Conor Dooley, Daire McNamara, Daniel Palmer, Romain Perier,
	Avi Fishman, Tomer Maimon, Tali Perry, Patrick Venture,
	Nancy Yuen, Benjamin Fair, Grygorii Strashko, Santosh Shilimkar,
	Kevin Hilman
  Cc: linux-gpio, linux-kernel, linux-riscv, linux-arm-kernel, openbmc,
	linux-omap, 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>
---
 drivers/gpio/gpio-palmas.c | 15 +++++++--------
 1 file changed, 7 insertions(+), 8 deletions(-)

diff --git a/drivers/gpio/gpio-palmas.c b/drivers/gpio/gpio-palmas.c
index 28dba7048509a3ef9c7972c1be53ea30adddabb0..a076daee00658a9e423a0d78f14ad48d61956d7a 100644
--- a/drivers/gpio/gpio-palmas.c
+++ b/drivers/gpio/gpio-palmas.c
@@ -54,12 +54,11 @@ static int palmas_gpio_get(struct gpio_chip *gc, unsigned offset)
 	return !!(val & BIT(offset));
 }
 
-static void palmas_gpio_set(struct gpio_chip *gc, unsigned offset,
-			int value)
+static int palmas_gpio_set(struct gpio_chip *gc, unsigned int offset,
+			   int value)
 {
 	struct palmas_gpio *pg = gpiochip_get_data(gc);
 	struct palmas *palmas = pg->palmas;
-	int ret;
 	unsigned int reg;
 	int gpio16 = (offset/8);
 
@@ -71,9 +70,7 @@ static void palmas_gpio_set(struct gpio_chip *gc, unsigned offset,
 		reg = (value) ?
 			PALMAS_GPIO_SET_DATA_OUT : PALMAS_GPIO_CLEAR_DATA_OUT;
 
-	ret = palmas_write(palmas, PALMAS_GPIO_BASE, reg, BIT(offset));
-	if (ret < 0)
-		dev_err(gc->parent, "Reg 0x%02x write failed, %d\n", reg, ret);
+	return palmas_write(palmas, PALMAS_GPIO_BASE, reg, BIT(offset));
 }
 
 static int palmas_gpio_output(struct gpio_chip *gc, unsigned offset,
@@ -89,7 +86,9 @@ static int palmas_gpio_output(struct gpio_chip *gc, unsigned offset,
 	reg = (gpio16) ? PALMAS_GPIO_DATA_DIR2 : PALMAS_GPIO_DATA_DIR;
 
 	/* Set the initial value */
-	palmas_gpio_set(gc, offset, value);
+	ret = palmas_gpio_set(gc, offset, value);
+	if (ret)
+		return ret;
 
 	ret = palmas_update_bits(palmas, PALMAS_GPIO_BASE, reg,
 				BIT(offset), BIT(offset));
@@ -166,7 +165,7 @@ static int palmas_gpio_probe(struct platform_device *pdev)
 	palmas_gpio->gpio_chip.direction_input = palmas_gpio_input;
 	palmas_gpio->gpio_chip.direction_output = palmas_gpio_output;
 	palmas_gpio->gpio_chip.to_irq = palmas_gpio_to_irq;
-	palmas_gpio->gpio_chip.set	= palmas_gpio_set;
+	palmas_gpio->gpio_chip.set_rv	= palmas_gpio_set;
 	palmas_gpio->gpio_chip.get	= palmas_gpio_get;
 	palmas_gpio->gpio_chip.parent = &pdev->dev;
 

-- 
2.48.1


^ permalink raw reply related	[flat|nested] 25+ messages in thread

* Re: [PATCH 01/12] gpio: mmio: use new GPIO line value setter callbacks
  2025-06-10 12:33 ` [PATCH 01/12] gpio: mmio: use new GPIO line value setter callbacks Bartosz Golaszewski
@ 2025-06-10 21:16   ` Linus Walleij
  2025-06-18 11:59   ` Klara Modin
                     ` (2 subsequent siblings)
  3 siblings, 0 replies; 25+ messages in thread
From: Linus Walleij @ 2025-06-10 21:16 UTC (permalink / raw)
  To: Bartosz Golaszewski
  Cc: Marek Behún, Conor Dooley, Daire McNamara, Daniel Palmer,
	Romain Perier, Avi Fishman, Tomer Maimon, Tali Perry,
	Patrick Venture, Nancy Yuen, Benjamin Fair, Grygorii Strashko,
	Santosh Shilimkar, Kevin Hilman, linux-gpio, linux-kernel,
	linux-riscv, linux-arm-kernel, openbmc, linux-omap,
	Bartosz Golaszewski

On Tue, Jun 10, 2025 at 2:33 PM 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] 25+ messages in thread

* Re: [PATCH 02/12] gpio: mm-lantiq: use new GPIO line value setter callbacks
  2025-06-10 12:33 ` [PATCH 02/12] gpio: mm-lantiq: " Bartosz Golaszewski
@ 2025-06-10 22:01   ` Linus Walleij
  0 siblings, 0 replies; 25+ messages in thread
From: Linus Walleij @ 2025-06-10 22:01 UTC (permalink / raw)
  To: Bartosz Golaszewski
  Cc: Marek Behún, Conor Dooley, Daire McNamara, Daniel Palmer,
	Romain Perier, Avi Fishman, Tomer Maimon, Tali Perry,
	Patrick Venture, Nancy Yuen, Benjamin Fair, Grygorii Strashko,
	Santosh Shilimkar, Kevin Hilman, linux-gpio, linux-kernel,
	linux-riscv, linux-arm-kernel, openbmc, linux-omap,
	Bartosz Golaszewski

On Tue, Jun 10, 2025 at 2:33 PM 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] 25+ messages in thread

* Re: [PATCH 08/12] gpio: nomadik: use new GPIO line value setter callbacks
  2025-06-10 12:33 ` [PATCH 08/12] gpio: nomadik: " Bartosz Golaszewski
@ 2025-06-10 22:06   ` Linus Walleij
  0 siblings, 0 replies; 25+ messages in thread
From: Linus Walleij @ 2025-06-10 22:06 UTC (permalink / raw)
  To: Bartosz Golaszewski
  Cc: Marek Behún, Conor Dooley, Daire McNamara, Daniel Palmer,
	Romain Perier, Avi Fishman, Tomer Maimon, Tali Perry,
	Patrick Venture, Nancy Yuen, Benjamin Fair, Grygorii Strashko,
	Santosh Shilimkar, Kevin Hilman, linux-gpio, linux-kernel,
	linux-riscv, linux-arm-kernel, openbmc, linux-omap,
	Bartosz Golaszewski

On Tue, Jun 10, 2025 at 2:33 PM 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] 25+ messages in thread

* Re: [PATCH 07/12] gpio: msc313: use new GPIO line value setter callbacks
  2025-06-10 12:33 ` [PATCH 07/12] gpio: msc313: " Bartosz Golaszewski
@ 2025-06-11 22:21   ` Daniel Palmer
  0 siblings, 0 replies; 25+ messages in thread
From: Daniel Palmer @ 2025-06-11 22:21 UTC (permalink / raw)
  To: Bartosz Golaszewski
  Cc: Linus Walleij, Marek Behún, Conor Dooley, Daire McNamara,
	Romain Perier, Avi Fishman, Tomer Maimon, Tali Perry,
	Patrick Venture, Nancy Yuen, Benjamin Fair, Grygorii Strashko,
	Santosh Shilimkar, Kevin Hilman, linux-gpio, linux-kernel,
	linux-riscv, linux-arm-kernel, openbmc, linux-omap,
	Bartosz Golaszewski

Hi Bartosz,

On Tue, 10 Jun 2025 at 21:33, 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>
> ---
>  drivers/gpio/gpio-msc313.c | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpio/gpio-msc313.c b/drivers/gpio/gpio-msc313.c
> index 6db9e469e0dc254e791d497b89a4c6d329d0add4..992339a89d19840fc03ccf849972a83cb86415ae 100644
> --- a/drivers/gpio/gpio-msc313.c
> +++ b/drivers/gpio/gpio-msc313.c
> @@ -486,7 +486,7 @@ struct msc313_gpio {
>         u8 *saved;
>  };
>
> -static void msc313_gpio_set(struct gpio_chip *chip, unsigned int offset, int value)
> +static int msc313_gpio_set(struct gpio_chip *chip, unsigned int offset, int value)
>  {
>         struct msc313_gpio *gpio = gpiochip_get_data(chip);
>         u8 gpioreg = readb_relaxed(gpio->base + gpio->gpio_data->offsets[offset]);
> @@ -497,6 +497,8 @@ static void msc313_gpio_set(struct gpio_chip *chip, unsigned int offset, int val
>                 gpioreg &= ~MSC313_GPIO_OUT;
>
>         writeb_relaxed(gpioreg, gpio->base + gpio->gpio_data->offsets[offset]);
> +
> +       return 0;
>  }
>
>  static int msc313_gpio_get(struct gpio_chip *chip, unsigned int offset)
> @@ -656,7 +658,7 @@ static int msc313_gpio_probe(struct platform_device *pdev)
>         gpiochip->direction_input = msc313_gpio_direction_input;
>         gpiochip->direction_output = msc313_gpio_direction_output;
>         gpiochip->get = msc313_gpio_get;
> -       gpiochip->set = msc313_gpio_set;
> +       gpiochip->set_rv = msc313_gpio_set;
>         gpiochip->base = -1;
>         gpiochip->ngpio = gpio->gpio_data->num;
>         gpiochip->names = gpio->gpio_data->names;
>
> --
> 2.48.1
>

Reviewed-by: Daniel Palmer <daniel@thingy.jp>

Cheers,

Daniel

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [PATCH 03/12] gpio: moxtet: use new GPIO line value setter callbacks
  2025-06-10 12:33 ` [PATCH 03/12] gpio: moxtet: " Bartosz Golaszewski
@ 2025-06-13 14:40   ` Marek Behún
  0 siblings, 0 replies; 25+ messages in thread
From: Marek Behún @ 2025-06-13 14:40 UTC (permalink / raw)
  To: Bartosz Golaszewski
  Cc: Linus Walleij, Conor Dooley, Daire McNamara, Daniel Palmer,
	Romain Perier, Avi Fishman, Tomer Maimon, Tali Perry,
	Patrick Venture, Nancy Yuen, Benjamin Fair, Grygorii Strashko,
	Santosh Shilimkar, Kevin Hilman, linux-gpio, linux-kernel,
	linux-riscv, linux-arm-kernel, openbmc, linux-omap,
	Bartosz Golaszewski

On Tue, Jun 10, 2025 at 02:33:13PM +0200, 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>
> ---

Reviewed-by: Marek Behún <kabel@kernel.org>

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [PATCH 00/12] gpio: convert another round of GPIO drivers to using new line value setters
  2025-06-10 12:33 [PATCH 00/12] gpio: convert another round of GPIO drivers to using new line value setters Bartosz Golaszewski
                   ` (11 preceding siblings ...)
  2025-06-10 12:33 ` [PATCH 12/12] gpio: palmas: " Bartosz Golaszewski
@ 2025-06-17  9:14 ` Bartosz Golaszewski
  12 siblings, 0 replies; 25+ messages in thread
From: Bartosz Golaszewski @ 2025-06-17  9:14 UTC (permalink / raw)
  To: Linus Walleij, Marek Behún, Conor Dooley, Daire McNamara,
	Daniel Palmer, Romain Perier, Avi Fishman, Tomer Maimon,
	Tali Perry, Patrick Venture, Nancy Yuen, Benjamin Fair,
	Grygorii Strashko, Santosh Shilimkar, Kevin Hilman,
	Bartosz Golaszewski
  Cc: Bartosz Golaszewski, linux-gpio, linux-kernel, linux-riscv,
	linux-arm-kernel, openbmc, linux-omap

From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>


On Tue, 10 Jun 2025 14:33:10 +0200, Bartosz Golaszewski wrote:
> Commit 98ce1eb1fd87e ("gpiolib: introduce gpio_chip setters that return
> values") added new line setter callbacks to struct gpio_chip. They allow
> to indicate failures to callers. We're in the process of converting all
> GPIO controllers to using them before removing the old ones. This series
> converts another round of GPIO drivers.
> 
> 
> [...]

Applied, thanks!

[01/12] gpio: mmio: use new GPIO line value setter callbacks
        https://git.kernel.org/brgl/linux/c/b908d35d0003cc75d4ebf7c24a61b07d34e7f5dc
[02/12] gpio: mm-lantiq: use new GPIO line value setter callbacks
        https://git.kernel.org/brgl/linux/c/d27746181905c256eced857f4b2c051ac44b0b45
[03/12] gpio: moxtet: use new GPIO line value setter callbacks
        https://git.kernel.org/brgl/linux/c/b454580cf11b45a9da22821543f1455a6a31c5ee
[04/12] gpio: mpc5200: use new GPIO line value setter callbacks
        https://git.kernel.org/brgl/linux/c/80d42372d9d87626b55516779e935c012cecdae7
[05/12] gpio: mpfs: use new GPIO line value setter callbacks
        https://git.kernel.org/brgl/linux/c/3aa3628f8168df9fe154b09b1710d3314b9fa4b7
[06/12] gpio: mpsse: use new GPIO line value setter callbacks
        https://git.kernel.org/brgl/linux/c/e63d9fbe9f148b44f2fdc211941f2d4485022549
[07/12] gpio: msc313: use new GPIO line value setter callbacks
        https://git.kernel.org/brgl/linux/c/88a775454a0fe923f3d34d8f30cd1d6b75be0859
[08/12] gpio: nomadik: use new GPIO line value setter callbacks
        https://git.kernel.org/brgl/linux/c/aaec273c7b511a7826df09123a1fd6e4896c1bfd
[09/12] gpio: npcm-sgpio: use new GPIO line value setter callbacks
        https://git.kernel.org/brgl/linux/c/0e1a8930c941e3a7bea25928b254ece8caa5135d
[10/12] gpio: octeon: use new GPIO line value setter callbacks
        https://git.kernel.org/brgl/linux/c/f02614561493da22f24b0e2ec1c2ae0d5b41c68b
[11/12] gpio: omap: use new GPIO line value setter callbacks
        https://git.kernel.org/brgl/linux/c/57065d62e672bce193f186c7b759f928b9a90ca0
[12/12] gpio: palmas: use new GPIO line value setter callbacks
        https://git.kernel.org/brgl/linux/c/f3763403a6bbc3a18379fe4c415bda899a111d55

Best regards,
-- 
Bartosz Golaszewski <bartosz.golaszewski@linaro.org>

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [PATCH 01/12] gpio: mmio: use new GPIO line value setter callbacks
  2025-06-10 12:33 ` [PATCH 01/12] gpio: mmio: use new GPIO line value setter callbacks Bartosz Golaszewski
  2025-06-10 21:16   ` Linus Walleij
@ 2025-06-18 11:59   ` Klara Modin
  2025-06-18 12:34     ` Bartosz Golaszewski
  2025-06-18 16:21   ` Mark Brown
       [not found]   ` <CGME20250618164320eucas1p28174732f38fd279fbba72f07887e5da5@eucas1p2.samsung.com>
  3 siblings, 1 reply; 25+ messages in thread
From: Klara Modin @ 2025-06-18 11:59 UTC (permalink / raw)
  To: Bartosz Golaszewski
  Cc: Linus Walleij, Marek Behún, Conor Dooley, Daire McNamara,
	Daniel Palmer, Romain Perier, Avi Fishman, Tomer Maimon,
	Tali Perry, Patrick Venture, Nancy Yuen, Benjamin Fair,
	Grygorii Strashko, Santosh Shilimkar, Kevin Hilman, linux-gpio,
	linux-kernel, linux-riscv, linux-arm-kernel, openbmc, linux-omap,
	Bartosz Golaszewski

Hi,

On 2025-06-10 14:33:11 +0200, 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>
> ---
>  drivers/gpio/gpio-mmio.c | 53 ++++++++++++++++++++++++++++++------------------
>  1 file changed, 33 insertions(+), 20 deletions(-)
> 
> diff --git a/drivers/gpio/gpio-mmio.c b/drivers/gpio/gpio-mmio.c
> index 4841e4ebe7a67d0f954e9a6f995ec5758f124edd..9169eccadb238efe944d494054b1e009f16eee7f 100644
> --- a/drivers/gpio/gpio-mmio.c
> +++ b/drivers/gpio/gpio-mmio.c
> @@ -211,11 +211,12 @@ static int bgpio_get_multiple_be(struct gpio_chip *gc, unsigned long *mask,
>  	return 0;
>  }
>  
> -static void bgpio_set_none(struct gpio_chip *gc, unsigned int gpio, int val)
> +static int bgpio_set_none(struct gpio_chip *gc, unsigned int gpio, int val)
>  {
> +	return 0;
>  }
>  
> -static void bgpio_set(struct gpio_chip *gc, unsigned int gpio, int val)
> +static int bgpio_set(struct gpio_chip *gc, unsigned int gpio, int val)
>  {
>  	unsigned long mask = bgpio_line2mask(gc, gpio);
>  	unsigned long flags;
> @@ -230,10 +231,12 @@ static void bgpio_set(struct gpio_chip *gc, unsigned int gpio, int val)
>  	gc->write_reg(gc->reg_dat, gc->bgpio_data);
>  
>  	raw_spin_unlock_irqrestore(&gc->bgpio_lock, flags);
> +
> +	return 0;
>  }
>  
> -static void bgpio_set_with_clear(struct gpio_chip *gc, unsigned int gpio,
> -				 int val)
> +static int bgpio_set_with_clear(struct gpio_chip *gc, unsigned int gpio,
> +				int val)
>  {
>  	unsigned long mask = bgpio_line2mask(gc, gpio);
>  
> @@ -241,9 +244,11 @@ static void bgpio_set_with_clear(struct gpio_chip *gc, unsigned int gpio,
>  		gc->write_reg(gc->reg_set, mask);
>  	else
>  		gc->write_reg(gc->reg_clr, mask);
> +
> +	return 0;
>  }
>  
> -static void bgpio_set_set(struct gpio_chip *gc, unsigned int gpio, int val)
> +static int bgpio_set_set(struct gpio_chip *gc, unsigned int gpio, int val)
>  {
>  	unsigned long mask = bgpio_line2mask(gc, gpio);
>  	unsigned long flags;
> @@ -258,6 +263,8 @@ static void bgpio_set_set(struct gpio_chip *gc, unsigned int gpio, int val)
>  	gc->write_reg(gc->reg_set, gc->bgpio_data);
>  
>  	raw_spin_unlock_irqrestore(&gc->bgpio_lock, flags);
> +
> +	return 0;
>  }
>  
>  static void bgpio_multiple_get_masks(struct gpio_chip *gc,
> @@ -298,21 +305,25 @@ static void bgpio_set_multiple_single_reg(struct gpio_chip *gc,
>  	raw_spin_unlock_irqrestore(&gc->bgpio_lock, flags);
>  }
>  
> -static void bgpio_set_multiple(struct gpio_chip *gc, unsigned long *mask,
> +static int bgpio_set_multiple(struct gpio_chip *gc, unsigned long *mask,
>  			       unsigned long *bits)
>  {
>  	bgpio_set_multiple_single_reg(gc, mask, bits, gc->reg_dat);
> +
> +	return 0;
>  }
>  
> -static void bgpio_set_multiple_set(struct gpio_chip *gc, unsigned long *mask,
> -				   unsigned long *bits)
> +static int bgpio_set_multiple_set(struct gpio_chip *gc, unsigned long *mask,
> +				  unsigned long *bits)
>  {
>  	bgpio_set_multiple_single_reg(gc, mask, bits, gc->reg_set);
> +
> +	return 0;
>  }
>  
> -static void bgpio_set_multiple_with_clear(struct gpio_chip *gc,
> -					  unsigned long *mask,
> -					  unsigned long *bits)
> +static int bgpio_set_multiple_with_clear(struct gpio_chip *gc,
> +					 unsigned long *mask,
> +					 unsigned long *bits)
>  {
>  	unsigned long set_mask, clear_mask;
>  
> @@ -322,6 +333,8 @@ static void bgpio_set_multiple_with_clear(struct gpio_chip *gc,
>  		gc->write_reg(gc->reg_set, set_mask);
>  	if (clear_mask)
>  		gc->write_reg(gc->reg_clr, clear_mask);
> +
> +	return 0;
>  }
>  
>  static int bgpio_dir_return(struct gpio_chip *gc, unsigned int gpio, bool dir_out)
> @@ -510,18 +523,18 @@ static int bgpio_setup_io(struct gpio_chip *gc,
>  	if (set && clr) {
>  		gc->reg_set = set;
>  		gc->reg_clr = clr;
> -		gc->set = bgpio_set_with_clear;
> -		gc->set_multiple = bgpio_set_multiple_with_clear;
> +		gc->set_rv = bgpio_set_with_clear;
> +		gc->set_multiple_rv = bgpio_set_multiple_with_clear;
>  	} else if (set && !clr) {
>  		gc->reg_set = set;
> -		gc->set = bgpio_set_set;
> -		gc->set_multiple = bgpio_set_multiple_set;
> +		gc->set_rv = bgpio_set_set;
> +		gc->set_multiple_rv = bgpio_set_multiple_set;
>  	} else if (flags & BGPIOF_NO_OUTPUT) {
> -		gc->set = bgpio_set_none;
> -		gc->set_multiple = NULL;
> +		gc->set_rv = bgpio_set_none;
> +		gc->set_multiple_rv = NULL;
>  	} else {
> -		gc->set = bgpio_set;
> -		gc->set_multiple = bgpio_set_multiple;
> +		gc->set_rv = bgpio_set;
> +		gc->set_multiple_rv = bgpio_set_multiple;
>  	}
>  
>  	if (!(flags & BGPIOF_UNREADABLE_REG_SET) &&
> @@ -654,7 +667,7 @@ int bgpio_init(struct gpio_chip *gc, struct device *dev,
>  	}
>  
>  	gc->bgpio_data = gc->read_reg(gc->reg_dat);
> -	if (gc->set == bgpio_set_set &&
> +	if (gc->set_rv == bgpio_set_set &&
>  			!(flags & BGPIOF_UNREADABLE_REG_SET))
>  		gc->bgpio_data = gc->read_reg(gc->reg_set);
>  
> 
> -- 
> 2.48.1
> 

Isn't this missing to convert gc->set() to gc-set_rv() in several
places?

Without the attached diff I get a null pointer reference on e.g. the
spacemit k1 driver.

Regards,
Klara Modin

--

diff --git a/drivers/gpio/gpio-mmio.c b/drivers/gpio/gpio-mmio.c
index 9169eccadb23..57622f45d33e 100644
--- a/drivers/gpio/gpio-mmio.c
+++ b/drivers/gpio/gpio-mmio.c
@@ -362,7 +362,7 @@ static int bgpio_dir_out_err(struct gpio_chip *gc, unsigned int gpio,
 static int bgpio_simple_dir_out(struct gpio_chip *gc, unsigned int gpio,
 				int val)
 {
-	gc->set(gc, gpio, val);
+	gc->set_rv(gc, gpio, val);
 
 	return bgpio_dir_return(gc, gpio, true);
 }
@@ -427,14 +427,14 @@ static int bgpio_dir_out_dir_first(struct gpio_chip *gc, unsigned int gpio,
 				   int val)
 {
 	bgpio_dir_out(gc, gpio, val);
-	gc->set(gc, gpio, val);
+	gc->set_rv(gc, gpio, val);
 	return bgpio_dir_return(gc, gpio, true);
 }
 
 static int bgpio_dir_out_val_first(struct gpio_chip *gc, unsigned int gpio,
 				   int val)
 {
-	gc->set(gc, gpio, val);
+	gc->set_rv(gc, gpio, val);
 	bgpio_dir_out(gc, gpio, val);
 	return bgpio_dir_return(gc, gpio, true);
 }

^ permalink raw reply related	[flat|nested] 25+ messages in thread

* Re: [PATCH 01/12] gpio: mmio: use new GPIO line value setter callbacks
  2025-06-18 11:59   ` Klara Modin
@ 2025-06-18 12:34     ` Bartosz Golaszewski
  0 siblings, 0 replies; 25+ messages in thread
From: Bartosz Golaszewski @ 2025-06-18 12:34 UTC (permalink / raw)
  To: Klara Modin
  Cc: Linus Walleij, Marek Behún, Conor Dooley, Daire McNamara,
	Daniel Palmer, Romain Perier, Avi Fishman, Tomer Maimon,
	Tali Perry, Patrick Venture, Nancy Yuen, Benjamin Fair,
	Grygorii Strashko, Santosh Shilimkar, Kevin Hilman, linux-gpio,
	linux-kernel, linux-riscv, linux-arm-kernel, openbmc, linux-omap,
	Bartosz Golaszewski

On Wed, Jun 18, 2025 at 1:59 PM Klara Modin <klarasmodin@gmail.com> wrote:
>
> Hi,
>
> On 2025-06-10 14:33:11 +0200, 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>
> > ---
> >  drivers/gpio/gpio-mmio.c | 53 ++++++++++++++++++++++++++++++------------------
> >  1 file changed, 33 insertions(+), 20 deletions(-)
> >
> > diff --git a/drivers/gpio/gpio-mmio.c b/drivers/gpio/gpio-mmio.c
> > index 4841e4ebe7a67d0f954e9a6f995ec5758f124edd..9169eccadb238efe944d494054b1e009f16eee7f 100644
> > --- a/drivers/gpio/gpio-mmio.c
> > +++ b/drivers/gpio/gpio-mmio.c
> > @@ -211,11 +211,12 @@ static int bgpio_get_multiple_be(struct gpio_chip *gc, unsigned long *mask,
> >       return 0;
> >  }
> >
> > -static void bgpio_set_none(struct gpio_chip *gc, unsigned int gpio, int val)
> > +static int bgpio_set_none(struct gpio_chip *gc, unsigned int gpio, int val)
> >  {
> > +     return 0;
> >  }
> >
> > -static void bgpio_set(struct gpio_chip *gc, unsigned int gpio, int val)
> > +static int bgpio_set(struct gpio_chip *gc, unsigned int gpio, int val)
> >  {
> >       unsigned long mask = bgpio_line2mask(gc, gpio);
> >       unsigned long flags;
> > @@ -230,10 +231,12 @@ static void bgpio_set(struct gpio_chip *gc, unsigned int gpio, int val)
> >       gc->write_reg(gc->reg_dat, gc->bgpio_data);
> >
> >       raw_spin_unlock_irqrestore(&gc->bgpio_lock, flags);
> > +
> > +     return 0;
> >  }
> >
> > -static void bgpio_set_with_clear(struct gpio_chip *gc, unsigned int gpio,
> > -                              int val)
> > +static int bgpio_set_with_clear(struct gpio_chip *gc, unsigned int gpio,
> > +                             int val)
> >  {
> >       unsigned long mask = bgpio_line2mask(gc, gpio);
> >
> > @@ -241,9 +244,11 @@ static void bgpio_set_with_clear(struct gpio_chip *gc, unsigned int gpio,
> >               gc->write_reg(gc->reg_set, mask);
> >       else
> >               gc->write_reg(gc->reg_clr, mask);
> > +
> > +     return 0;
> >  }
> >
> > -static void bgpio_set_set(struct gpio_chip *gc, unsigned int gpio, int val)
> > +static int bgpio_set_set(struct gpio_chip *gc, unsigned int gpio, int val)
> >  {
> >       unsigned long mask = bgpio_line2mask(gc, gpio);
> >       unsigned long flags;
> > @@ -258,6 +263,8 @@ static void bgpio_set_set(struct gpio_chip *gc, unsigned int gpio, int val)
> >       gc->write_reg(gc->reg_set, gc->bgpio_data);
> >
> >       raw_spin_unlock_irqrestore(&gc->bgpio_lock, flags);
> > +
> > +     return 0;
> >  }
> >
> >  static void bgpio_multiple_get_masks(struct gpio_chip *gc,
> > @@ -298,21 +305,25 @@ static void bgpio_set_multiple_single_reg(struct gpio_chip *gc,
> >       raw_spin_unlock_irqrestore(&gc->bgpio_lock, flags);
> >  }
> >
> > -static void bgpio_set_multiple(struct gpio_chip *gc, unsigned long *mask,
> > +static int bgpio_set_multiple(struct gpio_chip *gc, unsigned long *mask,
> >                              unsigned long *bits)
> >  {
> >       bgpio_set_multiple_single_reg(gc, mask, bits, gc->reg_dat);
> > +
> > +     return 0;
> >  }
> >
> > -static void bgpio_set_multiple_set(struct gpio_chip *gc, unsigned long *mask,
> > -                                unsigned long *bits)
> > +static int bgpio_set_multiple_set(struct gpio_chip *gc, unsigned long *mask,
> > +                               unsigned long *bits)
> >  {
> >       bgpio_set_multiple_single_reg(gc, mask, bits, gc->reg_set);
> > +
> > +     return 0;
> >  }
> >
> > -static void bgpio_set_multiple_with_clear(struct gpio_chip *gc,
> > -                                       unsigned long *mask,
> > -                                       unsigned long *bits)
> > +static int bgpio_set_multiple_with_clear(struct gpio_chip *gc,
> > +                                      unsigned long *mask,
> > +                                      unsigned long *bits)
> >  {
> >       unsigned long set_mask, clear_mask;
> >
> > @@ -322,6 +333,8 @@ static void bgpio_set_multiple_with_clear(struct gpio_chip *gc,
> >               gc->write_reg(gc->reg_set, set_mask);
> >       if (clear_mask)
> >               gc->write_reg(gc->reg_clr, clear_mask);
> > +
> > +     return 0;
> >  }
> >
> >  static int bgpio_dir_return(struct gpio_chip *gc, unsigned int gpio, bool dir_out)
> > @@ -510,18 +523,18 @@ static int bgpio_setup_io(struct gpio_chip *gc,
> >       if (set && clr) {
> >               gc->reg_set = set;
> >               gc->reg_clr = clr;
> > -             gc->set = bgpio_set_with_clear;
> > -             gc->set_multiple = bgpio_set_multiple_with_clear;
> > +             gc->set_rv = bgpio_set_with_clear;
> > +             gc->set_multiple_rv = bgpio_set_multiple_with_clear;
> >       } else if (set && !clr) {
> >               gc->reg_set = set;
> > -             gc->set = bgpio_set_set;
> > -             gc->set_multiple = bgpio_set_multiple_set;
> > +             gc->set_rv = bgpio_set_set;
> > +             gc->set_multiple_rv = bgpio_set_multiple_set;
> >       } else if (flags & BGPIOF_NO_OUTPUT) {
> > -             gc->set = bgpio_set_none;
> > -             gc->set_multiple = NULL;
> > +             gc->set_rv = bgpio_set_none;
> > +             gc->set_multiple_rv = NULL;
> >       } else {
> > -             gc->set = bgpio_set;
> > -             gc->set_multiple = bgpio_set_multiple;
> > +             gc->set_rv = bgpio_set;
> > +             gc->set_multiple_rv = bgpio_set_multiple;
> >       }
> >
> >       if (!(flags & BGPIOF_UNREADABLE_REG_SET) &&
> > @@ -654,7 +667,7 @@ int bgpio_init(struct gpio_chip *gc, struct device *dev,
> >       }
> >
> >       gc->bgpio_data = gc->read_reg(gc->reg_dat);
> > -     if (gc->set == bgpio_set_set &&
> > +     if (gc->set_rv == bgpio_set_set &&
> >                       !(flags & BGPIOF_UNREADABLE_REG_SET))
> >               gc->bgpio_data = gc->read_reg(gc->reg_set);
> >
> >
> > --
> > 2.48.1
> >
>
> Isn't this missing to convert gc->set() to gc-set_rv() in several
> places?
>
> Without the attached diff I get a null pointer reference on e.g. the
> spacemit k1 driver.
>

Ah, yes, sorry for this and thanks for the catch. I will send a follow-up.

Bartosz

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [PATCH 01/12] gpio: mmio: use new GPIO line value setter callbacks
  2025-06-10 12:33 ` [PATCH 01/12] gpio: mmio: use new GPIO line value setter callbacks Bartosz Golaszewski
  2025-06-10 21:16   ` Linus Walleij
  2025-06-18 11:59   ` Klara Modin
@ 2025-06-18 16:21   ` Mark Brown
  2025-06-18 16:24     ` Bartosz Golaszewski
       [not found]   ` <CGME20250618164320eucas1p28174732f38fd279fbba72f07887e5da5@eucas1p2.samsung.com>
  3 siblings, 1 reply; 25+ messages in thread
From: Mark Brown @ 2025-06-18 16:21 UTC (permalink / raw)
  To: Bartosz Golaszewski
  Cc: Linus Walleij, Marek Behún, Conor Dooley, Daire McNamara,
	Daniel Palmer, Romain Perier, Avi Fishman, Tomer Maimon,
	Tali Perry, Patrick Venture, Nancy Yuen, Benjamin Fair,
	Grygorii Strashko, Santosh Shilimkar, Kevin Hilman, linux-gpio,
	linux-kernel, linux-riscv, linux-arm-kernel, openbmc, linux-omap,
	Bartosz Golaszewski

[-- Attachment #1: Type: text/plain, Size: 12635 bytes --]

On Tue, Jun 10, 2025 at 02:33:11PM +0200, 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.

I'm seeing boot failures on a UDOOq (an i.MX6 based board) in -next
today which bisect to this patch (in -next as b908d35d0003cc7).  We get
a NULL pointer dereference during boot while probing the poweroff driver
for the system:

[    0.443319] Unable to handle kernel NULL pointer dereference at virtual address 00000000 when execute
[    0.443330] [00000000] *pgd=00000000
[    0.443347] Internal error: Oops: 80000005 [#2] SMP ARM

...

[    2.522761]  bgpio_dir_out_val_first from gpiod_direction_output_raw_commit+0x194/0x390
[    2.533330]  gpiod_direction_output_raw_commit from gpiod_find_and_request+0x134/0x434
[    2.541276]  gpiod_find_and_request from gpiod_get_index+0x58/0x70
[    2.547482]  gpiod_get_index from devm_gpiod_get_index+0x10/0x78
[    2.553516]  devm_gpiod_get_index from gpio_poweroff_probe+0xe8/0x174
[    2.559990]  gpio_poweroff_probe from platform_probe+0x5c/0xb4

Full boot log:

    https://lava.sirena.org.uk/scheduler/job/1485011#L752

bisect log:

# bad: [6e5ab6fee68df8c40b338baeae6e269fa25a7e25] Add linux-next specific files for 20250618
# good: [94466168a05ed9aa92afdd54efcd89b3b227650d] Merge branch 'for-linux-next-fixes' of https://gitlab.freedesktop.org/drm/misc/kernel.git
# good: [3e1c01d06e1f52f78fe00ef26a9cf80dbb0a3115] regulator: rpi-panel-v2: Add shutdown hook
# good: [d9f38d9824bfb1b046d2e720349d2f45959ab184] ASoC: tegra: AHUB: Remove unneeded semicolon
# good: [dce4bc30f42d313b4dc5832316196411b7f07ad0] spi: spi-fsl-dspi: Revert unintended dependency change in config SPI_FSL_DSPI
# good: [47972c1c3315672352f25c68f91dd88543541947] ASoC: Intel: Replace deprecated strcpy() with strscpy()
# good: [5eb8a0d7733d4cd32a776acf1d1aa1c7c01c8a14] ASoC: hdmi-codec: use SND_JACK_AVOUT as jack status
# good: [bb8d8ba4715cb8f997d63d90ba935f6073595df5] ASoC: mediatek: mt8183-afe-pcm: use local `dev` pointer in driver callbacks
# good: [8a5a5cecb79058b608e5562d8998123a3adb313c] ASoC: tas2781: Move the "include linux/debugfs.h" into tas2781.h
# good: [a4eb71ff98c4792f441f108910bd829da7a04092] regulator: rpi-panel-v2: Fix missing OF dependency
# good: [6cafcc53eb5fffd9b9bdfde700bb9bad21e98ed3] spi: spi-mt65xx: Add support for MT6991 Dimensity 9400 SPI IPM
# good: [7e10d7242ea8a5947878880b912ffa5806520705] ASoC: ops: dynamically allocate struct snd_ctl_elem_value
# good: [d6fa0ca959db8efd4462d7beef4bdc5568640fd0] regulator: rpi-panel-v2: Add missing GPIOLIB dependency
# good: [d49305862fdc4d9ff1b1093b4ed7d8e0cb9971b4] regulator: rpi-panel-v2: Add regulator for 7" Raspberry Pi 720x1280
# good: [6ba68e5aa9d5d15c8877a655db279fcfc0b38b04] ASoC: renesas: msiof: Convert to <linux/spi/sh_msiof.h>
# good: [1f5cdb6ab45e1c06ae0953609acbb52f8946b3e8] ASoC: codecs: Add support for Richtek RTQ9124
# good: [c459262159f39e6e6336797feb975799344b749b] spi: spi-pci1xxxx: Add support for 25MHz Clock frequency in C0
# good: [548d770c330cd1027549947a6ea899c56b5bc4e4] regulator: pca9450: Add support for mode operations
# good: [03b778d1994827ea5cc971dbdfbb457bbb7bfa5d] ASOC: rockchip: Use helper function devm_clk_get_enabled()
# good: [267be32b0a7b70cc777f8a46f0904c92c0521d89] ASoC: remove component->id
# good: [111a2c8ab462d77d1519b71b46f13ae1b46920b4] ASoC: imx-card: Use helper function for_each_child_of_node_scoped()
# good: [f6f914893d478b7ba08e5c375de1ced16deb5e92] ASoC: dt-bindings: tas57xx: add tas5753 compatibility
# good: [9a30e332c36c52e92e5316b4a012d45284dedeb5] spi: spi-fsl-dspi: Enable support for S32G platforms
# good: [c95e925daa434ee1a40a86aec6476ce588e4bd77] ASoC: Intel: avs: Add rt5640 machine board
# good: [c8c4694ede7ed42d8d4db0e8927dea9839a3e248] regmap: kunit: Constify regmap_range_cfg array
# good: [e6e8897995a9e6028563ce36c27877e5478c8571] ASoC: qcom: sm8250: Add Fairphone 5 soundcard compatible
# good: [b9ecde0bcf6a99a3ff08496d4ba90a385ebbfd68] ASoC: codecs: wcd939x: Add VDD_PX supply
# good: [ac209bde018fd320b79976657a44c23113181af6] ASoC: tas2781: Drop the unnecessary symbol imply
# good: [ece5d881004f041c2e1493436409dbcbea3ad5f8] ASoC: codecs: wcd939x: Drop unused 'struct wcd939x_priv' fields
# good: [7e17e80c3a7eb2734795f66ba946f933412d597f] Merge branch 'for-6.14/stack-order' into for-next
git bisect start '6e5ab6fee68df8c40b338baeae6e269fa25a7e25' '94466168a05ed9aa92afdd54efcd89b3b227650d' '3e1c01d06e1f52f78fe00ef26a9cf80dbb0a3115' 'd9f38d9824bfb1b046d2e720349d2f45959ab184' 'dce4bc30f42d313b4dc5832316196411b7f07ad0' '47972c1c3315672352f25c68f91dd88543541947' '5eb8a0d7733d4cd32a776acf1d1aa1c7c01c8a14' 'bb8d8ba4715cb8f997d63d90ba935f6073595df5' '8a5a5cecb79058b608e5562d8998123a3adb313c' 'a4eb71ff98c4792f441f108910bd829da7a04092' '6cafcc53eb5fffd9b9bdfde700bb9bad21e98ed3' '7e10d7242ea8a5947878880b912ffa5806520705' 'd6fa0ca959db8efd4462d7beef4bdc5568640fd0' 'd49305862fdc4d9ff1b1093b4ed7d8e0cb9971b4' '6ba68e5aa9d5d15c8877a655db279fcfc0b38b04' '1f5cdb6ab45e1c06ae0953609acbb52f8946b3e8' 'c459262159f39e6e6336797feb975799344b749b' '548d770c330cd1027549947a6ea899c56b5bc4e4' '03b778d1994827ea5cc971dbdfbb457bbb7bfa5d' '267be32b0a7b70cc777f8a46f0904c92c0521d89' '111a2c8ab462d77d1519b71b46f13ae1b46920b4' 'f6f914893d478b7ba08e5c375de1ced16deb5e92' '9a30e332c36c52e92e5316b4a012d45284dedeb5' 'c95e925daa434ee1a40a86aec6476ce588e4bd77' 'c8c4694ede7ed42d8d4db0e8927dea9839a3e248' 'e6e8897995a9e6028563ce36c27877e5478c8571' 'b9ecde0bcf6a99a3ff08496d4ba90a385ebbfd68' 'ac209bde018fd320b79976657a44c23113181af6' 'ece5d881004f041c2e1493436409dbcbea3ad5f8' '7e17e80c3a7eb2734795f66ba946f933412d597f'
# test job: [3e1c01d06e1f52f78fe00ef26a9cf80dbb0a3115] https://lava.sirena.org.uk/scheduler/job/1481662
# test job: [d9f38d9824bfb1b046d2e720349d2f45959ab184] https://lava.sirena.org.uk/scheduler/job/1481666
# test job: [dce4bc30f42d313b4dc5832316196411b7f07ad0] https://lava.sirena.org.uk/scheduler/job/1479434
# test job: [47972c1c3315672352f25c68f91dd88543541947] https://lava.sirena.org.uk/scheduler/job/1479486
# test job: [5eb8a0d7733d4cd32a776acf1d1aa1c7c01c8a14] https://lava.sirena.org.uk/scheduler/job/1474632
# test job: [bb8d8ba4715cb8f997d63d90ba935f6073595df5] https://lava.sirena.org.uk/scheduler/job/1472186
# test job: [8a5a5cecb79058b608e5562d8998123a3adb313c] https://lava.sirena.org.uk/scheduler/job/1471943
# test job: [a4eb71ff98c4792f441f108910bd829da7a04092] https://lava.sirena.org.uk/scheduler/job/1469028
# test job: [6cafcc53eb5fffd9b9bdfde700bb9bad21e98ed3] https://lava.sirena.org.uk/scheduler/job/1469031
# test job: [7e10d7242ea8a5947878880b912ffa5806520705] https://lava.sirena.org.uk/scheduler/job/1466093
# test job: [d6fa0ca959db8efd4462d7beef4bdc5568640fd0] https://lava.sirena.org.uk/scheduler/job/1464729
# test job: [d49305862fdc4d9ff1b1093b4ed7d8e0cb9971b4] https://lava.sirena.org.uk/scheduler/job/1463110
# test job: [6ba68e5aa9d5d15c8877a655db279fcfc0b38b04] https://lava.sirena.org.uk/scheduler/job/1463434
# test job: [1f5cdb6ab45e1c06ae0953609acbb52f8946b3e8] https://lava.sirena.org.uk/scheduler/job/1463022
# test job: [c459262159f39e6e6336797feb975799344b749b] https://lava.sirena.org.uk/scheduler/job/1461222
# test job: [548d770c330cd1027549947a6ea899c56b5bc4e4] https://lava.sirena.org.uk/scheduler/job/1460610
# test job: [03b778d1994827ea5cc971dbdfbb457bbb7bfa5d] https://lava.sirena.org.uk/scheduler/job/1461219
# test job: [267be32b0a7b70cc777f8a46f0904c92c0521d89] https://lava.sirena.org.uk/scheduler/job/1461158
# test job: [111a2c8ab462d77d1519b71b46f13ae1b46920b4] https://lava.sirena.org.uk/scheduler/job/1459889
# test job: [f6f914893d478b7ba08e5c375de1ced16deb5e92] https://lava.sirena.org.uk/scheduler/job/1460442
# test job: [9a30e332c36c52e92e5316b4a012d45284dedeb5] https://lava.sirena.org.uk/scheduler/job/1460919
# test job: [c95e925daa434ee1a40a86aec6476ce588e4bd77] https://lava.sirena.org.uk/scheduler/job/1461120
# test job: [c8c4694ede7ed42d8d4db0e8927dea9839a3e248] https://lava.sirena.org.uk/scheduler/job/1460230
# test job: [e6e8897995a9e6028563ce36c27877e5478c8571] https://lava.sirena.org.uk/scheduler/job/1460605
# test job: [b9ecde0bcf6a99a3ff08496d4ba90a385ebbfd68] https://lava.sirena.org.uk/scheduler/job/1460221
# test job: [ac209bde018fd320b79976657a44c23113181af6] https://lava.sirena.org.uk/scheduler/job/1460665
# test job: [ece5d881004f041c2e1493436409dbcbea3ad5f8] https://lava.sirena.org.uk/scheduler/job/1461108
# test job: [7e17e80c3a7eb2734795f66ba946f933412d597f] https://lava.sirena.org.uk/scheduler/job/1127031
# test job: [6e5ab6fee68df8c40b338baeae6e269fa25a7e25] https://lava.sirena.org.uk/scheduler/job/1485029
# bad: [6e5ab6fee68df8c40b338baeae6e269fa25a7e25] Add linux-next specific files for 20250618
git bisect bad 6e5ab6fee68df8c40b338baeae6e269fa25a7e25
# test job: [5f792b60601e6bf7a9fb037edfc565c3aae4c12d] https://lava.sirena.org.uk/scheduler/job/1485099
# good: [5f792b60601e6bf7a9fb037edfc565c3aae4c12d] Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next.git
git bisect good 5f792b60601e6bf7a9fb037edfc565c3aae4c12d
# test job: [4753f57fb1c41066519ab573a011801bf0553cbc] https://lava.sirena.org.uk/scheduler/job/1485186
# good: [4753f57fb1c41066519ab573a011801bf0553cbc] Merge branch 'drm-xe-next' of https://gitlab.freedesktop.org/drm/xe/kernel
git bisect good 4753f57fb1c41066519ab573a011801bf0553cbc
# test job: [b8dcd86b8eadb53eb153ba69434d93f954f4e2d8] https://lava.sirena.org.uk/scheduler/job/1485312
# good: [b8dcd86b8eadb53eb153ba69434d93f954f4e2d8] Merge branch 'driver-core-next' of git://git.kernel.org/pub/scm/linux/kernel/git/driver-core/driver-core.git
git bisect good b8dcd86b8eadb53eb153ba69434d93f954f4e2d8
# test job: [86f5e3b87e543714db4274eaaac4fe877e1943b3] https://lava.sirena.org.uk/scheduler/job/1485356
# good: [86f5e3b87e543714db4274eaaac4fe877e1943b3] Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/remoteproc/linux.git
git bisect good 86f5e3b87e543714db4274eaaac4fe877e1943b3
# test job: [6f73eec838ac00ec82b6808bf458cfead784cf21] https://lava.sirena.org.uk/scheduler/job/1485541
# bad: [6f73eec838ac00ec82b6808bf458cfead784cf21] Merge branch 'mhi-next' of git://git.kernel.org/pub/scm/linux/kernel/git/mani/mhi.git
git bisect bad 6f73eec838ac00ec82b6808bf458cfead784cf21
# test job: [3cbc2e700ace888f02a6059c9f865ef1a0743c29] https://lava.sirena.org.uk/scheduler/job/1485816
# bad: [3cbc2e700ace888f02a6059c9f865ef1a0743c29] Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/pinctrl/intel.git
git bisect bad 3cbc2e700ace888f02a6059c9f865ef1a0743c29
# test job: [aaec273c7b511a7826df09123a1fd6e4896c1bfd] https://lava.sirena.org.uk/scheduler/job/1486062
# bad: [aaec273c7b511a7826df09123a1fd6e4896c1bfd] gpio: nomadik: use new GPIO line value setter callbacks
git bisect bad aaec273c7b511a7826df09123a1fd6e4896c1bfd
# test job: [7b2c2f1eb3914f5214a5b2ae966d7d7bb0057582] https://lava.sirena.org.uk/scheduler/job/1486129
# good: [7b2c2f1eb3914f5214a5b2ae966d7d7bb0057582] gpio: Use dev_fwnode() where applicable across drivers
git bisect good 7b2c2f1eb3914f5214a5b2ae966d7d7bb0057582
# test job: [d27746181905c256eced857f4b2c051ac44b0b45] https://lava.sirena.org.uk/scheduler/job/1486292
# bad: [d27746181905c256eced857f4b2c051ac44b0b45] gpio: mm-lantiq: use new GPIO line value setter callbacks
git bisect bad d27746181905c256eced857f4b2c051ac44b0b45
# test job: [367864935785382bab95f5e5a691535d28f5a21b] https://lava.sirena.org.uk/scheduler/job/1486339
# good: [367864935785382bab95f5e5a691535d28f5a21b] gpio: raspberrypi-exp: use new GPIO line value setter callbacks
git bisect good 367864935785382bab95f5e5a691535d28f5a21b
# test job: [b908d35d0003cc75d4ebf7c24a61b07d34e7f5dc] https://lava.sirena.org.uk/scheduler/job/1486428
# bad: [b908d35d0003cc75d4ebf7c24a61b07d34e7f5dc] gpio: mmio: use new GPIO line value setter callbacks
git bisect bad b908d35d0003cc75d4ebf7c24a61b07d34e7f5dc
# test job: [d03b53c9139352b744ed007bf562bd35517bacff] https://lava.sirena.org.uk/scheduler/job/1486540
# good: [d03b53c9139352b744ed007bf562bd35517bacff] dt-bindings: gpio: gpio-xilinx: Mark clocks as required property
git bisect good d03b53c9139352b744ed007bf562bd35517bacff
# first bad commit: [b908d35d0003cc75d4ebf7c24a61b07d34e7f5dc] gpio: mmio: use new GPIO line value setter callbacks

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [PATCH 01/12] gpio: mmio: use new GPIO line value setter callbacks
  2025-06-18 16:21   ` Mark Brown
@ 2025-06-18 16:24     ` Bartosz Golaszewski
  0 siblings, 0 replies; 25+ messages in thread
From: Bartosz Golaszewski @ 2025-06-18 16:24 UTC (permalink / raw)
  To: Mark Brown
  Cc: Linus Walleij, Marek Behún, Conor Dooley, Daire McNamara,
	Daniel Palmer, Romain Perier, Avi Fishman, Tomer Maimon,
	Tali Perry, Patrick Venture, Nancy Yuen, Benjamin Fair,
	Grygorii Strashko, Santosh Shilimkar, Kevin Hilman, linux-gpio,
	linux-kernel, linux-riscv, linux-arm-kernel, openbmc, linux-omap,
	Bartosz Golaszewski

On Wed, Jun 18, 2025 at 6:21 PM Mark Brown <broonie@kernel.org> wrote:
>
> On Tue, Jun 10, 2025 at 02:33:11PM +0200, 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.
>
> I'm seeing boot failures on a UDOOq (an i.MX6 based board) in -next
> today which bisect to this patch (in -next as b908d35d0003cc7).  We get
> a NULL pointer dereference during boot while probing the poweroff driver
> for the system:
>
> [    0.443319] Unable to handle kernel NULL pointer dereference at virtual address 00000000 when execute
> [    0.443330] [00000000] *pgd=00000000
> [    0.443347] Internal error: Oops: 80000005 [#2] SMP ARM
>
> ...
>
> [    2.522761]  bgpio_dir_out_val_first from gpiod_direction_output_raw_commit+0x194/0x390
> [    2.533330]  gpiod_direction_output_raw_commit from gpiod_find_and_request+0x134/0x434
> [    2.541276]  gpiod_find_and_request from gpiod_get_index+0x58/0x70
> [    2.547482]  gpiod_get_index from devm_gpiod_get_index+0x10/0x78
> [    2.553516]  devm_gpiod_get_index from gpio_poweroff_probe+0xe8/0x174
> [    2.559990]  gpio_poweroff_probe from platform_probe+0x5c/0xb4
>

Thanks, a patch[1] is already up for review. Please give it a try and
leave your Tested-by: if you can.

Bartosz

[1] https://lore.kernel.org/all/20250618-gpio-mmio-fix-setter-v1-2-2578ffb77019@linaro.org/

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [PATCH 01/12] gpio: mmio: use new GPIO line value setter callbacks
       [not found]   ` <CGME20250618164320eucas1p28174732f38fd279fbba72f07887e5da5@eucas1p2.samsung.com>
@ 2025-06-18 16:43     ` Marek Szyprowski
  2025-06-18 17:00       ` Bartosz Golaszewski
  0 siblings, 1 reply; 25+ messages in thread
From: Marek Szyprowski @ 2025-06-18 16:43 UTC (permalink / raw)
  To: Bartosz Golaszewski, Linus Walleij, Marek Behún,
	Conor Dooley, Daire McNamara, Daniel Palmer, Romain Perier,
	Avi Fishman, Tomer Maimon, Tali Perry, Patrick Venture,
	Nancy Yuen, Benjamin Fair, Grygorii Strashko, Santosh Shilimkar,
	Kevin Hilman
  Cc: linux-gpio, linux-kernel, linux-riscv, linux-arm-kernel, openbmc,
	linux-omap, Bartosz Golaszewski

On 10.06.2025 14:33, 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>
> ---
>   drivers/gpio/gpio-mmio.c | 53 ++++++++++++++++++++++++++++++------------------
>   1 file changed, 33 insertions(+), 20 deletions(-)
>
> diff --git a/drivers/gpio/gpio-mmio.c b/drivers/gpio/gpio-mmio.c
> index 4841e4ebe7a67d0f954e9a6f995ec5758f124edd..9169eccadb238efe944d494054b1e009f16eee7f 100644
> --- a/drivers/gpio/gpio-mmio.c
> +++ b/drivers/gpio/gpio-mmio.c
> @@ -211,11 +211,12 @@ static int bgpio_get_multiple_be(struct gpio_chip *gc, unsigned long *mask,
>   	return 0;
>   }
>   
> -static void bgpio_set_none(struct gpio_chip *gc, unsigned int gpio, int val)
> +static int bgpio_set_none(struct gpio_chip *gc, unsigned int gpio, int val)
>   {
> +	return 0;
>   }
>   
> -static void bgpio_set(struct gpio_chip *gc, unsigned int gpio, int val)
> +static int bgpio_set(struct gpio_chip *gc, unsigned int gpio, int val)
>   {
>   	unsigned long mask = bgpio_line2mask(gc, gpio);
>   	unsigned long flags;
> @@ -230,10 +231,12 @@ static void bgpio_set(struct gpio_chip *gc, unsigned int gpio, int val)
>   	gc->write_reg(gc->reg_dat, gc->bgpio_data);
>   
>   	raw_spin_unlock_irqrestore(&gc->bgpio_lock, flags);
> +
> +	return 0;
>   }
>   
> -static void bgpio_set_with_clear(struct gpio_chip *gc, unsigned int gpio,
> -				 int val)
> +static int bgpio_set_with_clear(struct gpio_chip *gc, unsigned int gpio,
> +				int val)
>   {
>   	unsigned long mask = bgpio_line2mask(gc, gpio);
>   
> @@ -241,9 +244,11 @@ static void bgpio_set_with_clear(struct gpio_chip *gc, unsigned int gpio,
>   		gc->write_reg(gc->reg_set, mask);
>   	else
>   		gc->write_reg(gc->reg_clr, mask);
> +
> +	return 0;
>   }
>   
> -static void bgpio_set_set(struct gpio_chip *gc, unsigned int gpio, int val)
> +static int bgpio_set_set(struct gpio_chip *gc, unsigned int gpio, int val)
>   {
>   	unsigned long mask = bgpio_line2mask(gc, gpio);
>   	unsigned long flags;
> @@ -258,6 +263,8 @@ static void bgpio_set_set(struct gpio_chip *gc, unsigned int gpio, int val)
>   	gc->write_reg(gc->reg_set, gc->bgpio_data);
>   
>   	raw_spin_unlock_irqrestore(&gc->bgpio_lock, flags);
> +
> +	return 0;
>   }
>   
>   static void bgpio_multiple_get_masks(struct gpio_chip *gc,
> @@ -298,21 +305,25 @@ static void bgpio_set_multiple_single_reg(struct gpio_chip *gc,
>   	raw_spin_unlock_irqrestore(&gc->bgpio_lock, flags);
>   }
>   
> -static void bgpio_set_multiple(struct gpio_chip *gc, unsigned long *mask,
> +static int bgpio_set_multiple(struct gpio_chip *gc, unsigned long *mask,
>   			       unsigned long *bits)
>   {
>   	bgpio_set_multiple_single_reg(gc, mask, bits, gc->reg_dat);
> +
> +	return 0;
>   }
>   
> -static void bgpio_set_multiple_set(struct gpio_chip *gc, unsigned long *mask,
> -				   unsigned long *bits)
> +static int bgpio_set_multiple_set(struct gpio_chip *gc, unsigned long *mask,
> +				  unsigned long *bits)
>   {
>   	bgpio_set_multiple_single_reg(gc, mask, bits, gc->reg_set);
> +
> +	return 0;
>   }
>   
> -static void bgpio_set_multiple_with_clear(struct gpio_chip *gc,
> -					  unsigned long *mask,
> -					  unsigned long *bits)
> +static int bgpio_set_multiple_with_clear(struct gpio_chip *gc,
> +					 unsigned long *mask,
> +					 unsigned long *bits)
>   {
>   	unsigned long set_mask, clear_mask;
>   
> @@ -322,6 +333,8 @@ static void bgpio_set_multiple_with_clear(struct gpio_chip *gc,
>   		gc->write_reg(gc->reg_set, set_mask);
>   	if (clear_mask)
>   		gc->write_reg(gc->reg_clr, clear_mask);
> +
> +	return 0;
>   }
>   
>   static int bgpio_dir_return(struct gpio_chip *gc, unsigned int gpio, bool dir_out)
> @@ -510,18 +523,18 @@ static int bgpio_setup_io(struct gpio_chip *gc,
>   	if (set && clr) {
>   		gc->reg_set = set;
>   		gc->reg_clr = clr;
> -		gc->set = bgpio_set_with_clear;
> -		gc->set_multiple = bgpio_set_multiple_with_clear;
> +		gc->set_rv = bgpio_set_with_clear;
> +		gc->set_multiple_rv = bgpio_set_multiple_with_clear;
>   	} else if (set && !clr) {
>   		gc->reg_set = set;
> -		gc->set = bgpio_set_set;
> -		gc->set_multiple = bgpio_set_multiple_set;
> +		gc->set_rv = bgpio_set_set;
> +		gc->set_multiple_rv = bgpio_set_multiple_set;
>   	} else if (flags & BGPIOF_NO_OUTPUT) {
> -		gc->set = bgpio_set_none;
> -		gc->set_multiple = NULL;
> +		gc->set_rv = bgpio_set_none;
> +		gc->set_multiple_rv = NULL;
>   	} else {
> -		gc->set = bgpio_set;
> -		gc->set_multiple = bgpio_set_multiple;
> +		gc->set_rv = bgpio_set;
> +		gc->set_multiple_rv = bgpio_set_multiple;
>   	}
>   
>   	if (!(flags & BGPIOF_UNREADABLE_REG_SET) &&
> @@ -654,7 +667,7 @@ int bgpio_init(struct gpio_chip *gc, struct device *dev,
>   	}
>   
>   	gc->bgpio_data = gc->read_reg(gc->reg_dat);
> -	if (gc->set == bgpio_set_set &&
> +	if (gc->set_rv == bgpio_set_set &&
>   			!(flags & BGPIOF_UNREADABLE_REG_SET))
>   		gc->bgpio_data = gc->read_reg(gc->reg_set);
>   


A few more changes are needed to avoid NULL pointer dereference 
(observed on RasbperrryPi5), because this driver calls ->set method 
internally:

diff --git a/drivers/gpio/gpio-mmio.c b/drivers/gpio/gpio-mmio.c
index 9169eccadb23..57622f45d33e 100644
--- a/drivers/gpio/gpio-mmio.c
+++ b/drivers/gpio/gpio-mmio.c
@@ -362,7 +362,7 @@ static int bgpio_dir_out_err(struct gpio_chip *gc, 
unsigned int gpio,
  static int bgpio_simple_dir_out(struct gpio_chip *gc, unsigned int gpio,
                                 int val)
  {
-       gc->set(gc, gpio, val);
+       gc->set_rv(gc, gpio, val);

         return bgpio_dir_return(gc, gpio, true);
  }
@@ -427,14 +427,14 @@ static int bgpio_dir_out_dir_first(struct 
gpio_chip *gc, unsigned int gpio,
                                    int val)
  {
         bgpio_dir_out(gc, gpio, val);
-       gc->set(gc, gpio, val);
+       gc->set_rv(gc, gpio, val);
         return bgpio_dir_return(gc, gpio, true);
  }

  static int bgpio_dir_out_val_first(struct gpio_chip *gc, unsigned int 
gpio,
                                    int val)
  {
-       gc->set(gc, gpio, val);
+       gc->set_rv(gc, gpio, val);
         bgpio_dir_out(gc, gpio, val);
         return bgpio_dir_return(gc, gpio, true);
  }

Do You want a formal patch with the above changes, or will You just 
amend them to the updated patch?

Best regards
-- 
Marek Szyprowski, PhD
Samsung R&D Institute Poland


^ permalink raw reply related	[flat|nested] 25+ messages in thread

* Re: [PATCH 01/12] gpio: mmio: use new GPIO line value setter callbacks
  2025-06-18 16:43     ` Marek Szyprowski
@ 2025-06-18 17:00       ` Bartosz Golaszewski
  0 siblings, 0 replies; 25+ messages in thread
From: Bartosz Golaszewski @ 2025-06-18 17:00 UTC (permalink / raw)
  To: Marek Szyprowski
  Cc: Linus Walleij, Marek Behún, Conor Dooley, Daire McNamara,
	Daniel Palmer, Romain Perier, Avi Fishman, Tomer Maimon,
	Tali Perry, Patrick Venture, Nancy Yuen, Benjamin Fair,
	Grygorii Strashko, Santosh Shilimkar, Kevin Hilman, linux-gpio,
	linux-kernel, linux-riscv, linux-arm-kernel, openbmc, linux-omap,
	Bartosz Golaszewski

On Wed, Jun 18, 2025 at 6:43 PM Marek Szyprowski
<m.szyprowski@samsung.com> wrote:
>
> A few more changes are needed to avoid NULL pointer dereference
> (observed on RasbperrryPi5), because this driver calls ->set method
> internally:
>
> diff --git a/drivers/gpio/gpio-mmio.c b/drivers/gpio/gpio-mmio.c
> index 9169eccadb23..57622f45d33e 100644
> --- a/drivers/gpio/gpio-mmio.c
> +++ b/drivers/gpio/gpio-mmio.c
> @@ -362,7 +362,7 @@ static int bgpio_dir_out_err(struct gpio_chip *gc,
> unsigned int gpio,
>   static int bgpio_simple_dir_out(struct gpio_chip *gc, unsigned int gpio,
>                                  int val)
>   {
> -       gc->set(gc, gpio, val);
> +       gc->set_rv(gc, gpio, val);
>
>          return bgpio_dir_return(gc, gpio, true);
>   }
> @@ -427,14 +427,14 @@ static int bgpio_dir_out_dir_first(struct
> gpio_chip *gc, unsigned int gpio,
>                                     int val)
>   {
>          bgpio_dir_out(gc, gpio, val);
> -       gc->set(gc, gpio, val);
> +       gc->set_rv(gc, gpio, val);
>          return bgpio_dir_return(gc, gpio, true);
>   }
>
>   static int bgpio_dir_out_val_first(struct gpio_chip *gc, unsigned int
> gpio,
>                                     int val)
>   {
> -       gc->set(gc, gpio, val);
> +       gc->set_rv(gc, gpio, val);
>          bgpio_dir_out(gc, gpio, val);
>          return bgpio_dir_return(gc, gpio, true);
>   }
>
> Do You want a formal patch with the above changes, or will You just
> amend them to the updated patch?
>

Thanks, a patch[1] is already up for review. Please give it a try and
leave your Tested-by: if you can.

Bartosz

[1] https://lore.kernel.org/all/20250618-gpio-mmio-fix-setter-v1-2-2578ffb77019@linaro.org/

^ permalink raw reply	[flat|nested] 25+ messages in thread

end of thread, other threads:[~2025-06-18 17:00 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-06-10 12:33 [PATCH 00/12] gpio: convert another round of GPIO drivers to using new line value setters Bartosz Golaszewski
2025-06-10 12:33 ` [PATCH 01/12] gpio: mmio: use new GPIO line value setter callbacks Bartosz Golaszewski
2025-06-10 21:16   ` Linus Walleij
2025-06-18 11:59   ` Klara Modin
2025-06-18 12:34     ` Bartosz Golaszewski
2025-06-18 16:21   ` Mark Brown
2025-06-18 16:24     ` Bartosz Golaszewski
     [not found]   ` <CGME20250618164320eucas1p28174732f38fd279fbba72f07887e5da5@eucas1p2.samsung.com>
2025-06-18 16:43     ` Marek Szyprowski
2025-06-18 17:00       ` Bartosz Golaszewski
2025-06-10 12:33 ` [PATCH 02/12] gpio: mm-lantiq: " Bartosz Golaszewski
2025-06-10 22:01   ` Linus Walleij
2025-06-10 12:33 ` [PATCH 03/12] gpio: moxtet: " Bartosz Golaszewski
2025-06-13 14:40   ` Marek Behún
2025-06-10 12:33 ` [PATCH 04/12] gpio: mpc5200: " Bartosz Golaszewski
2025-06-10 12:33 ` [PATCH 05/12] gpio: mpfs: " Bartosz Golaszewski
2025-06-10 12:33 ` [PATCH 06/12] gpio: mpsse: " Bartosz Golaszewski
2025-06-10 12:33 ` [PATCH 07/12] gpio: msc313: " Bartosz Golaszewski
2025-06-11 22:21   ` Daniel Palmer
2025-06-10 12:33 ` [PATCH 08/12] gpio: nomadik: " Bartosz Golaszewski
2025-06-10 22:06   ` Linus Walleij
2025-06-10 12:33 ` [PATCH 09/12] gpio: npcm-sgpio: " Bartosz Golaszewski
2025-06-10 12:33 ` [PATCH 10/12] gpio: octeon: " Bartosz Golaszewski
2025-06-10 12:33 ` [PATCH 11/12] gpio: omap: " Bartosz Golaszewski
2025-06-10 12:33 ` [PATCH 12/12] gpio: palmas: " Bartosz Golaszewski
2025-06-17  9:14 ` [PATCH 00/12] gpio: convert another round of GPIO drivers to using new line value setters Bartosz Golaszewski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).