Skip to contentSkip to conversation

dt-bindings: leds-lp55xx: limit pwr-sel property to ti,lp8501

PATCH Superseded Christian Marangi 2 participants 4 messages May 18, 2024 – May 20, 2024

Subsystems (2)

v2 of 8 Superseded Latest is v8 →

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/3 dt-bindings: leds-lp55xx: limit pwr-sel property to ti,lp8501

pwr-sel property is specific to ti,lp8501, make it conditional of the related compatible.

---
 .../devicetree/bindings/leds/leds-lp55xx.yaml          | 10 ++++++++++
 1 file changed, 10 insertions(+)
Documentation/devicetree/bindings/leds/leds-lp55xx.yaml +10 -0
index e9d4514d0166..77828dedbb9f 100644
@@ -151,6 +151,16 @@ patternProperties:
         $ref: /schemas/types.yaml#/definitions/string
         description: name of channel
 
+if:
+  not:
+    properties:
+      compatible:
+        contains:
+          const: ti,lp8501
+then:
+  properties:
+    pwr-sel: false
+
 required:
   - compatible
   - reg
Signature · 1 line
2.43.0
#1 lore raw

PATCH v2 2/3 dt-bindings: leds-lp55xx: Add new ti,lp5569 compatible

Add new ti,lp5569 compatible, this is similar to national,lp5523 with slight change to reg order and reg type and advanced way for LED fault.

---
v2:
- Add ACK tag

 Documentation/devicetree/bindings/leds/leds-lp55xx.yaml | 1 +
 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/leds/leds-lp55xx.yaml +1 -0
index 77828dedbb9f..fe8aaecf3010 100644
@@ -28,6 +28,7 @@ properties:
       - national,lp5523
       - ti,lp55231
       - ti,lp5562
+      - ti,lp5569
       - ti,lp8501
 
   reg:
Signature · 1 line
2.43.0
#2 lore raw

PATCH v2 3/3 leds: leds-lp5569: Add support for Texas Instruments LP5569

In reply to Christian Marangi

Add support for Texas Instruments LP5569 LED driver.

Texas Instruments LP5569 is 9 channels chip with programmable engines.

It almost a copy of LP5523 with fundamental changes to regs order and regs content.

Has difference in how the clock is handled and doesn't support detecting clock time automatically, different handling for selftest and different sheme for the status regs.

---
v2:
- Fix compilation error with target that doesn't
include bitfield.h

 drivers/leds/Kconfig       |   16 +-
 drivers/leds/Makefile      |    1 +
 drivers/leds/leds-lp5569.c | 1146 ++++++++++++++++++++++++++++++++++++
 3 files changed, 1160 insertions(+), 3 deletions(-)
 create mode 100644 drivers/leds/leds-lp5569.c
drivers/leds/Kconfig +13 -3
index 05e6af88b88c..b1d7d94317b3 100644
@@ -414,7 +414,7 @@ config LEDS_LP50XX
 	  module will be called leds-lp50xx.
 
 config LEDS_LP55XX_COMMON
-	tristate "Common Driver for TI/National LP5521/5523/55231/5562/8501"
+	tristate "Common Driver for TI/National LP5521/5523/55231/5562/5569/8501"
 	depends on LEDS_CLASS
 	depends on LEDS_CLASS_MULTICOLOR
 	depends on OF
@@ -422,8 +422,8 @@ config LEDS_LP55XX_COMMON
 	select FW_LOADER
 	select FW_LOADER_USER_HELPER
 	help
-	  This option supports common operations for LP5521/5523/55231/5562/8501
-	  devices.
+	  This option supports common operations for LP5521/5523/55231/5562/5569/
+	  8501 devices.
 
 config LEDS_LP5521
 	tristate "LED Support for N.S. LP5521 LED driver chip"
@@ -456,6 +456,16 @@ config LEDS_LP5562
 	  Driver provides direct control via LED class and interface for
 	  programming the engines.
 
+config LEDS_LP5569
+	tristate "LED Support for TI LP5569 LED driver chip"
+	depends on LEDS_CLASS && I2C
+	depends on LEDS_LP55XX_COMMON
+	help
+	  If you say yes here you get support for TI LP5569 LED driver.
+	  It is 9 channels chip with programmable engines.
+	  Driver provides direct control via LED class and interface for
+	  programming the engines.
+
 config LEDS_LP8501
 	tristate "LED Support for TI LP8501 LED driver chip"
 	depends on LEDS_CLASS && I2C
drivers/leds/Makefile +1 -0
index effdfc6f1e95..ad21941efa19 100644
@@ -51,6 +51,7 @@ obj-$(CONFIG_LEDS_LP50XX)		+= leds-lp50xx.o
 obj-$(CONFIG_LEDS_LP5521)		+= leds-lp5521.o
 obj-$(CONFIG_LEDS_LP5523)		+= leds-lp5523.o
 obj-$(CONFIG_LEDS_LP5562)		+= leds-lp5562.o
+obj-$(CONFIG_LEDS_LP5569)		+= leds-lp5569.o
 obj-$(CONFIG_LEDS_LP55XX_COMMON)	+= leds-lp55xx-common.o
 obj-$(CONFIG_LEDS_LP8501)		+= leds-lp8501.o
 obj-$(CONFIG_LEDS_LP8788)		+= leds-lp8788.o
drivers/leds/leds-lp5569.c new file +1146 -0

1,146 lines not on this page · raw message

Signature · 1 line
2.43.0