leds: is31fl319x: Fix shutdown GPIO and update DT bindings
Subsystems (5)
cover leds: is31fl319x: Fix shutdown GPIO and update DT bindings
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(-)
Signature · 1 line
2.54.0
PATCH 1/5 dt-bindings: leds: issi,is31fl319x: Add description for the shutdown-gpios property
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.
--- .../devicetree/bindings/leds/issi,is31fl319x.yaml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-)
Documentation/devicetree/bindings/leds/issi,is31fl319x.yaml +7 -2
@@ -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>;
Signature · 1 line
2.54.0
PATCH 2/5 leds: is31fl319x: Fix shutdown GPIO initial state and remove redundant startup pulse
In reply to Jun Yan1. 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
--- drivers/leds/leds-is31fl319x.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-)
drivers/leds/leds-is31fl319x.c +1 -7
@@ -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))
Signature · 1 line
2.54.0
PATCH 3/5 arm64: dts: qcom: msm8916-alcatel-idol347: Fix sn3190 shutdown GPIO polarity
In reply to Jun YanThe 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
--- arch/arm64/boot/dts/qcom/msm8916-alcatel-idol347.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/boot/dts/qcom/msm8916-alcatel-idol347.dts +1 -1
@@ -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>;
Signature · 1 line
2.54.0
PATCH 4/5 ARM: dts: qcom: msm8974-oneplus-bacon: Fix sn3193 shutdown GPIO polarity
In reply to Jun YanThe 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
--- arch/arm/boot/dts/qcom/qcom-msm8974pro-oneplus-bacon.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/boot/dts/qcom/qcom-msm8974pro-oneplus-bacon.dts +1 -1
@@ -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>;
Signature · 1 line
2.54.0
PATCH 5/5 arm64: dts: marvell: armada-7040-mochabin: Fix is31fl3199 shutdown GPIO polarity
In reply to Jun YanThe 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
--- arch/arm64/boot/dts/marvell/armada-7040-mochabin.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/boot/dts/marvell/armada-7040-mochabin.dts +1 -1
@@ -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 {
Signature · 1 line
2.54.0
Re: [PATCH 2/5] leds: is31fl319x: Fix shutdown GPIO initial state and remove redundant startup pulse
In reply to Jun YanQuoted 2 lines · Jun Yan
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.
drivers/leds/leds-is31fl319x.c static int is31fl319x_parse_fw(struct device *dev, struct is31fl319x_chip *is31) · line 399
Quoted 2 lines
drivers/leds/leds-is31fl319x.c +1
-1- 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
Re: [PATCH 2/5] leds: is31fl319x: Fix shutdown GPIO initial state and remove redundant startup pulse
Quoted 7 lines
On Fri, May 8, 2026 at 5:26=E2=80=AFPM Jun Yan <[email protected]> w= rote:
Quoted 2 lines
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.
Yes, that is right.
Quoted 4 lines
Quoted 2 lines
-
is31->shutdown_gpio=3D devm_gpiod_get_optional(dev, "shutdown", =
GPIOD_OUT_HIGH);Quoted 1 line
+
is31->shutdown_gpio=3D devm_gpiod_get_optional(dev, "shutdown", =
Quoted 8 lines
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_LOWin 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.
Okay, I will add the necessary comment in the V2 version.
Quoted 3 lines
Have you checked any existing device trees so you don't break something here?
I have modified the problematic device trees and CC'd
the relevant platform mailing lists as well as the device‑tree mailing list [1].
[1] https://lore.kernel.org/linux-devicetree/[email protected]/
Quoted 4 lines
If you're breaking platforms you may need a fixup in
drivers/gpio/gpiolib-of.cto force the consumer active low for legacy device trees.
Thanks for the reminder. I will add the necessary fixup in the V2 version.
Quoted 6 lines
Yours,
Linus WalleijYours,
Linus Walleij
Re: [PATCH 2/5] leds: is31fl319x: Fix shutdown GPIO initial state and remove redundant startup pulse
Quoted 8 lines · Jun Yan
Quoted 5 lines
On Fri, May 8, 2026 at 5:26=E2=80=AFPM Jun Yan <[email protected]> w= rote:
Have you checked any existing device trees so you don't break something here?
I have modified the problematic device trees and CC'd
the relevant platform mailing lists as well as the device‑tree mailing list [1].
The biggest problem is that the DT is supposed to be an ABI. Older DTs must continue to work with the newer kernels.
Quoted 2 lines
[1] https://lore.kernel.org/linux-devicetree/[email protected]/
Signature · 2 lines
With best wishes Dmitry
Quoted 11 lines · Jun Yan
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.
Quoted 11 lines
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
There is no easy way to merge the series. LEDs and DT patches go to different trees (well, three different trees). So when any of them is merged, the branch after the patch will be broken until all the patches hit the same branch.
Quoted 11 lines
.../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(-)Signature · 1 line
2.54.0
Signature · 2 lines
With best wishes Dmitry
Re: [PATCH 1/5] dt-bindings: leds: issi,is31fl319x: Add description for the shutdown-gpios property
In reply to Jun YanQuoted 5 lines · Jun Yan
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.
Quoted 9 lines
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 <[email protected]>--- .../devicetree/bindings/leds/issi,is31fl319x.yaml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-)
Re: [PATCH 3/5] arm64: dts: qcom: msm8916-alcatel-idol347: Fix sn3190 shutdown GPIO polarity
In reply to Jun YanQuoted 8 lines · Jun Yan
The sn3190 shutdown pin is active-low [1]. Correct the GPIO flags from
GPIO_ACTIVE_HIGHtoGPIO_ACTIVE_LOWto 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 <[email protected]>---
Assuming you get the other backwards compat pieces in:
Konrad
Re: [PATCH 4/5] ARM: dts: qcom: msm8974-oneplus-bacon: Fix sn3193 shutdown GPIO polarity
In reply to Jun YanQuoted 8 lines · Jun Yan
The sn3193 shutdown pin is active-low[1]. Correct the GPIO flags from
GPIO_ACTIVE_HIGHtoGPIO_ACTIVE_LOWto 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 <[email protected]>---
Konrad