Linux LED subsystem development
 help / color / mirror / Atom feed
* [PATCH 0/5] leds: is31fl319x: Fix shutdown GPIO and update DT bindings
@ 2026-05-08 15:24 Jun Yan
  2026-05-08 15:24 ` [PATCH 1/5] dt-bindings: leds: issi,is31fl319x: Add description for the shutdown-gpios property Jun Yan
                   ` (4 more replies)
  0 siblings, 5 replies; 7+ messages in thread
From: Jun Yan @ 2026-05-08 15:24 UTC (permalink / raw)
  To: Lee Jones, Pavel Machek, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Bjorn Andersson, Konrad Dybcio, Andrew Lunn,
	Gregory Clement, Sebastian Hesselbarth, Vincent Knecht,
	Grant Feng, Andre Przywara, Viresh Kumar, Baruch Siach,
	Nick Hawkins, Robert Marko
  Cc: Jun Yan, Pavel Machek, Krzysztof Kozlowski, Florian Fainelli,
	linux-leds, devicetree, linux-kernel, linux-arm-msm,
	linux-arm-kernel

This series fixes incorrect shutdown GPIO polarity and improves
shutdown-gpios description in DT bindings.

Patch 1 adds detailed shutdown-gpios description and fixes example
in DT bindings.

Patch 2 fixes shutdown GPIO initial state and removes redundant
startup toggling.

Patches 3-5 correct shutdown GPIO polarity in board DTS files.

Jun Yan (5):
  dt-bindings: leds: issi,is31fl319x: Add description for the
    shutdown-gpios property
  leds: is31fl319x: Fix shutdown GPIO initial state and remove redundant
    startup pulse
  arm64: dts: qcom: msm8916-alcatel-idol347: Fix sn3190 shutdown GPIO
    polarity
  ARM: dts: qcom: msm8974-oneplus-bacon: Fix sn3193 shutdown GPIO
    polarity
  arm64: dts: marvell: armada-7040-mochabin: Fix is31fl3199 shutdown
    GPIO polarity

 .../devicetree/bindings/leds/issi,is31fl319x.yaml        | 9 +++++++--
 arch/arm/boot/dts/qcom/qcom-msm8974pro-oneplus-bacon.dts | 2 +-
 arch/arm64/boot/dts/marvell/armada-7040-mochabin.dts     | 2 +-
 arch/arm64/boot/dts/qcom/msm8916-alcatel-idol347.dts     | 2 +-
 drivers/leds/leds-is31fl319x.c                           | 8 +-------
 5 files changed, 11 insertions(+), 12 deletions(-)

-- 
2.54.0


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

* [PATCH 1/5] dt-bindings: leds: issi,is31fl319x: Add description for the shutdown-gpios property
  2026-05-08 15:24 [PATCH 0/5] leds: is31fl319x: Fix shutdown GPIO and update DT bindings Jun Yan
@ 2026-05-08 15:24 ` Jun Yan
  2026-05-08 15:24 ` [PATCH 2/5] leds: is31fl319x: Fix shutdown GPIO initial state and remove redundant startup pulse Jun Yan
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 7+ messages in thread
From: Jun Yan @ 2026-05-08 15:24 UTC (permalink / raw)
  To: Lee Jones, Pavel Machek, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Bjorn Andersson, Konrad Dybcio, Andrew Lunn,
	Gregory Clement, Sebastian Hesselbarth, Vincent Knecht,
	Grant Feng, Andre Przywara, Manivannan Sadhasivam, Jesper Nilsson,
	Baruch Siach, Enric Balletbo i Serra, Robert Marko
  Cc: Jun Yan, Pavel Machek, Krzysztof Kozlowski, Peter Rosin,
	Viresh Kumar, Paul Barker, linux-leds, devicetree, linux-kernel,
	linux-arm-msm, linux-arm-kernel

The IS31FL319X series features an SDB shutdown pin.
Driving it low (active low) places the chip into hardware shutdown
mode for power saving, while all register contents are preserved
and registers are not reset.

Add description for the shutdown down (SDB) pin and fix the example
device tree binding.

Fixes: dbc801b472c1 ("dt-bindings: leds: Convert is31fl319x to dtschema")
Signed-off-by: Jun Yan <jerrysteve1101@gmail.com>
---
 .../devicetree/bindings/leds/issi,is31fl319x.yaml        | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/Documentation/devicetree/bindings/leds/issi,is31fl319x.yaml b/Documentation/devicetree/bindings/leds/issi,is31fl319x.yaml
index 906735acfbaf..ebf2bed51e7f 100644
--- a/Documentation/devicetree/bindings/leds/issi,is31fl319x.yaml
+++ b/Documentation/devicetree/bindings/leds/issi,is31fl319x.yaml
@@ -39,7 +39,12 @@ properties:
 
   shutdown-gpios:
     maxItems: 1
-    description: GPIO attached to the SDB pin.U+U+
+    description: |
+      GPIO attached to the chip's SDB pin.
+      Driving this GPIO low places the chip into hardware shutdown mode
+      for power saving. All register contents are preserved and registers
+      are not reset during shutdown. The chip exits hardware shutdown mode
+      when the SDB pin is pulled high.
 
   audio-gain-db:
     default: 0
@@ -174,7 +179,7 @@ examples:
             #address-cells = <1>;
             #size-cells = <0>;
 
-            shutdown-gpios = <&gpio0 11 GPIO_ACTIVE_HIGH>;
+            shutdown-gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
 
             led@1 {
                 reg = <1>;
-- 
2.54.0


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

* [PATCH 2/5] leds: is31fl319x: Fix shutdown GPIO initial state and remove redundant startup pulse
  2026-05-08 15:24 [PATCH 0/5] leds: is31fl319x: Fix shutdown GPIO and update DT bindings Jun Yan
  2026-05-08 15:24 ` [PATCH 1/5] dt-bindings: leds: issi,is31fl319x: Add description for the shutdown-gpios property Jun Yan
@ 2026-05-08 15:24 ` Jun Yan
  2026-05-11  9:10   ` Linus Walleij
  2026-05-08 15:24 ` [PATCH 3/5] arm64: dts: qcom: msm8916-alcatel-idol347: Fix sn3190 shutdown GPIO polarity Jun Yan
                   ` (2 subsequent siblings)
  4 siblings, 1 reply; 7+ messages in thread
From: Jun Yan @ 2026-05-08 15:24 UTC (permalink / raw)
  To: Lee Jones, Pavel Machek, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Bjorn Andersson, Konrad Dybcio, Andrew Lunn,
	Gregory Clement, Sebastian Hesselbarth, Vincent Knecht,
	Grant Feng, Andre Przywara, Baruch Siach, Romain Perier,
	Alexandre TORGUE, Peter Rosin, Robert Marko
  Cc: Jun Yan, Pavel Machek, Krzysztof Kozlowski, Linus Walleij, Wei Xu,
	Paul Barker, linux-leds, devicetree, linux-kernel, linux-arm-msm,
	linux-arm-kernel

1. Per IS31FL319x datasheet [1], the hardware shutdown pin (SDB) is
active-low.

Fix incorrect initial GPIO level to properly release the chip from shutdown
state.

2. According to datasheet [1] definition:
  Shutdown mode can either be used as a means of
  reducing power consumption or generating a flashing
  display (repeatedly entering and leaving shutdown
  mode). During shutdown mode all registers retain their
  data.
shutdown mode does NOT perform chip reset.A dedicated software reset is
already implemented in driver by writing 0 to reset chip.

Remove redundant unnecessary toggling of the shutdown GPIO.

[1] https://lumissil.com/assets/pdf/core/IS31FL3193_DS.pdf

Fixes: dddb4e38c6ba ("leds: is31fl319x: Add shutdown pin and generate a 5ms low pulse when startup")
Signed-off-by: Jun Yan <jerrysteve1101@gmail.com>
---
 drivers/leds/leds-is31fl319x.c | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/drivers/leds/leds-is31fl319x.c b/drivers/leds/leds-is31fl319x.c
index e411cee06dab..c947f844c756 100644
--- a/drivers/leds/leds-is31fl319x.c
+++ b/drivers/leds/leds-is31fl319x.c
@@ -396,7 +396,7 @@ static int is31fl319x_parse_fw(struct device *dev, struct is31fl319x_chip *is31)
 	int count;
 	int ret;
 
-	is31->shutdown_gpio = devm_gpiod_get_optional(dev, "shutdown", GPIOD_OUT_HIGH);
+	is31->shutdown_gpio = devm_gpiod_get_optional(dev, "shutdown", GPIOD_OUT_LOW);
 	if (IS_ERR(is31->shutdown_gpio))
 		return dev_err_probe(dev, PTR_ERR(is31->shutdown_gpio),
 				     "Failed to get shutdown gpio\n");
@@ -506,12 +506,6 @@ static int is31fl319x_probe(struct i2c_client *client)
 	if (err)
 		return err;
 
-	if (is31->shutdown_gpio) {
-		gpiod_direction_output(is31->shutdown_gpio, 0);
-		mdelay(5);
-		gpiod_direction_output(is31->shutdown_gpio, 1);
-	}
-
 	is31->client = client;
 	is31->regmap = devm_regmap_init_i2c(client, is31->cdef->is31fl319x_regmap_config);
 	if (IS_ERR(is31->regmap))
-- 
2.54.0


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

* [PATCH 3/5] arm64: dts: qcom: msm8916-alcatel-idol347: Fix sn3190 shutdown GPIO polarity
  2026-05-08 15:24 [PATCH 0/5] leds: is31fl319x: Fix shutdown GPIO and update DT bindings Jun Yan
  2026-05-08 15:24 ` [PATCH 1/5] dt-bindings: leds: issi,is31fl319x: Add description for the shutdown-gpios property Jun Yan
  2026-05-08 15:24 ` [PATCH 2/5] leds: is31fl319x: Fix shutdown GPIO initial state and remove redundant startup pulse Jun Yan
@ 2026-05-08 15:24 ` Jun Yan
  2026-05-08 15:24 ` [PATCH 4/5] ARM: dts: qcom: msm8974-oneplus-bacon: Fix sn3193 " Jun Yan
  2026-05-08 15:24 ` [PATCH 5/5] arm64: dts: marvell: armada-7040-mochabin: Fix is31fl3199 " Jun Yan
  4 siblings, 0 replies; 7+ messages in thread
From: Jun Yan @ 2026-05-08 15:24 UTC (permalink / raw)
  To: Lee Jones, Pavel Machek, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Bjorn Andersson, Konrad Dybcio, Andrew Lunn,
	Gregory Clement, Sebastian Hesselbarth, Vincent Knecht,
	Grant Feng, Andre Przywara, Heiko Stuebner, Romain Perier,
	Paul Barker, Patrice Chotard, Robert Marko
  Cc: Jun Yan, Pavel Machek, Krzysztof Kozlowski, Jesper Nilsson,
	Peter Rosin, linux-leds, devicetree, linux-kernel, linux-arm-msm,
	linux-arm-kernel

The sn3190 shutdown pin is active-low [1]. Correct the GPIO flags
from GPIO_ACTIVE_HIGH to GPIO_ACTIVE_LOW to match the hardware.

[1] https://lumissil.com/assets/pdf/core/IS31FL3190_DS.pdf

Fixes: 1c8cc183d070 ("arm64: dts: qcom: msm8916-alcatel-idol347: add LED indicator")
Signed-off-by: Jun Yan <jerrysteve1101@gmail.com>
---
 arch/arm64/boot/dts/qcom/msm8916-alcatel-idol347.dts | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm64/boot/dts/qcom/msm8916-alcatel-idol347.dts b/arch/arm64/boot/dts/qcom/msm8916-alcatel-idol347.dts
index 2de8b6f9531b..6d51d6efcbac 100644
--- a/arch/arm64/boot/dts/qcom/msm8916-alcatel-idol347.dts
+++ b/arch/arm64/boot/dts/qcom/msm8916-alcatel-idol347.dts
@@ -197,7 +197,7 @@ &blsp_i2c6 {
 	led-controller@68 {
 		compatible = "si-en,sn3190";
 		reg = <0x68>;
-		shutdown-gpios = <&tlmm 89 GPIO_ACTIVE_HIGH>;
+		shutdown-gpios = <&tlmm 89 GPIO_ACTIVE_LOW>;
 		pinctrl-names = "default";
 		pinctrl-0 = <&led_enable_default &led_shutdown_default>;
 		#address-cells = <1>;
-- 
2.54.0


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

* [PATCH 4/5] ARM: dts: qcom: msm8974-oneplus-bacon: Fix sn3193 shutdown GPIO polarity
  2026-05-08 15:24 [PATCH 0/5] leds: is31fl319x: Fix shutdown GPIO and update DT bindings Jun Yan
                   ` (2 preceding siblings ...)
  2026-05-08 15:24 ` [PATCH 3/5] arm64: dts: qcom: msm8916-alcatel-idol347: Fix sn3190 shutdown GPIO polarity Jun Yan
@ 2026-05-08 15:24 ` Jun Yan
  2026-05-08 15:24 ` [PATCH 5/5] arm64: dts: marvell: armada-7040-mochabin: Fix is31fl3199 " Jun Yan
  4 siblings, 0 replies; 7+ messages in thread
From: Jun Yan @ 2026-05-08 15:24 UTC (permalink / raw)
  To: Lee Jones, Pavel Machek, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Bjorn Andersson, Konrad Dybcio, Andrew Lunn,
	Gregory Clement, Sebastian Hesselbarth, Vincent Knecht,
	Grant Feng, Andre Przywara, Florian Fainelli, Heiko Stuebner,
	Michal Simek, Wei Xu, Robert Marko
  Cc: Jun Yan, Pavel Machek, Krzysztof Kozlowski, Alexandre TORGUE,
	Jisheng Zhang, Enric Balletbo i Serra, Romain Perier, linux-leds,
	devicetree, linux-kernel, linux-arm-msm, linux-arm-kernel

The sn3193 shutdown pin is active-low[1]. Correct the GPIO flags
from GPIO_ACTIVE_HIGH to GPIO_ACTIVE_LOW to match the hardware.

[1] https://lumissil.com/assets/pdf/core/IS31FL3193_DS.pdf

Fixes: 724ba6751532 ("ARM: dts: Move .dts files to vendor sub-directories")
Signed-off-by: Jun Yan <jerrysteve1101@gmail.com>
---
 arch/arm/boot/dts/qcom/qcom-msm8974pro-oneplus-bacon.dts | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/boot/dts/qcom/qcom-msm8974pro-oneplus-bacon.dts b/arch/arm/boot/dts/qcom/qcom-msm8974pro-oneplus-bacon.dts
index 258bbbecd927..c528d42bade5 100644
--- a/arch/arm/boot/dts/qcom/qcom-msm8974pro-oneplus-bacon.dts
+++ b/arch/arm/boot/dts/qcom/qcom-msm8974pro-oneplus-bacon.dts
@@ -147,7 +147,7 @@ led-controller@68 {
 		compatible = "si-en,sn3193";
 		reg = <0x68>;
 
-		shutdown-gpios = <&tlmm 45 GPIO_ACTIVE_HIGH>;
+		shutdown-gpios = <&tlmm 45 GPIO_ACTIVE_LOW>;
 
 		#address-cells = <1>;
 		#size-cells = <0>;
-- 
2.54.0


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

* [PATCH 5/5] arm64: dts: marvell: armada-7040-mochabin: Fix is31fl3199 shutdown GPIO polarity
  2026-05-08 15:24 [PATCH 0/5] leds: is31fl319x: Fix shutdown GPIO and update DT bindings Jun Yan
                   ` (3 preceding siblings ...)
  2026-05-08 15:24 ` [PATCH 4/5] ARM: dts: qcom: msm8974-oneplus-bacon: Fix sn3193 " Jun Yan
@ 2026-05-08 15:24 ` Jun Yan
  4 siblings, 0 replies; 7+ messages in thread
From: Jun Yan @ 2026-05-08 15:24 UTC (permalink / raw)
  To: Lee Jones, Pavel Machek, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Bjorn Andersson, Konrad Dybcio, Andrew Lunn,
	Gregory Clement, Sebastian Hesselbarth, Vincent Knecht,
	Grant Feng, Andre Przywara, Jisheng Zhang, Heiko Stuebner,
	Jesper Nilsson, Sudeep Holla, Robert Marko
  Cc: Jun Yan, Pavel Machek, Krzysztof Kozlowski, Shawn Guo,
	Florian Fainelli, Patrice Chotard, Tony Lindgren, linux-leds,
	devicetree, linux-kernel, linux-arm-msm, linux-arm-kernel

The is31fl3199 shutdown pin is active-low [1]. Correct the GPIO flags
from GPIO_ACTIVE_HIGH to GPIO_ACTIVE_LOW to match the hardware.

[1] https://lumissil.com/assets/pdf/core/IS31FL3199_DS.pdf

Fixes: 737929191283 ("arm64: dts: marvell: add Globalscale MOCHAbin")
Signed-off-by: Jun Yan <jerrysteve1101@gmail.com>
---
 arch/arm64/boot/dts/marvell/armada-7040-mochabin.dts | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm64/boot/dts/marvell/armada-7040-mochabin.dts b/arch/arm64/boot/dts/marvell/armada-7040-mochabin.dts
index 6bdc4f1e6939..cf690a85cc2a 100644
--- a/arch/arm64/boot/dts/marvell/armada-7040-mochabin.dts
+++ b/arch/arm64/boot/dts/marvell/armada-7040-mochabin.dts
@@ -236,7 +236,7 @@ leds@64 {
 		#size-cells = <0>;
 		pinctrl-names = "default";
 		pinctrl-0 = <&is31_sdb_pins>;
-		shutdown-gpios = <&cp0_gpio1 30 GPIO_ACTIVE_HIGH>;
+		shutdown-gpios = <&cp0_gpio1 30 GPIO_ACTIVE_LOW>;
 		reg = <0x64>;
 
 		led1_red: led@1 {
-- 
2.54.0


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

* Re: [PATCH 2/5] leds: is31fl319x: Fix shutdown GPIO initial state and remove redundant startup pulse
  2026-05-08 15:24 ` [PATCH 2/5] leds: is31fl319x: Fix shutdown GPIO initial state and remove redundant startup pulse Jun Yan
@ 2026-05-11  9:10   ` Linus Walleij
  0 siblings, 0 replies; 7+ messages in thread
From: Linus Walleij @ 2026-05-11  9:10 UTC (permalink / raw)
  To: Jun Yan
  Cc: Lee Jones, Pavel Machek, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Bjorn Andersson, Konrad Dybcio, Andrew Lunn,
	Gregory Clement, Sebastian Hesselbarth, Vincent Knecht,
	Grant Feng, Andre Przywara, Baruch Siach, Romain Perier,
	Alexandre TORGUE, Peter Rosin, Robert Marko, Pavel Machek,
	Krzysztof Kozlowski, Wei Xu, Paul Barker, linux-leds, devicetree,
	linux-kernel, linux-arm-msm, linux-arm-kernel

On Fri, May 8, 2026 at 5:26 PM Jun Yan <jerrysteve1101@gmail.com> wrote:

> 1. Per IS31FL319x datasheet [1], the hardware shutdown pin (SDB) is
> active-low.

So that means that driving the line low will shut down the hardware.

> -       is31->shutdown_gpio = devm_gpiod_get_optional(dev, "shutdown", GPIOD_OUT_HIGH);
> +       is31->shutdown_gpio = devm_gpiod_get_optional(dev, "shutdown", GPIOD_OUT_LOW);

Add a comment here that this will in fact drive the line high,
because the GPIO line will be flagged as GPIO_ACTIVE_LOW
in the provider (such as the device tree).

At least write this in the commit message, it's a missing piece
that helps readers understand what is going on.

Have you checked any existing device trees so you don't
break something here?

If you're breaking platforms you may need a fixup in
drivers/gpio/gpiolib-of.c to force the consumer active
low for legacy device trees.

Yours,
Linus Walleij

Yours,
Linus Walleij

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

end of thread, other threads:[~2026-05-11  9:11 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-08 15:24 [PATCH 0/5] leds: is31fl319x: Fix shutdown GPIO and update DT bindings Jun Yan
2026-05-08 15:24 ` [PATCH 1/5] dt-bindings: leds: issi,is31fl319x: Add description for the shutdown-gpios property Jun Yan
2026-05-08 15:24 ` [PATCH 2/5] leds: is31fl319x: Fix shutdown GPIO initial state and remove redundant startup pulse Jun Yan
2026-05-11  9:10   ` Linus Walleij
2026-05-08 15:24 ` [PATCH 3/5] arm64: dts: qcom: msm8916-alcatel-idol347: Fix sn3190 shutdown GPIO polarity Jun Yan
2026-05-08 15:24 ` [PATCH 4/5] ARM: dts: qcom: msm8974-oneplus-bacon: Fix sn3193 " Jun Yan
2026-05-08 15:24 ` [PATCH 5/5] arm64: dts: marvell: armada-7040-mochabin: Fix is31fl3199 " Jun Yan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox