* [PATCH 0/2] leds: lp5860: add enable-gpio
@ 2026-02-17 15:35 Steffen Trumtrar
2026-02-17 15:35 ` [PATCH 1/2] dt-bindings: " Steffen Trumtrar
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Steffen Trumtrar @ 2026-02-17 15:35 UTC (permalink / raw)
To: Lee Jones, Pavel Machek, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Steffen Trumtrar
Cc: linux-leds, devicetree, linux-kernel, Steffen Trumtrar
The LP5860 can have the VIO_EN pin either be connected to VIO power
supply or a GPIO.
Add support for the pin to the devicetree binding and the driver.
Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de>
---
Steffen Trumtrar (2):
dt-bindings: leds: lp5860: add enable-gpio
leds: rgb: lp5860: add enable-gpio
Documentation/devicetree/bindings/leds/leds-lp5860.yaml | 7 +++++++
drivers/leds/rgb/leds-lp5860-core.c | 10 ++++++++++
include/linux/platform_data/leds-lp5860.h | 1 +
3 files changed, 18 insertions(+)
---
base-commit: 51455910fda1e5e315f604b7633f413116d4fa1f
change-id: 20260217-v6-19-topic-ti-lp5860-enable-gpio-83c0652d34ad
prerequisite-message-id: <20260217-v6-14-topic-ti-lp5860-v6-1-54a766d8b602@pengutronix.de>
prerequisite-patch-id: 1d4485e2a6544fae1103cf9475f317773f206dc5
Best regards,
--
Steffen Trumtrar <s.trumtrar@pengutronix.de>
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 1/2] dt-bindings: leds: lp5860: add enable-gpio
2026-02-17 15:35 [PATCH 0/2] leds: lp5860: add enable-gpio Steffen Trumtrar
@ 2026-02-17 15:35 ` Steffen Trumtrar
2026-02-17 17:54 ` Conor Dooley
2026-02-17 15:35 ` [PATCH 2/2] leds: rgb: " Steffen Trumtrar
2026-03-09 18:22 ` [PATCH 0/2] leds: " Lee Jones
2 siblings, 1 reply; 6+ messages in thread
From: Steffen Trumtrar @ 2026-02-17 15:35 UTC (permalink / raw)
To: Lee Jones, Pavel Machek, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Steffen Trumtrar
Cc: linux-leds, devicetree, linux-kernel, Steffen Trumtrar
The VIO_EN pin on the lp5860 can either be connected to VIO power supply
or GPIO.
Add the enable-gpios pin to the binding documentation.
Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de>
---
Documentation/devicetree/bindings/leds/leds-lp5860.yaml | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/Documentation/devicetree/bindings/leds/leds-lp5860.yaml b/Documentation/devicetree/bindings/leds/leds-lp5860.yaml
index 1ccba48541595..0e88c71c2d398 100644
--- a/Documentation/devicetree/bindings/leds/leds-lp5860.yaml
+++ b/Documentation/devicetree/bindings/leds/leds-lp5860.yaml
@@ -33,6 +33,11 @@ properties:
'#size-cells':
const: 0
+ enable-gpios:
+ maxItems: 1
+ description: |
+ GPIO attached to the chip's enable pin (VIO_EN).
+
patternProperties:
'^multi-led@[0-9a-f]+$':
type: object
@@ -74,6 +79,7 @@ unevaluatedProperties: false
examples:
- |
+ #include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/leds/common.h>
spi {
@@ -83,6 +89,7 @@ examples:
led-controller@0 {
compatible = "ti,lp5860";
reg = <0x0>;
+ enable-gpios = <&gpio1 1 GPIO_ACTIVE_HIGH>;
#address-cells = <1>;
#size-cells = <0>;
--
2.51.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 2/2] leds: rgb: lp5860: add enable-gpio
2026-02-17 15:35 [PATCH 0/2] leds: lp5860: add enable-gpio Steffen Trumtrar
2026-02-17 15:35 ` [PATCH 1/2] dt-bindings: " Steffen Trumtrar
@ 2026-02-17 15:35 ` Steffen Trumtrar
2026-03-05 8:57 ` Steffen Trumtrar
2026-03-09 18:22 ` [PATCH 0/2] leds: " Lee Jones
2 siblings, 1 reply; 6+ messages in thread
From: Steffen Trumtrar @ 2026-02-17 15:35 UTC (permalink / raw)
To: Lee Jones, Pavel Machek, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Steffen Trumtrar
Cc: linux-leds, devicetree, linux-kernel, Steffen Trumtrar
The VIO_EN pin can either be connected with VIO power supply or GPIO.
Get the GPIO from DT if provided and set it on chip enable and disable.
Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de>
---
drivers/leds/rgb/leds-lp5860-core.c | 10 ++++++++++
include/linux/platform_data/leds-lp5860.h | 1 +
2 files changed, 11 insertions(+)
diff --git a/drivers/leds/rgb/leds-lp5860-core.c b/drivers/leds/rgb/leds-lp5860-core.c
index 28b4d86e11f1a..1f349aa53f7a9 100644
--- a/drivers/leds/rgb/leds-lp5860-core.c
+++ b/drivers/leds/rgb/leds-lp5860-core.c
@@ -61,6 +61,9 @@ static int lp5860_set_mc_brightness(struct led_classdev *cdev,
static int lp5860_chip_enable_toggle(struct lp5860 *led, int enable)
{
+ if (led->enable_gpiod)
+ gpiod_direction_output(led->enable_gpiod, enable);
+
return regmap_write(led->regmap, LP5860_REG_CHIP_EN, enable);
}
@@ -170,6 +173,13 @@ int lp5860_device_init(struct device *dev)
struct lp5860 *lp = dev_get_drvdata(dev);
int ret;
+ lp->enable_gpiod = devm_gpiod_get_optional(lp->dev, "enable", GPIOD_ASIS);
+ if (IS_ERR(lp->enable_gpiod))
+ return PTR_ERR(lp->enable_gpiod);
+
+ if (lp->enable_gpiod)
+ gpiod_set_consumer_name(lp->enable_gpiod, "LP5860 VIO enable");
+
ret = lp5860_chip_enable_toggle(lp, LP5860_CHIP_ENABLE);
if (ret)
return ret;
diff --git a/include/linux/platform_data/leds-lp5860.h b/include/linux/platform_data/leds-lp5860.h
index 7bc69a7a550dd..7258d0674ce59 100644
--- a/include/linux/platform_data/leds-lp5860.h
+++ b/include/linux/platform_data/leds-lp5860.h
@@ -257,6 +257,7 @@ struct lp5860_led {
struct lp5860 {
struct device *dev;
struct regmap *regmap;
+ struct gpio_desc *enable_gpiod;
unsigned int leds_count;
DECLARE_FLEX_ARRAY(struct lp5860_led, leds);
--
2.51.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH 1/2] dt-bindings: leds: lp5860: add enable-gpio
2026-02-17 15:35 ` [PATCH 1/2] dt-bindings: " Steffen Trumtrar
@ 2026-02-17 17:54 ` Conor Dooley
0 siblings, 0 replies; 6+ messages in thread
From: Conor Dooley @ 2026-02-17 17:54 UTC (permalink / raw)
To: Steffen Trumtrar
Cc: Lee Jones, Pavel Machek, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Steffen Trumtrar, linux-leds, devicetree,
linux-kernel
[-- Attachment #1: Type: text/plain, Size: 75 bytes --]
Acked-by: Conor Dooley <conor.dooley@microchip.com>
pw-bot: not-applicable
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 2/2] leds: rgb: lp5860: add enable-gpio
2026-02-17 15:35 ` [PATCH 2/2] leds: rgb: " Steffen Trumtrar
@ 2026-03-05 8:57 ` Steffen Trumtrar
0 siblings, 0 replies; 6+ messages in thread
From: Steffen Trumtrar @ 2026-03-05 8:57 UTC (permalink / raw)
To: Lee Jones
Cc: Pavel Machek, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Steffen Trumtrar, linux-leds, devicetree, linux-kernel
On 2026-02-17 at 16:35 +01, Steffen Trumtrar <s.trumtrar@pengutronix.de> wrote:
Hi!
> The VIO_EN pin can either be connected with VIO power supply or GPIO.
> Get the GPIO from DT if provided and set it on chip enable and disable.
>
> Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de>
> ---
> drivers/leds/rgb/leds-lp5860-core.c | 10 ++++++++++
> include/linux/platform_data/leds-lp5860.h | 1 +
> 2 files changed, 11 insertions(+)
>
> diff --git a/drivers/leds/rgb/leds-lp5860-core.c b/drivers/leds/rgb/leds-lp5860-core.c
> index 28b4d86e11f1a..1f349aa53f7a9 100644
> --- a/drivers/leds/rgb/leds-lp5860-core.c
> +++ b/drivers/leds/rgb/leds-lp5860-core.c
> @@ -61,6 +61,9 @@ static int lp5860_set_mc_brightness(struct led_classdev *cdev,
>
> static int lp5860_chip_enable_toggle(struct lp5860 *led, int enable)
> {
> + if (led->enable_gpiod)
> + gpiod_direction_output(led->enable_gpiod, enable);
> +
> return regmap_write(led->regmap, LP5860_REG_CHIP_EN, enable);
> }
>
> @@ -170,6 +173,13 @@ int lp5860_device_init(struct device *dev)
> struct lp5860 *lp = dev_get_drvdata(dev);
> int ret;
>
> + lp->enable_gpiod = devm_gpiod_get_optional(lp->dev, "enable", GPIOD_ASIS);
> + if (IS_ERR(lp->enable_gpiod))
> + return PTR_ERR(lp->enable_gpiod);
> +
> + if (lp->enable_gpiod)
> + gpiod_set_consumer_name(lp->enable_gpiod, "LP5860 VIO enable");
> +
> ret = lp5860_chip_enable_toggle(lp, LP5860_CHIP_ENABLE);
> if (ret)
> return ret;
> diff --git a/include/linux/platform_data/leds-lp5860.h b/include/linux/platform_data/leds-lp5860.h
> index 7bc69a7a550dd..7258d0674ce59 100644
> --- a/include/linux/platform_data/leds-lp5860.h
> +++ b/include/linux/platform_data/leds-lp5860.h
> @@ -257,6 +257,7 @@ struct lp5860_led {
> struct lp5860 {
> struct device *dev;
> struct regmap *regmap;
> + struct gpio_desc *enable_gpiod;
> unsigned int leds_count;
>
> DECLARE_FLEX_ARRAY(struct lp5860_led, leds);
Is this okay? Anything needs to be done here?
Best regards,
Steffen
--
Pengutronix e.K. | Dipl.-Inform. Steffen Trumtrar |
Steuerwalder Str. 21 | https://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686| Fax: +49-5121-206917-5555 |
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 0/2] leds: lp5860: add enable-gpio
2026-02-17 15:35 [PATCH 0/2] leds: lp5860: add enable-gpio Steffen Trumtrar
2026-02-17 15:35 ` [PATCH 1/2] dt-bindings: " Steffen Trumtrar
2026-02-17 15:35 ` [PATCH 2/2] leds: rgb: " Steffen Trumtrar
@ 2026-03-09 18:22 ` Lee Jones
2 siblings, 0 replies; 6+ messages in thread
From: Lee Jones @ 2026-03-09 18:22 UTC (permalink / raw)
To: Steffen Trumtrar
Cc: Pavel Machek, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Steffen Trumtrar, linux-leds, devicetree, linux-kernel
On Tue, 17 Feb 2026, Steffen Trumtrar wrote:
> The LP5860 can have the VIO_EN pin either be connected to VIO power
> supply or a GPIO.
>
> Add support for the pin to the devicetree binding and the driver.
>
> Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de>
> ---
> Steffen Trumtrar (2):
> dt-bindings: leds: lp5860: add enable-gpio
> leds: rgb: lp5860: add enable-gpio
>
> Documentation/devicetree/bindings/leds/leds-lp5860.yaml | 7 +++++++
> drivers/leds/rgb/leds-lp5860-core.c | 10 ++++++++++
> include/linux/platform_data/leds-lp5860.h | 1 +
> 3 files changed, 18 insertions(+)
> ---
> base-commit: 51455910fda1e5e315f604b7633f413116d4fa1f
> change-id: 20260217-v6-19-topic-ti-lp5860-enable-gpio-83c0652d34ad
> prerequisite-message-id: <20260217-v6-14-topic-ti-lp5860-v6-1-54a766d8b602@pengutronix.de>
> prerequisite-patch-id: 1d4485e2a6544fae1103cf9475f317773f206dc5
As you're probably already aware, the set does not apply.
--
Lee Jones [李琼斯]
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2026-03-09 18:22 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-17 15:35 [PATCH 0/2] leds: lp5860: add enable-gpio Steffen Trumtrar
2026-02-17 15:35 ` [PATCH 1/2] dt-bindings: " Steffen Trumtrar
2026-02-17 17:54 ` Conor Dooley
2026-02-17 15:35 ` [PATCH 2/2] leds: rgb: " Steffen Trumtrar
2026-03-05 8:57 ` Steffen Trumtrar
2026-03-09 18:22 ` [PATCH 0/2] leds: " Lee Jones
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox