* [PATCH 0/7] pinctrl: armada-37xx: a couple of small fixes
@ 2025-05-12 14:22 Gabor Juhos
2025-05-12 14:22 ` [PATCH 1/7] pinctrl: armada-37xx: use correct OUTPUT_VAL register for GPIOs > 31 Gabor Juhos
` (7 more replies)
0 siblings, 8 replies; 20+ messages in thread
From: Gabor Juhos @ 2025-05-12 14:22 UTC (permalink / raw)
To: Andrew Lunn, Gregory Clement, Sebastian Hesselbarth,
Linus Walleij, Bartosz Golaszewski
Cc: linux-arm-kernel, linux-gpio, linux-kernel, Gabor Juhos, stable,
Imre Kaloz
The series contains several small patches to fix various
issues in the pinctrl driver for Armada 3700.
Signed-off-by: Gabor Juhos <j4g8y7@gmail.com>
---
Gabor Juhos (7):
pinctrl: armada-37xx: use correct OUTPUT_VAL register for GPIOs > 31
pinctrl: armada-37xx: propagate error from armada_37xx_gpio_direction_output()
pinctrl: armada-37xx: set GPIO output value before setting direction
pinctrl: armada-37xx: propagate error from armada_37xx_gpio_get()
pinctrl: armada-37xx: propagate error from armada_37xx_pmx_gpio_set_direction()
pinctrl: armada-37xx: propagate error from armada_37xx_gpio_get_direction()
pinctrl: armada-37xx: propagate error from armada_37xx_pmx_set_by_name()
drivers/pinctrl/mvebu/pinctrl-armada-37xx.c | 35 ++++++++++++++++-------------
1 file changed, 20 insertions(+), 15 deletions(-)
---
base-commit: 82f2b0b97b36ee3fcddf0f0780a9a0825d52fec3
change-id: 20250512-pinctrl-a37xx-fixes-98fabc45cb11
Best regards,
--
Gabor Juhos <j4g8y7@gmail.com>
^ permalink raw reply [flat|nested] 20+ messages in thread
* [PATCH 1/7] pinctrl: armada-37xx: use correct OUTPUT_VAL register for GPIOs > 31
2025-05-12 14:22 [PATCH 0/7] pinctrl: armada-37xx: a couple of small fixes Gabor Juhos
@ 2025-05-12 14:22 ` Gabor Juhos
2025-05-12 21:28 ` Andrew Lunn
2025-05-12 14:22 ` [PATCH 2/7] pinctrl: armada-37xx: propagate error from armada_37xx_gpio_direction_output() Gabor Juhos
` (6 subsequent siblings)
7 siblings, 1 reply; 20+ messages in thread
From: Gabor Juhos @ 2025-05-12 14:22 UTC (permalink / raw)
To: Andrew Lunn, Gregory Clement, Sebastian Hesselbarth,
Linus Walleij, Bartosz Golaszewski
Cc: linux-arm-kernel, linux-gpio, linux-kernel, Gabor Juhos, stable,
Imre Kaloz
The controller has two consecutive OUTPUT_VAL registers and both
holds output value for 32 GPIOs. Due to a missing adjustment, the
current code always uses the first register while setting the
output value whereas it should use the second one for GPIOs > 31.
Add the missing armada_37xx_update_reg() call to adjust the register
according to the 'offset' parameter of the function to fix the issue.
Cc: stable@vger.kernel.org
Fixes: 6702abb3bf23 ("pinctrl: armada-37xx: Fix direction_output() callback behavior")
Signed-off-by: Gabor Juhos <j4g8y7@gmail.com>
Signed-off-by: Imre Kaloz <kaloz@openwrt.org>
---
drivers/pinctrl/mvebu/pinctrl-armada-37xx.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/pinctrl/mvebu/pinctrl-armada-37xx.c b/drivers/pinctrl/mvebu/pinctrl-armada-37xx.c
index 335744ac831057576473dd62c5533168b243a656..43034d29292687e875136aafa530b62479dc55ec 100644
--- a/drivers/pinctrl/mvebu/pinctrl-armada-37xx.c
+++ b/drivers/pinctrl/mvebu/pinctrl-armada-37xx.c
@@ -417,6 +417,7 @@ static int armada_37xx_gpio_direction_output(struct gpio_chip *chip,
unsigned int offset, int value)
{
struct armada_37xx_pinctrl *info = gpiochip_get_data(chip);
+ unsigned int val_offset = offset;
unsigned int reg = OUTPUT_EN;
unsigned int mask, val, ret;
@@ -429,6 +430,8 @@ static int armada_37xx_gpio_direction_output(struct gpio_chip *chip,
return ret;
reg = OUTPUT_VAL;
+ armada_37xx_update_reg(®, &val_offset);
+
val = value ? mask : 0;
regmap_update_bits(info->regmap, reg, mask, val);
--
2.49.0
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [PATCH 2/7] pinctrl: armada-37xx: propagate error from armada_37xx_gpio_direction_output()
2025-05-12 14:22 [PATCH 0/7] pinctrl: armada-37xx: a couple of small fixes Gabor Juhos
2025-05-12 14:22 ` [PATCH 1/7] pinctrl: armada-37xx: use correct OUTPUT_VAL register for GPIOs > 31 Gabor Juhos
@ 2025-05-12 14:22 ` Gabor Juhos
2025-05-12 21:29 ` Andrew Lunn
2025-05-12 14:22 ` [PATCH 3/7] pinctrl: armada-37xx: set GPIO output value before setting direction Gabor Juhos
` (5 subsequent siblings)
7 siblings, 1 reply; 20+ messages in thread
From: Gabor Juhos @ 2025-05-12 14:22 UTC (permalink / raw)
To: Andrew Lunn, Gregory Clement, Sebastian Hesselbarth,
Linus Walleij, Bartosz Golaszewski
Cc: linux-arm-kernel, linux-gpio, linux-kernel, Gabor Juhos, stable,
Imre Kaloz
The regmap_update_bits() function can fail, so propagate its error
up to the stack instead of silently ignoring that.
Cc: stable@vger.kernel.org
Fixes: 6702abb3bf23 ("pinctrl: armada-37xx: Fix direction_output() callback behavior")
Signed-off-by: Gabor Juhos <j4g8y7@gmail.com>
Signed-off-by: Imre Kaloz <kaloz@openwrt.org>
---
drivers/pinctrl/mvebu/pinctrl-armada-37xx.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/pinctrl/mvebu/pinctrl-armada-37xx.c b/drivers/pinctrl/mvebu/pinctrl-armada-37xx.c
index 43034d29292687e875136aafa530b62479dc55ec..e0c8eebf40588a1b49b80e2a1ddcc2a35fa7c07b 100644
--- a/drivers/pinctrl/mvebu/pinctrl-armada-37xx.c
+++ b/drivers/pinctrl/mvebu/pinctrl-armada-37xx.c
@@ -433,9 +433,7 @@ static int armada_37xx_gpio_direction_output(struct gpio_chip *chip,
armada_37xx_update_reg(®, &val_offset);
val = value ? mask : 0;
- regmap_update_bits(info->regmap, reg, mask, val);
-
- return 0;
+ return regmap_update_bits(info->regmap, reg, mask, val);
}
static int armada_37xx_gpio_get(struct gpio_chip *chip, unsigned int offset)
--
2.49.0
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [PATCH 3/7] pinctrl: armada-37xx: set GPIO output value before setting direction
2025-05-12 14:22 [PATCH 0/7] pinctrl: armada-37xx: a couple of small fixes Gabor Juhos
2025-05-12 14:22 ` [PATCH 1/7] pinctrl: armada-37xx: use correct OUTPUT_VAL register for GPIOs > 31 Gabor Juhos
2025-05-12 14:22 ` [PATCH 2/7] pinctrl: armada-37xx: propagate error from armada_37xx_gpio_direction_output() Gabor Juhos
@ 2025-05-12 14:22 ` Gabor Juhos
2025-05-12 21:30 ` Andrew Lunn
2025-05-12 14:22 ` [PATCH 4/7] pinctrl: armada-37xx: propagate error from armada_37xx_gpio_get() Gabor Juhos
` (4 subsequent siblings)
7 siblings, 1 reply; 20+ messages in thread
From: Gabor Juhos @ 2025-05-12 14:22 UTC (permalink / raw)
To: Andrew Lunn, Gregory Clement, Sebastian Hesselbarth,
Linus Walleij, Bartosz Golaszewski
Cc: linux-arm-kernel, linux-gpio, linux-kernel, Gabor Juhos, stable,
Imre Kaloz
Changing the direction before updating the output value in the
OUTPUT_VAL register may result in a glitch on the output line
if the previous value in the OUTPUT_VAL register is different
from the one we want to set.
In order to avoid that, update the output value before changing
the direction.
Cc: stable@vger.kernel.org
Fixes: 6702abb3bf23 ("pinctrl: armada-37xx: Fix direction_output() callback behavior")
Signed-off-by: Gabor Juhos <j4g8y7@gmail.com>
Signed-off-by: Imre Kaloz <kaloz@openwrt.org>
---
drivers/pinctrl/mvebu/pinctrl-armada-37xx.c | 15 +++++++--------
1 file changed, 7 insertions(+), 8 deletions(-)
diff --git a/drivers/pinctrl/mvebu/pinctrl-armada-37xx.c b/drivers/pinctrl/mvebu/pinctrl-armada-37xx.c
index e0c8eebf40588a1b49b80e2a1ddcc2a35fa7c07b..8d93d36af63ab9496376219454214c05db30971f 100644
--- a/drivers/pinctrl/mvebu/pinctrl-armada-37xx.c
+++ b/drivers/pinctrl/mvebu/pinctrl-armada-37xx.c
@@ -417,23 +417,22 @@ static int armada_37xx_gpio_direction_output(struct gpio_chip *chip,
unsigned int offset, int value)
{
struct armada_37xx_pinctrl *info = gpiochip_get_data(chip);
- unsigned int val_offset = offset;
- unsigned int reg = OUTPUT_EN;
+ unsigned int en_offset = offset;
+ unsigned int reg = OUTPUT_VAL;
unsigned int mask, val, ret;
armada_37xx_update_reg(®, &offset);
mask = BIT(offset);
+ val = value ? mask : 0;
- ret = regmap_update_bits(info->regmap, reg, mask, mask);
-
+ ret = regmap_update_bits(info->regmap, reg, mask, val);
if (ret)
return ret;
- reg = OUTPUT_VAL;
- armada_37xx_update_reg(®, &val_offset);
+ reg = OUTPUT_EN;
+ armada_37xx_update_reg(®, &en_offset);
- val = value ? mask : 0;
- return regmap_update_bits(info->regmap, reg, mask, val);
+ return regmap_update_bits(info->regmap, reg, mask, mask);
}
static int armada_37xx_gpio_get(struct gpio_chip *chip, unsigned int offset)
--
2.49.0
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [PATCH 4/7] pinctrl: armada-37xx: propagate error from armada_37xx_gpio_get()
2025-05-12 14:22 [PATCH 0/7] pinctrl: armada-37xx: a couple of small fixes Gabor Juhos
` (2 preceding siblings ...)
2025-05-12 14:22 ` [PATCH 3/7] pinctrl: armada-37xx: set GPIO output value before setting direction Gabor Juhos
@ 2025-05-12 14:22 ` Gabor Juhos
2025-05-12 21:31 ` Andrew Lunn
2025-05-12 14:22 ` [PATCH 5/7] pinctrl: armada-37xx: propagate error from armada_37xx_pmx_gpio_set_direction() Gabor Juhos
` (3 subsequent siblings)
7 siblings, 1 reply; 20+ messages in thread
From: Gabor Juhos @ 2025-05-12 14:22 UTC (permalink / raw)
To: Andrew Lunn, Gregory Clement, Sebastian Hesselbarth,
Linus Walleij, Bartosz Golaszewski
Cc: linux-arm-kernel, linux-gpio, linux-kernel, Gabor Juhos, stable,
Imre Kaloz
The regmap_read() function can fail, so propagate its error up to
the stack instead of silently ignoring that.
Cc: stable@vger.kernel.org
Fixes: 5715092a458c ("pinctrl: armada-37xx: Add gpio support")
Signed-off-by: Gabor Juhos <j4g8y7@gmail.com>
Signed-off-by: Imre Kaloz <kaloz@openwrt.org>
---
drivers/pinctrl/mvebu/pinctrl-armada-37xx.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/pinctrl/mvebu/pinctrl-armada-37xx.c b/drivers/pinctrl/mvebu/pinctrl-armada-37xx.c
index 8d93d36af63ab9496376219454214c05db30971f..2e88a0399d1a205064b58890db6477e2202bf311 100644
--- a/drivers/pinctrl/mvebu/pinctrl-armada-37xx.c
+++ b/drivers/pinctrl/mvebu/pinctrl-armada-37xx.c
@@ -440,11 +440,14 @@ static int armada_37xx_gpio_get(struct gpio_chip *chip, unsigned int offset)
struct armada_37xx_pinctrl *info = gpiochip_get_data(chip);
unsigned int reg = INPUT_VAL;
unsigned int val, mask;
+ int ret;
armada_37xx_update_reg(®, &offset);
mask = BIT(offset);
- regmap_read(info->regmap, reg, &val);
+ ret = regmap_read(info->regmap, reg, &val);
+ if (ret)
+ return ret;
return (val & mask) != 0;
}
--
2.49.0
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [PATCH 5/7] pinctrl: armada-37xx: propagate error from armada_37xx_pmx_gpio_set_direction()
2025-05-12 14:22 [PATCH 0/7] pinctrl: armada-37xx: a couple of small fixes Gabor Juhos
` (3 preceding siblings ...)
2025-05-12 14:22 ` [PATCH 4/7] pinctrl: armada-37xx: propagate error from armada_37xx_gpio_get() Gabor Juhos
@ 2025-05-12 14:22 ` Gabor Juhos
2025-05-12 21:31 ` [PATCH 5/7] pinctrl: armada-37xx: propagate error from armada_37xx_pmx_gpio_set_direction()' Andrew Lunn
2025-05-12 14:22 ` [PATCH 6/7] pinctrl: armada-37xx: propagate error from armada_37xx_gpio_get_direction() Gabor Juhos
` (2 subsequent siblings)
7 siblings, 1 reply; 20+ messages in thread
From: Gabor Juhos @ 2025-05-12 14:22 UTC (permalink / raw)
To: Andrew Lunn, Gregory Clement, Sebastian Hesselbarth,
Linus Walleij, Bartosz Golaszewski
Cc: linux-arm-kernel, linux-gpio, linux-kernel, Gabor Juhos, stable,
Imre Kaloz
The armada_37xx_gpio_direction_{in,out}put() functions can fail, so
propagate their error values back to the stack instead of silently
ignoring those.
Cc: stable@vger.kernel.org
Fixes: 5715092a458c ("pinctrl: armada-37xx: Add gpio support")
Signed-off-by: Gabor Juhos <j4g8y7@gmail.com>
Signed-off-by: Imre Kaloz <kaloz@openwrt.org>
---
drivers/pinctrl/mvebu/pinctrl-armada-37xx.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/drivers/pinctrl/mvebu/pinctrl-armada-37xx.c b/drivers/pinctrl/mvebu/pinctrl-armada-37xx.c
index 2e88a0399d1a205064b58890db6477e2202bf311..aed0069b085ced5867993e95e0244df7ccda556d 100644
--- a/drivers/pinctrl/mvebu/pinctrl-armada-37xx.c
+++ b/drivers/pinctrl/mvebu/pinctrl-armada-37xx.c
@@ -472,16 +472,17 @@ static int armada_37xx_pmx_gpio_set_direction(struct pinctrl_dev *pctldev,
{
struct armada_37xx_pinctrl *info = pinctrl_dev_get_drvdata(pctldev);
struct gpio_chip *chip = range->gc;
+ int ret;
dev_dbg(info->dev, "gpio_direction for pin %u as %s-%d to %s\n",
offset, range->name, offset, input ? "input" : "output");
if (input)
- armada_37xx_gpio_direction_input(chip, offset);
+ ret = armada_37xx_gpio_direction_input(chip, offset);
else
- armada_37xx_gpio_direction_output(chip, offset, 0);
+ ret = armada_37xx_gpio_direction_output(chip, offset, 0);
- return 0;
+ return ret;
}
static int armada_37xx_gpio_request_enable(struct pinctrl_dev *pctldev,
--
2.49.0
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [PATCH 6/7] pinctrl: armada-37xx: propagate error from armada_37xx_gpio_get_direction()
2025-05-12 14:22 [PATCH 0/7] pinctrl: armada-37xx: a couple of small fixes Gabor Juhos
` (4 preceding siblings ...)
2025-05-12 14:22 ` [PATCH 5/7] pinctrl: armada-37xx: propagate error from armada_37xx_pmx_gpio_set_direction() Gabor Juhos
@ 2025-05-12 14:22 ` Gabor Juhos
2025-05-12 21:31 ` Andrew Lunn
2025-05-12 14:22 ` [PATCH 7/7] pinctrl: armada-37xx: propagate error from armada_37xx_pmx_set_by_name() Gabor Juhos
2025-05-12 21:33 ` [PATCH 0/7] pinctrl: armada-37xx: a couple of small fixes Andrew Lunn
7 siblings, 1 reply; 20+ messages in thread
From: Gabor Juhos @ 2025-05-12 14:22 UTC (permalink / raw)
To: Andrew Lunn, Gregory Clement, Sebastian Hesselbarth,
Linus Walleij, Bartosz Golaszewski
Cc: linux-arm-kernel, linux-gpio, linux-kernel, Gabor Juhos, stable,
Imre Kaloz
The regmap_read() function can fail, so propagate its error up to
the stack instead of silently ignoring that.
Cc: stable@vger.kernel.org
Fixes: 5715092a458c ("pinctrl: armada-37xx: Add gpio support")
Signed-off-by: Gabor Juhos <j4g8y7@gmail.com>
Signed-off-by: Imre Kaloz <kaloz@openwrt.org>
---
drivers/pinctrl/mvebu/pinctrl-armada-37xx.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/pinctrl/mvebu/pinctrl-armada-37xx.c b/drivers/pinctrl/mvebu/pinctrl-armada-37xx.c
index aed0069b085ced5867993e95e0244df7ccda556d..18c6c5026b26c294ee65e3deea02d2e852e10622 100644
--- a/drivers/pinctrl/mvebu/pinctrl-armada-37xx.c
+++ b/drivers/pinctrl/mvebu/pinctrl-armada-37xx.c
@@ -402,10 +402,13 @@ static int armada_37xx_gpio_get_direction(struct gpio_chip *chip,
struct armada_37xx_pinctrl *info = gpiochip_get_data(chip);
unsigned int reg = OUTPUT_EN;
unsigned int val, mask;
+ int ret;
armada_37xx_update_reg(®, &offset);
mask = BIT(offset);
- regmap_read(info->regmap, reg, &val);
+ ret = regmap_read(info->regmap, reg, &val);
+ if (ret)
+ return ret;
if (val & mask)
return GPIO_LINE_DIRECTION_OUT;
--
2.49.0
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [PATCH 7/7] pinctrl: armada-37xx: propagate error from armada_37xx_pmx_set_by_name()
2025-05-12 14:22 [PATCH 0/7] pinctrl: armada-37xx: a couple of small fixes Gabor Juhos
` (5 preceding siblings ...)
2025-05-12 14:22 ` [PATCH 6/7] pinctrl: armada-37xx: propagate error from armada_37xx_gpio_get_direction() Gabor Juhos
@ 2025-05-12 14:22 ` Gabor Juhos
2025-05-12 21:32 ` Andrew Lunn
2025-05-12 21:33 ` [PATCH 0/7] pinctrl: armada-37xx: a couple of small fixes Andrew Lunn
7 siblings, 1 reply; 20+ messages in thread
From: Gabor Juhos @ 2025-05-12 14:22 UTC (permalink / raw)
To: Andrew Lunn, Gregory Clement, Sebastian Hesselbarth,
Linus Walleij, Bartosz Golaszewski
Cc: linux-arm-kernel, linux-gpio, linux-kernel, Gabor Juhos, stable,
Imre Kaloz
The regmap_update_bits() function can fail, so propagate its error
up to the stack instead of silently ignoring that.
Cc: stable@vger.kernel.org
Fixes: 87466ccd9401 ("pinctrl: armada-37xx: Add pin controller support for Armada 37xx")
Signed-off-by: Gabor Juhos <j4g8y7@gmail.com>
Signed-off-by: Imre Kaloz <kaloz@openwrt.org>
---
drivers/pinctrl/mvebu/pinctrl-armada-37xx.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/pinctrl/mvebu/pinctrl-armada-37xx.c b/drivers/pinctrl/mvebu/pinctrl-armada-37xx.c
index 18c6c5026b26c294ee65e3deea02d2e852e10622..f35bf0cd98c97419ba0ab0291a23d4774a595d39 100644
--- a/drivers/pinctrl/mvebu/pinctrl-armada-37xx.c
+++ b/drivers/pinctrl/mvebu/pinctrl-armada-37xx.c
@@ -358,9 +358,7 @@ static int armada_37xx_pmx_set_by_name(struct pinctrl_dev *pctldev,
val = grp->val[func];
- regmap_update_bits(info->regmap, reg, mask, val);
-
- return 0;
+ return regmap_update_bits(info->regmap, reg, mask, val);
}
static int armada_37xx_pmx_set(struct pinctrl_dev *pctldev,
--
2.49.0
^ permalink raw reply related [flat|nested] 20+ messages in thread
* Re: [PATCH 1/7] pinctrl: armada-37xx: use correct OUTPUT_VAL register for GPIOs > 31
2025-05-12 14:22 ` [PATCH 1/7] pinctrl: armada-37xx: use correct OUTPUT_VAL register for GPIOs > 31 Gabor Juhos
@ 2025-05-12 21:28 ` Andrew Lunn
0 siblings, 0 replies; 20+ messages in thread
From: Andrew Lunn @ 2025-05-12 21:28 UTC (permalink / raw)
To: Gabor Juhos
Cc: Gregory Clement, Sebastian Hesselbarth, Linus Walleij,
Bartosz Golaszewski, linux-arm-kernel, linux-gpio, linux-kernel,
stable, Imre Kaloz
On Mon, May 12, 2025 at 04:22:37PM +0200, Gabor Juhos wrote:
> The controller has two consecutive OUTPUT_VAL registers and both
> holds output value for 32 GPIOs. Due to a missing adjustment, the
> current code always uses the first register while setting the
> output value whereas it should use the second one for GPIOs > 31.
>
> Add the missing armada_37xx_update_reg() call to adjust the register
> according to the 'offset' parameter of the function to fix the issue.
>
> Cc: stable@vger.kernel.org
> Fixes: 6702abb3bf23 ("pinctrl: armada-37xx: Fix direction_output() callback behavior")
> Signed-off-by: Gabor Juhos <j4g8y7@gmail.com>
> Signed-off-by: Imre Kaloz <kaloz@openwrt.org>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Andrew
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH 2/7] pinctrl: armada-37xx: propagate error from armada_37xx_gpio_direction_output()
2025-05-12 14:22 ` [PATCH 2/7] pinctrl: armada-37xx: propagate error from armada_37xx_gpio_direction_output() Gabor Juhos
@ 2025-05-12 21:29 ` Andrew Lunn
0 siblings, 0 replies; 20+ messages in thread
From: Andrew Lunn @ 2025-05-12 21:29 UTC (permalink / raw)
To: Gabor Juhos
Cc: Gregory Clement, Sebastian Hesselbarth, Linus Walleij,
Bartosz Golaszewski, linux-arm-kernel, linux-gpio, linux-kernel,
stable, Imre Kaloz
On Mon, May 12, 2025 at 04:22:38PM +0200, Gabor Juhos wrote:
> The regmap_update_bits() function can fail, so propagate its error
> up to the stack instead of silently ignoring that.
>
> Cc: stable@vger.kernel.org
> Fixes: 6702abb3bf23 ("pinctrl: armada-37xx: Fix direction_output() callback behavior")
> Signed-off-by: Gabor Juhos <j4g8y7@gmail.com>
> Signed-off-by: Imre Kaloz <kaloz@openwrt.org>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Andrew
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH 3/7] pinctrl: armada-37xx: set GPIO output value before setting direction
2025-05-12 14:22 ` [PATCH 3/7] pinctrl: armada-37xx: set GPIO output value before setting direction Gabor Juhos
@ 2025-05-12 21:30 ` Andrew Lunn
0 siblings, 0 replies; 20+ messages in thread
From: Andrew Lunn @ 2025-05-12 21:30 UTC (permalink / raw)
To: Gabor Juhos
Cc: Gregory Clement, Sebastian Hesselbarth, Linus Walleij,
Bartosz Golaszewski, linux-arm-kernel, linux-gpio, linux-kernel,
stable, Imre Kaloz
On Mon, May 12, 2025 at 04:22:39PM +0200, Gabor Juhos wrote:
> Changing the direction before updating the output value in the
> OUTPUT_VAL register may result in a glitch on the output line
> if the previous value in the OUTPUT_VAL register is different
> from the one we want to set.
>
> In order to avoid that, update the output value before changing
> the direction.
>
> Cc: stable@vger.kernel.org
> Fixes: 6702abb3bf23 ("pinctrl: armada-37xx: Fix direction_output() callback behavior")
> Signed-off-by: Gabor Juhos <j4g8y7@gmail.com>
> Signed-off-by: Imre Kaloz <kaloz@openwrt.org>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Andrew
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH 4/7] pinctrl: armada-37xx: propagate error from armada_37xx_gpio_get()
2025-05-12 14:22 ` [PATCH 4/7] pinctrl: armada-37xx: propagate error from armada_37xx_gpio_get() Gabor Juhos
@ 2025-05-12 21:31 ` Andrew Lunn
0 siblings, 0 replies; 20+ messages in thread
From: Andrew Lunn @ 2025-05-12 21:31 UTC (permalink / raw)
To: Gabor Juhos
Cc: Gregory Clement, Sebastian Hesselbarth, Linus Walleij,
Bartosz Golaszewski, linux-arm-kernel, linux-gpio, linux-kernel,
stable, Imre Kaloz
On Mon, May 12, 2025 at 04:22:40PM +0200, Gabor Juhos wrote:
> The regmap_read() function can fail, so propagate its error up to
> the stack instead of silently ignoring that.
>
> Cc: stable@vger.kernel.org
> Fixes: 5715092a458c ("pinctrl: armada-37xx: Add gpio support")
> Signed-off-by: Gabor Juhos <j4g8y7@gmail.com>
> Signed-off-by: Imre Kaloz <kaloz@openwrt.org>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Andrew
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH 5/7] pinctrl: armada-37xx: propagate error from armada_37xx_pmx_gpio_set_direction()'
2025-05-12 14:22 ` [PATCH 5/7] pinctrl: armada-37xx: propagate error from armada_37xx_pmx_gpio_set_direction() Gabor Juhos
@ 2025-05-12 21:31 ` Andrew Lunn
0 siblings, 0 replies; 20+ messages in thread
From: Andrew Lunn @ 2025-05-12 21:31 UTC (permalink / raw)
To: Gabor Juhos
Cc: Gregory Clement, Sebastian Hesselbarth, Linus Walleij,
Bartosz Golaszewski, linux-arm-kernel, linux-gpio, linux-kernel,
stable, Imre Kaloz
On Mon, May 12, 2025 at 04:22:41PM +0200, Gabor Juhos wrote:
> The armada_37xx_gpio_direction_{in,out}put() functions can fail, so
> propagate their error values back to the stack instead of silently
> ignoring those.
>
> Cc: stable@vger.kernel.org
> Fixes: 5715092a458c ("pinctrl: armada-37xx: Add gpio support")
> Signed-off-by: Gabor Juhos <j4g8y7@gmail.com>
> Signed-off-by: Imre Kaloz <kaloz@openwrt.org>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Andrew
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH 6/7] pinctrl: armada-37xx: propagate error from armada_37xx_gpio_get_direction()
2025-05-12 14:22 ` [PATCH 6/7] pinctrl: armada-37xx: propagate error from armada_37xx_gpio_get_direction() Gabor Juhos
@ 2025-05-12 21:31 ` Andrew Lunn
0 siblings, 0 replies; 20+ messages in thread
From: Andrew Lunn @ 2025-05-12 21:31 UTC (permalink / raw)
To: Gabor Juhos
Cc: Gregory Clement, Sebastian Hesselbarth, Linus Walleij,
Bartosz Golaszewski, linux-arm-kernel, linux-gpio, linux-kernel,
stable, Imre Kaloz
On Mon, May 12, 2025 at 04:22:42PM +0200, Gabor Juhos wrote:
> The regmap_read() function can fail, so propagate its error up to
> the stack instead of silently ignoring that.
>
> Cc: stable@vger.kernel.org
> Fixes: 5715092a458c ("pinctrl: armada-37xx: Add gpio support")
> Signed-off-by: Gabor Juhos <j4g8y7@gmail.com>
> Signed-off-by: Imre Kaloz <kaloz@openwrt.org>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Andrew
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH 7/7] pinctrl: armada-37xx: propagate error from armada_37xx_pmx_set_by_name()
2025-05-12 14:22 ` [PATCH 7/7] pinctrl: armada-37xx: propagate error from armada_37xx_pmx_set_by_name() Gabor Juhos
@ 2025-05-12 21:32 ` Andrew Lunn
0 siblings, 0 replies; 20+ messages in thread
From: Andrew Lunn @ 2025-05-12 21:32 UTC (permalink / raw)
To: Gabor Juhos
Cc: Gregory Clement, Sebastian Hesselbarth, Linus Walleij,
Bartosz Golaszewski, linux-arm-kernel, linux-gpio, linux-kernel,
stable, Imre Kaloz
On Mon, May 12, 2025 at 04:22:43PM +0200, Gabor Juhos wrote:
> The regmap_update_bits() function can fail, so propagate its error
> up to the stack instead of silently ignoring that.
>
> Cc: stable@vger.kernel.org
> Fixes: 87466ccd9401 ("pinctrl: armada-37xx: Add pin controller support for Armada 37xx")
> Signed-off-by: Gabor Juhos <j4g8y7@gmail.com>
> Signed-off-by: Imre Kaloz <kaloz@openwrt.org>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Andrew
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH 0/7] pinctrl: armada-37xx: a couple of small fixes
2025-05-12 14:22 [PATCH 0/7] pinctrl: armada-37xx: a couple of small fixes Gabor Juhos
` (6 preceding siblings ...)
2025-05-12 14:22 ` [PATCH 7/7] pinctrl: armada-37xx: propagate error from armada_37xx_pmx_set_by_name() Gabor Juhos
@ 2025-05-12 21:33 ` Andrew Lunn
2025-05-13 13:36 ` Linus Walleij
7 siblings, 1 reply; 20+ messages in thread
From: Andrew Lunn @ 2025-05-12 21:33 UTC (permalink / raw)
To: Gabor Juhos
Cc: Gregory Clement, Sebastian Hesselbarth, Linus Walleij,
Bartosz Golaszewski, linux-arm-kernel, linux-gpio, linux-kernel,
stable, Imre Kaloz
On Mon, May 12, 2025 at 04:22:36PM +0200, Gabor Juhos wrote:
> The series contains several small patches to fix various
> issues in the pinctrl driver for Armada 3700.
I'm not sure all these should be for stable. Some are clear bugs, but
not propagating the errors has not bothered anybody so far, a
requirement for stable.
Andrew
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH 0/7] pinctrl: armada-37xx: a couple of small fixes
2025-05-12 21:33 ` [PATCH 0/7] pinctrl: armada-37xx: a couple of small fixes Andrew Lunn
@ 2025-05-13 13:36 ` Linus Walleij
2025-05-13 16:51 ` Gabor Juhos
0 siblings, 1 reply; 20+ messages in thread
From: Linus Walleij @ 2025-05-13 13:36 UTC (permalink / raw)
To: Andrew Lunn
Cc: Gabor Juhos, Gregory Clement, Sebastian Hesselbarth,
Bartosz Golaszewski, linux-arm-kernel, linux-gpio, linux-kernel,
stable, Imre Kaloz
On Mon, May 12, 2025 at 11:33 PM Andrew Lunn <andrew@lunn.ch> wrote:
> On Mon, May 12, 2025 at 04:22:36PM +0200, Gabor Juhos wrote:
> > The series contains several small patches to fix various
> > issues in the pinctrl driver for Armada 3700.
>
> I'm not sure all these should be for stable. Some are clear bugs, but
> not propagating the errors has not bothered anybody so far, a
> requirement for stable.
So we are at -rc6 so I'm not sending these as fixes to Torvalds
right now unless they are super-critical.
I will merge this for v6.16 (-rc1) and then the stable maintainers
will have to decide from the point it enters mainline.
Gabor: can you look over the tags? Once you have decided
on stable/non-stable tags I will merge the series.
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH 0/7] pinctrl: armada-37xx: a couple of small fixes
2025-05-13 13:36 ` Linus Walleij
@ 2025-05-13 16:51 ` Gabor Juhos
2025-05-13 18:46 ` Andrew Lunn
0 siblings, 1 reply; 20+ messages in thread
From: Gabor Juhos @ 2025-05-13 16:51 UTC (permalink / raw)
To: Linus Walleij, Andrew Lunn
Cc: Gregory Clement, Sebastian Hesselbarth, Bartosz Golaszewski,
linux-arm-kernel, linux-gpio, linux-kernel, stable, Imre Kaloz
2025. 05. 13. 15:36 keltezéssel, Linus Walleij írta:
> On Mon, May 12, 2025 at 11:33 PM Andrew Lunn <andrew@lunn.ch> wrote:
>> On Mon, May 12, 2025 at 04:22:36PM +0200, Gabor Juhos wrote:
>>> The series contains several small patches to fix various
>>> issues in the pinctrl driver for Armada 3700.
>>
>> I'm not sure all these should be for stable. Some are clear bugs, but
>> not propagating the errors has not bothered anybody so far, a
>> requirement for stable.
>
> So we are at -rc6 so I'm not sending these as fixes to Torvalds
> right now unless they are super-critical.
>
> I will merge this for v6.16 (-rc1) and then the stable maintainers
> will have to decide from the point it enters mainline.
>
> Gabor: can you look over the tags? Once you have decided
> on stable/non-stable tags I will merge the series.
Sure, I will send a v2. Just a question, shall I also remove the 'Fixes' tags
along with the 'stable' ones? If I keep those, they might land up in stable
trees anyway.
Regards,
Gabor
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH 0/7] pinctrl: armada-37xx: a couple of small fixes
2025-05-13 16:51 ` Gabor Juhos
@ 2025-05-13 18:46 ` Andrew Lunn
2025-05-13 19:24 ` Gabor Juhos
0 siblings, 1 reply; 20+ messages in thread
From: Andrew Lunn @ 2025-05-13 18:46 UTC (permalink / raw)
To: Gabor Juhos
Cc: Linus Walleij, Gregory Clement, Sebastian Hesselbarth,
Bartosz Golaszewski, linux-arm-kernel, linux-gpio, linux-kernel,
stable, Imre Kaloz
On Tue, May 13, 2025 at 06:51:35PM +0200, Gabor Juhos wrote:
> 2025. 05. 13. 15:36 keltezéssel, Linus Walleij írta:
> > On Mon, May 12, 2025 at 11:33 PM Andrew Lunn <andrew@lunn.ch> wrote:
> >> On Mon, May 12, 2025 at 04:22:36PM +0200, Gabor Juhos wrote:
> >>> The series contains several small patches to fix various
> >>> issues in the pinctrl driver for Armada 3700.
> >>
> >> I'm not sure all these should be for stable. Some are clear bugs, but
> >> not propagating the errors has not bothered anybody so far, a
> >> requirement for stable.
> >
> > So we are at -rc6 so I'm not sending these as fixes to Torvalds
> > right now unless they are super-critical.
> >
> > I will merge this for v6.16 (-rc1) and then the stable maintainers
> > will have to decide from the point it enters mainline.
> >
> > Gabor: can you look over the tags? Once you have decided
> > on stable/non-stable tags I will merge the series.
>
> Sure, I will send a v2. Just a question, shall I also remove the 'Fixes' tags
> along with the 'stable' ones? If I keep those, they might land up in stable
> trees anyway.
For the return values patches, i would drop the Fixes. It is just
really continuing development work for the driver.
Andrew
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH 0/7] pinctrl: armada-37xx: a couple of small fixes
2025-05-13 18:46 ` Andrew Lunn
@ 2025-05-13 19:24 ` Gabor Juhos
0 siblings, 0 replies; 20+ messages in thread
From: Gabor Juhos @ 2025-05-13 19:24 UTC (permalink / raw)
To: Andrew Lunn
Cc: Linus Walleij, Gregory Clement, Sebastian Hesselbarth,
Bartosz Golaszewski, linux-arm-kernel, linux-gpio, linux-kernel,
stable, Imre Kaloz
2025. 05. 13. 20:46 keltezéssel, Andrew Lunn írta:
> On Tue, May 13, 2025 at 06:51:35PM +0200, Gabor Juhos wrote:
>> 2025. 05. 13. 15:36 keltezéssel, Linus Walleij írta:
>>> On Mon, May 12, 2025 at 11:33 PM Andrew Lunn <andrew@lunn.ch> wrote:
>>>> On Mon, May 12, 2025 at 04:22:36PM +0200, Gabor Juhos wrote:
>>>>> The series contains several small patches to fix various
>>>>> issues in the pinctrl driver for Armada 3700.
>>>>
>>>> I'm not sure all these should be for stable. Some are clear bugs, but
>>>> not propagating the errors has not bothered anybody so far, a
>>>> requirement for stable.
>>>
>>> So we are at -rc6 so I'm not sending these as fixes to Torvalds
>>> right now unless they are super-critical.
>>>
>>> I will merge this for v6.16 (-rc1) and then the stable maintainers
>>> will have to decide from the point it enters mainline.
>>>
>>> Gabor: can you look over the tags? Once you have decided
>>> on stable/non-stable tags I will merge the series.
>>
>> Sure, I will send a v2. Just a question, shall I also remove the 'Fixes' tags
>> along with the 'stable' ones? If I keep those, they might land up in stable
>> trees anyway.
>
> For the return values patches, i would drop the Fixes. It is just
> really continuing development work for the driver.
Ok, thanks!
-Gabor
^ permalink raw reply [flat|nested] 20+ messages in thread
end of thread, other threads:[~2025-05-13 19:25 UTC | newest]
Thread overview: 20+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-12 14:22 [PATCH 0/7] pinctrl: armada-37xx: a couple of small fixes Gabor Juhos
2025-05-12 14:22 ` [PATCH 1/7] pinctrl: armada-37xx: use correct OUTPUT_VAL register for GPIOs > 31 Gabor Juhos
2025-05-12 21:28 ` Andrew Lunn
2025-05-12 14:22 ` [PATCH 2/7] pinctrl: armada-37xx: propagate error from armada_37xx_gpio_direction_output() Gabor Juhos
2025-05-12 21:29 ` Andrew Lunn
2025-05-12 14:22 ` [PATCH 3/7] pinctrl: armada-37xx: set GPIO output value before setting direction Gabor Juhos
2025-05-12 21:30 ` Andrew Lunn
2025-05-12 14:22 ` [PATCH 4/7] pinctrl: armada-37xx: propagate error from armada_37xx_gpio_get() Gabor Juhos
2025-05-12 21:31 ` Andrew Lunn
2025-05-12 14:22 ` [PATCH 5/7] pinctrl: armada-37xx: propagate error from armada_37xx_pmx_gpio_set_direction() Gabor Juhos
2025-05-12 21:31 ` [PATCH 5/7] pinctrl: armada-37xx: propagate error from armada_37xx_pmx_gpio_set_direction()' Andrew Lunn
2025-05-12 14:22 ` [PATCH 6/7] pinctrl: armada-37xx: propagate error from armada_37xx_gpio_get_direction() Gabor Juhos
2025-05-12 21:31 ` Andrew Lunn
2025-05-12 14:22 ` [PATCH 7/7] pinctrl: armada-37xx: propagate error from armada_37xx_pmx_set_by_name() Gabor Juhos
2025-05-12 21:32 ` Andrew Lunn
2025-05-12 21:33 ` [PATCH 0/7] pinctrl: armada-37xx: a couple of small fixes Andrew Lunn
2025-05-13 13:36 ` Linus Walleij
2025-05-13 16:51 ` Gabor Juhos
2025-05-13 18:46 ` Andrew Lunn
2025-05-13 19:24 ` Gabor Juhos
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).