Skip to contentSkip to conversation

dt: bindings: lm3692x: Add bindings for lm3692x LED driver

PATCH Superseded Dan Murphy 3 participants 9 messages Dec 5, 2017 – Dec 11, 2017

Subsystems (2)

v8 of 11 Superseded Latest is v11 →

lore
Share & tools
lore

Dan Murphy

author
#0 lore raw

PATCH v8 1/2 dt: bindings: lm3692x: Add bindings for lm3692x LED driver

This adds the devicetree bindings for the LM3692x
I2C LED string driver.

---

v8 - Added address-cells and size-cells as well as child node reg - https://patchwork.kernel.org/patch/10091259/
v7 - No changes - https://patchwork.kernel.org/patch/10087475/
v6 - No changes -https://patchwork.kernel.org/patch/10085567/
v5 - No Changes - https://patchwork.kernel.org/patch/10081071/
v4 - Fix example node, added trigger entry, removed ambiguous x for compatible and
added common.txt pointer for label - https://patchwork.kernel.org/patch/10060107
v3 - No changes
v2 - No changes - https://patchwork.kernel.org/patch/10056677/

 .../devicetree/bindings/leds/leds-lm3692x.txt      | 47 ++++++++++++++++++++++
 1 file changed, 47 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/leds/leds-lm3692x.txt
Documentation/devicetree/bindings/leds/leds-lm3692x.txt new file +47 -0
new file mode 100644
index 000000000000..84f69342d879
@@ -0,0 +1,47 @@
+* Texas Instruments - LM3692x Highly Efficient White LED Driver
+
+The LM3692x is an ultra-compact, highly efficient,
+white-LED driver designed for LCD display backlighting.
+
+The main difference between the LM36922 and LM36923 is the number of
+LED strings it supports.  The LM36922 supports two strings while the LM36923
+supports three strings.
+
+Required properties:
+	- compatible:
+		"ti,lm36922"
+		"ti,lm36923"
+	- reg :  I2C slave address
+	- #address-cells : 1
+	- #size-cells : 0
+
+Optional properties:
+	- label : see Documentation/devicetree/bindings/leds/common.txt
+	- enable-gpios : gpio pin to enable/disable the device.
+	- vled-supply : LED supply
+	- linux,default-trigger : (optional)
+	   see Documentation/devicetree/bindings/leds/common.txt
+
+Required child properties:
+	- reg : 0
+
+Example:
+
+lm3692x@36 {
+	compatible = "ti,lm3692x";
+	reg = <0x36>;
+	#address-cells = <1>;
+	#size-cells = <0>;
+
+	enable-gpios = <&gpio1 28 GPIO_ACTIVE_HIGH>;
+	vled-supply = <&vbatt>;
+
+	backlight: backlight@0 {
+		reg = <0>;
+		label = "backlight_cluster";
+		linux,default-trigger = "backlight";
+	};
+}
+
+For more product information please see the link below:
+http://www.ti.com/lit/ds/snvsa29/snvsa29.pdf
Signature · 1 line
2.15.0.124.g7668cbc60
author
#1 lore raw

PATCH v8 2/2 leds: lm3692x: Introduce LM3692x dual string driver

Introducing the LM3692x Dual-String white LED driver.

Data sheet is located
http://www.ti.com/lit/ds/snvsa29/snvsa29.pdf

---

v8 - No changes

v7 - Reverted back to creating the LED label within the driver -
https://patchwork.kernel.org/patch/10087473/
v6 - Use new LED API to compose LED label as opposed to creating it. -
https://patchwork.kernel.org/patch/10085565/
v5 - Added OF dependency in Kconfig, added extra fault flag read to ensure that
if a fault exists and it is not a artifact, fixed LED class label to be derived from either the DT child "label" node or create a label based on parent_node_name:led color:trigger, removed ifdef for CONFIG_OF and removed of_match_ptr - https://patchwork.kernel.org/patch/10081073/
v4 - Converted to devm led class register, changed MODULE_LICENSE to GPL v2,
set the led name based on child node name or label entry, removed fault and returned read_buf for fault checking, added mutex_destroy to remove function,
and removed LED_FULL - https://patchwork.kernel.org/patch/10060109/
v3 - Add missing Makefile and Kconfig from v1 and v2 - https://patchwork.kernel.org/patch/10060075/
v2 - Added data sheet link, fixed linuxdoc format, returned on failure in init routine, return on fault_check failure, updated brightness calculation and
fixed capitalization issue - https://patchwork.kernel.org/patch/10056675/

 drivers/leds/Kconfig        |   7 +
 drivers/leds/Makefile       |   1 +
 drivers/leds/leds-lm3692x.c | 393 ++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 401 insertions(+)
 create mode 100644 drivers/leds/leds-lm3692x.c
drivers/leds/Kconfig +7 -0
index 318a28fd58fe..1d215b39cefd 100644
@@ -137,6 +137,13 @@ config LEDS_LM3642
 	  converter plus 1.5A constant current driver for a high-current
 	  white LED.
 
+config LEDS_LM3692X
+	tristate "LED support for LM3692x Chips"
+	depends on LEDS_CLASS && I2C && OF
+	select REGMAP_I2C
+	help
+	  This option enables support for the TI LM3692x family
+	  of white LED string drivers used for backlighting.
 
 config LEDS_LOCOMO
 	tristate "LED Support for Locomo device"
drivers/leds/Makefile +1 -0
index a2a6b5a4f86d..987884a5b9a5 100644
@@ -74,6 +74,7 @@ obj-$(CONFIG_LEDS_PM8058)		+= leds-pm8058.o
 obj-$(CONFIG_LEDS_MLXCPLD)		+= leds-mlxcpld.o
 obj-$(CONFIG_LEDS_NIC78BX)		+= leds-nic78bx.o
 obj-$(CONFIG_LEDS_MT6323)		+= leds-mt6323.o
+obj-$(CONFIG_LEDS_LM3692X)		+= leds-lm3692x.o
 
 # LED SPI Drivers
 obj-$(CONFIG_LEDS_DAC124S085)		+= leds-dac124s085.o
drivers/leds/leds-lm3692x.c new file +393 -0

393 lines not on this page · raw message

Signature · 1 line
2.15.0.124.g7668cbc60
maintainer
#2 lore raw
In reply to Dan Murphy
Quoted 35 lines · Dan Murphy

This adds the devicetree bindings for the LM3692x
I2C LED string driver.

---

v8 - Added address-cells and size-cells as well as child node reg - https://patchwork.kernel.org/patch/10091259/
v7 - No changes - https://patchwork.kernel.org/patch/10087475/
v6 - No changes -https://patchwork.kernel.org/patch/10085567/
v5 - No Changes - https://patchwork.kernel.org/patch/10081071/
v4 - Fix example node, added trigger entry, removed ambiguous x for compatible and
added common.txt pointer for label - https://patchwork.kernel.org/patch/10060107
v3 - No changes
v2 - No changes - https://patchwork.kernel.org/patch/10056677/

 .../devicetree/bindings/leds/leds-lm3692x.txt      | 47 ++++++++++++++++++++++
 1 file changed, 47 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/leds/leds-lm3692x.txt
Documentation/devicetree/bindings/leds/leds-lm3692x.txt new file +9 -0
new file mode 100644
index 000000000000..84f69342d879
@@ -0,0 +1,47 @@
+* Texas Instruments - LM3692x Highly Efficient White LED Driver
+
+The LM3692x is an ultra-compact, highly efficient,
+white-LED driver designed for LCD display backlighting.
+
+The main difference between the LM36922 and LM36923 is the number of
+LED strings it supports.  The LM36922 supports two strings while the LM36923
+supports three strings.
+

Documentation/devicetree/bindings/leds/leds-lm3692x.txt line 19

Quoted 10 lines
Documentation/devicetree/bindings/leds/leds-lm3692x.txt new file +10 -0
+Required properties:
+	- compatible:
+		"ti,lm36922"
+		"ti,lm36923"
+	- reg :  I2C slave address
+	- #address-cells : 1
+	- #size-cells : 0
+
+Optional properties:
+	- label : see Documentation/devicetree/bindings/leds/common.txt

Should be a child prop.

Documentation/devicetree/bindings/leds/leds-lm3692x.txt line 23

Quoted 4 lines
Documentation/devicetree/bindings/leds/leds-lm3692x.txt new file +4 -0
+	- enable-gpios : gpio pin to enable/disable the device.
+	- vled-supply : LED supply
+	- linux,default-trigger : (optional)
+	   see Documentation/devicetree/bindings/leds/common.txt

Ditto.

Documentation/devicetree/bindings/leds/leds-lm3692x.txt line 30

Quoted 7 lines
Documentation/devicetree/bindings/leds/leds-lm3692x.txt new file +7 -0
+
+Required child properties:
+	- reg : 0
+
+Example:
+
+lm3692x@36 {

leds@36

It looks like you could just add the compatible strings to the existing binding you're modifying?

Quoted 20 lines
Documentation/devicetree/bindings/leds/leds-lm3692x.txt new file +17 -0
+	compatible = "ti,lm3692x";
+	reg = <0x36>;
+	#address-cells = <1>;
+	#size-cells = <0>;
+
+	enable-gpios = <&gpio1 28 GPIO_ACTIVE_HIGH>;
+	vled-supply = <&vbatt>;
+
+	backlight: backlight@0 {
+		reg = <0>;
+		label = "backlight_cluster";
+		linux,default-trigger = "backlight";
+	};
+}
+
+For more product information please see the link below:
+http://www.ti.com/lit/ds/snvsa29/snvsa29.pdf
Signature · 1 line
2.15.0.124.g7668cbc60
author
#3 lore raw

Rob

Quoted 40 lines · Rob Herring
Quoted 39 lines · Dan Murphy

This adds the devicetree bindings for the LM3692x
I2C LED string driver.

---

v8 - Added address-cells and size-cells as well as child node reg - https://patchwork.kernel.org/patch/10091259/
v7 - No changes - https://patchwork.kernel.org/patch/10087475/
v6 - No changes -https://patchwork.kernel.org/patch/10085567/
v5 - No Changes - https://patchwork.kernel.org/patch/10081071/
v4 - Fix example node, added trigger entry, removed ambiguous x for compatible and
added common.txt pointer for label - https://patchwork.kernel.org/patch/10060107
v3 - No changes
v2 - No changes - https://patchwork.kernel.org/patch/10056677/

 .../devicetree/bindings/leds/leds-lm3692x.txt      | 47 ++++++++++++++++++++++
 1 file changed, 47 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/leds/leds-lm3692x.txt
Documentation/devicetree/bindings/leds/leds-lm3692x.txt new file +13 -0
new file mode 100644
index 000000000000..84f69342d879
@@ -0,0 +1,47 @@
+* Texas Instruments - LM3692x Highly Efficient White LED Driver
+
+The LM3692x is an ultra-compact, highly efficient,
+white-LED driver designed for LCD display backlighting.
+
+The main difference between the LM36922 and LM36923 is the number of
+LED strings it supports.  The LM36922 supports two strings while the LM36923
+supports three strings.
+
+Required properties:
+	- compatible:
+		"ti,lm36922"
+		"ti,lm36923"
Quoted 8 lines

Documentation/devicetree/bindings/leds/leds-lm3692x.txt line 19

Quoted 6 lines
Documentation/devicetree/bindings/leds/leds-lm3692x.txt new file +6 -0
+	- reg :  I2C slave address
+	- #address-cells : 1
+	- #size-cells : 0
+
+Optional properties:
+	- label : see Documentation/devicetree/bindings/leds/common.txt

Should be a child prop.

Thanks I forgot to move this to Optional Child Properties.

Quoted 7 lines

Documentation/devicetree/bindings/leds/leds-lm3692x.txt line 23

Quoted 5 lines
Documentation/devicetree/bindings/leds/leds-lm3692x.txt new file +4 -0
+	- enable-gpios : gpio pin to enable/disable the device.
+	- vled-supply : LED supply
+	- linux,default-trigger : (optional)
+	   see Documentation/devicetree/bindings/leds/common.txt

Ditto.

Ack

Quoted 10 lines

Documentation/devicetree/bindings/leds/leds-lm3692x.txt line 30

Quoted 8 lines
Documentation/devicetree/bindings/leds/leds-lm3692x.txt new file +7 -0
+
+Required child properties:
+	- reg : 0
+
+Example:
+
+lm3692x@36 {

leds@36

Rob why does this need to be leds? Is this because it would be a child of an I2C node?

Jacek
Would this not cause and issue for your proposal to take the parent node name as part of the LED label?

Dan

Quoted 24 lines

It looks like you could just add the compatible strings to the existing binding you're modifying?

Quoted 20 lines
Documentation/devicetree/bindings/leds/leds-lm3692x.txt new file +17 -0
+	compatible = "ti,lm3692x";
+	reg = <0x36>;
+	#address-cells = <1>;
+	#size-cells = <0>;
+
+	enable-gpios = <&gpio1 28 GPIO_ACTIVE_HIGH>;
+	vled-supply = <&vbatt>;
+
+	backlight: backlight@0 {
+		reg = <0>;
+		label = "backlight_cluster";
+		linux,default-trigger = "backlight";
+	};
+}
+
+For more product information please see the link below:
+http://www.ti.com/lit/ds/snvsa29/snvsa29.pdf
Signature · 1 line
2.15.0.124.g7668cbc60
Signature · 6 lines
------------------
Dan Murphy
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#4 lore raw
Quoted 76 lines · Dan Murphy

Rob

Quoted 40 lines · Rob Herring
Quoted 39 lines · Dan Murphy

This adds the devicetree bindings for the LM3692x
I2C LED string driver.

---

v8 - Added address-cells and size-cells as well as child node reg - https://patchwork.kernel.org/patch/10091259/
v7 - No changes - https://patchwork.kernel.org/patch/10087475/
v6 - No changes -https://patchwork.kernel.org/patch/10085567/
v5 - No Changes - https://patchwork.kernel.org/patch/10081071/
v4 - Fix example node, added trigger entry, removed ambiguous x for compatible and
added common.txt pointer for label - https://patchwork.kernel.org/patch/10060107
v3 - No changes
v2 - No changes - https://patchwork.kernel.org/patch/10056677/

 .../devicetree/bindings/leds/leds-lm3692x.txt      | 47 ++++++++++++++++++++++
 1 file changed, 47 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/leds/leds-lm3692x.txt
Documentation/devicetree/bindings/leds/leds-lm3692x.txt new file +13 -0
new file mode 100644
index 000000000000..84f69342d879
@@ -0,0 +1,47 @@
+* Texas Instruments - LM3692x Highly Efficient White LED Driver
+
+The LM3692x is an ultra-compact, highly efficient,
+white-LED driver designed for LCD display backlighting.
+
+The main difference between the LM36922 and LM36923 is the number of
+LED strings it supports.  The LM36922 supports two strings while the LM36923
+supports three strings.
+
+Required properties:
+	- compatible:
+		"ti,lm36922"
+		"ti,lm36923"
Quoted 8 lines

Documentation/devicetree/bindings/leds/leds-lm3692x.txt line 19

Quoted 6 lines
Documentation/devicetree/bindings/leds/leds-lm3692x.txt new file +6 -0
+	- reg :  I2C slave address
+	- #address-cells : 1
+	- #size-cells : 0
+
+Optional properties:
+	- label : see Documentation/devicetree/bindings/leds/common.txt

Should be a child prop.

Thanks I forgot to move this to Optional Child Properties.

Quoted 7 lines

Documentation/devicetree/bindings/leds/leds-lm3692x.txt line 23

Quoted 5 lines
Documentation/devicetree/bindings/leds/leds-lm3692x.txt new file +4 -0
+	- enable-gpios : gpio pin to enable/disable the device.
+	- vled-supply : LED supply
+	- linux,default-trigger : (optional)
+	   see Documentation/devicetree/bindings/leds/common.txt

Ditto.

Ack

Quoted 10 lines

Documentation/devicetree/bindings/leds/leds-lm3692x.txt line 30

Quoted 8 lines
Documentation/devicetree/bindings/leds/leds-lm3692x.txt new file +7 -0
+
+Required child properties:
+	- reg : 0
+
+Example:
+
+lm3692x@36 {

leds@36

Quoted 4 lines

Rob why does this need to be leds? Is this because it would be a child of an I2C node?

Jacek
Would this not cause and issue for your proposal to take the parent node name as part of the LED label?

Yes, it would.

Rob, does something prevent us from adding a requirement that LED controller DT node has to contain the chip name (besides the unit address)? Many current LED controller nodes apply this pattern.

Also, I would appreciate if you could express your opinion on the patch [0].

[0] https://patchwork.kernel.org/patch/10089047/

Signature · 2 lines
Best regards,
Jacek Anaszewski
maintainer
#5 lore raw
Quoted 79 lines · Jacek Anaszewski
Quoted 78 lines · Dan Murphy

Rob

Quoted 40 lines · Rob Herring
Quoted 39 lines · Dan Murphy

This adds the devicetree bindings for the LM3692x
I2C LED string driver.

---

v8 - Added address-cells and size-cells as well as child node reg - https://patchwork.kernel.org/patch/10091259/
v7 - No changes - https://patchwork.kernel.org/patch/10087475/
v6 - No changes -https://patchwork.kernel.org/patch/10085567/
v5 - No Changes - https://patchwork.kernel.org/patch/10081071/
v4 - Fix example node, added trigger entry, removed ambiguous x for compatible and
added common.txt pointer for label - https://patchwork.kernel.org/patch/10060107
v3 - No changes
v2 - No changes - https://patchwork.kernel.org/patch/10056677/

 .../devicetree/bindings/leds/leds-lm3692x.txt      | 47 ++++++++++++++++++++++
 1 file changed, 47 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/leds/leds-lm3692x.txt
Documentation/devicetree/bindings/leds/leds-lm3692x.txt new file +13 -0
new file mode 100644
index 000000000000..84f69342d879
@@ -0,0 +1,47 @@
+* Texas Instruments - LM3692x Highly Efficient White LED Driver
+
+The LM3692x is an ultra-compact, highly efficient,
+white-LED driver designed for LCD display backlighting.
+
+The main difference between the LM36922 and LM36923 is the number of
+LED strings it supports.  The LM36922 supports two strings while the LM36923
+supports three strings.
+
+Required properties:
+   - compatible:
+           "ti,lm36922"
+           "ti,lm36923"
Quoted 8 lines

Documentation/devicetree/bindings/leds/leds-lm3692x.txt line 19

Quoted 6 lines
Documentation/devicetree/bindings/leds/leds-lm3692x.txt new file +6 -0
+   - reg :  I2C slave address
+   - #address-cells : 1
+   - #size-cells : 0
+
+Optional properties:
+   - label : see Documentation/devicetree/bindings/leds/common.txt

Should be a child prop.

Thanks I forgot to move this to Optional Child Properties.

Quoted 7 lines

Documentation/devicetree/bindings/leds/leds-lm3692x.txt line 23

Quoted 5 lines
Documentation/devicetree/bindings/leds/leds-lm3692x.txt new file +4 -0
+   - enable-gpios : gpio pin to enable/disable the device.
+   - vled-supply : LED supply
+   - linux,default-trigger : (optional)
+      see Documentation/devicetree/bindings/leds/common.txt

Ditto.

Ack

Quoted 10 lines

Documentation/devicetree/bindings/leds/leds-lm3692x.txt line 30

Quoted 8 lines
Documentation/devicetree/bindings/leds/leds-lm3692x.txt new file +7 -0
+
+Required child properties:
+   - reg : 0
+
+Example:
+
+lm3692x@36 {

leds@36

Rob why does this need to be leds? Is this because it would be a child of an I2C node?

Quoted 8 lines
Quoted 2 lines

Jacek
Would this not cause and issue for your proposal to take the parent node name as part of the LED label?

Yes, it would.

Rob, does something prevent us from adding a requirement that LED controller DT node has to contain the chip name (besides the unit address)? Many current LED controller nodes apply this pattern.

Only because we've been lax on the naming. We want to use generic names because the DT spec says to and it provides a way to match nodes to validation checks.

I only think we should use the chip name if the device doesn't fit some standard class.

Quoted 4 lines

Also, I would appreciate if you could express your opinion on the patch [0].

[0] https://patchwork.kernel.org/patch/10089047/

I'll have to go find it. It is not in my queue, so it wasn't sent to the DT list.

Rob
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

maintainer
#6 lore raw
In reply to Dan Murphy
Quoted 76 lines · Dan Murphy

Rob

Quoted 40 lines · Rob Herring
Quoted 39 lines · Dan Murphy

This adds the devicetree bindings for the LM3692x
I2C LED string driver.

---

v8 - Added address-cells and size-cells as well as child node reg - https://patchwork.kernel.org/patch/10091259/
v7 - No changes - https://patchwork.kernel.org/patch/10087475/
v6 - No changes -https://patchwork.kernel.org/patch/10085567/
v5 - No Changes - https://patchwork.kernel.org/patch/10081071/
v4 - Fix example node, added trigger entry, removed ambiguous x for compatible and
added common.txt pointer for label - https://patchwork.kernel.org/patch/10060107
v3 - No changes
v2 - No changes - https://patchwork.kernel.org/patch/10056677/

 .../devicetree/bindings/leds/leds-lm3692x.txt      | 47 ++++++++++++++++++++++
 1 file changed, 47 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/leds/leds-lm3692x.txt
Documentation/devicetree/bindings/leds/leds-lm3692x.txt new file +13 -0
new file mode 100644
index 000000000000..84f69342d879
@@ -0,0 +1,47 @@
+* Texas Instruments - LM3692x Highly Efficient White LED Driver
+
+The LM3692x is an ultra-compact, highly efficient,
+white-LED driver designed for LCD display backlighting.
+
+The main difference between the LM36922 and LM36923 is the number of
+LED strings it supports.  The LM36922 supports two strings while the LM36923
+supports three strings.
+
+Required properties:
+    - compatible:
+            "ti,lm36922"
+            "ti,lm36923"
Quoted 8 lines

Documentation/devicetree/bindings/leds/leds-lm3692x.txt line 19

Quoted 6 lines
Documentation/devicetree/bindings/leds/leds-lm3692x.txt new file +6 -0
+    - reg :  I2C slave address
+    - #address-cells : 1
+    - #size-cells : 0
+
+Optional properties:
+    - label : see Documentation/devicetree/bindings/leds/common.txt

Should be a child prop.

Thanks I forgot to move this to Optional Child Properties.

Quoted 7 lines

Documentation/devicetree/bindings/leds/leds-lm3692x.txt line 23

Quoted 5 lines
Documentation/devicetree/bindings/leds/leds-lm3692x.txt new file +4 -0
+    - enable-gpios : gpio pin to enable/disable the device.
+    - vled-supply : LED supply
+    - linux,default-trigger : (optional)
+       see Documentation/devicetree/bindings/leds/common.txt

Ditto.

Ack

Quoted 10 lines

Documentation/devicetree/bindings/leds/leds-lm3692x.txt line 30

Quoted 8 lines
Documentation/devicetree/bindings/leds/leds-lm3692x.txt new file +7 -0
+
+Required child properties:
+    - reg : 0
+
+Example:
+
+lm3692x@36 {

leds@36

Quoted 1 line

Rob why does this need to be leds? Is this because it would be a child of an I2C node?

Because node names are supposed to follow the generic type of device they are (e.g. serial, ethernet, bus, etc.), not the model of device. And yes, there are many examples that don't follow this.

Quoted 4 lines

Jacek
Would this not cause and issue for your proposal to take the parent node name as part of the LED label?

Dan

author
#7 lore raw

Rob

Quoted 77 lines · Rob Herring
Quoted 76 lines · Dan Murphy

Rob

Quoted 40 lines · Rob Herring
Quoted 39 lines · Dan Murphy

This adds the devicetree bindings for the LM3692x
I2C LED string driver.

---

v8 - Added address-cells and size-cells as well as child node reg - https://patchwork.kernel.org/patch/10091259/
v7 - No changes - https://patchwork.kernel.org/patch/10087475/
v6 - No changes -https://patchwork.kernel.org/patch/10085567/
v5 - No Changes - https://patchwork.kernel.org/patch/10081071/
v4 - Fix example node, added trigger entry, removed ambiguous x for compatible and
added common.txt pointer for label - https://patchwork.kernel.org/patch/10060107
v3 - No changes
v2 - No changes - https://patchwork.kernel.org/patch/10056677/

 .../devicetree/bindings/leds/leds-lm3692x.txt      | 47 ++++++++++++++++++++++
 1 file changed, 47 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/leds/leds-lm3692x.txt
Documentation/devicetree/bindings/leds/leds-lm3692x.txt new file +13 -0
new file mode 100644
index 000000000000..84f69342d879
@@ -0,0 +1,47 @@
+* Texas Instruments - LM3692x Highly Efficient White LED Driver
+
+The LM3692x is an ultra-compact, highly efficient,
+white-LED driver designed for LCD display backlighting.
+
+The main difference between the LM36922 and LM36923 is the number of
+LED strings it supports.  The LM36922 supports two strings while the LM36923
+supports three strings.
+
+Required properties:
+    - compatible:
+            "ti,lm36922"
+            "ti,lm36923"
Quoted 8 lines

Documentation/devicetree/bindings/leds/leds-lm3692x.txt line 19

Quoted 6 lines
Documentation/devicetree/bindings/leds/leds-lm3692x.txt new file +6 -0
+    - reg :  I2C slave address
+    - #address-cells : 1
+    - #size-cells : 0
+
+Optional properties:
+    - label : see Documentation/devicetree/bindings/leds/common.txt

Should be a child prop.

Thanks I forgot to move this to Optional Child Properties.

Quoted 7 lines

Documentation/devicetree/bindings/leds/leds-lm3692x.txt line 23

Quoted 5 lines
Documentation/devicetree/bindings/leds/leds-lm3692x.txt new file +4 -0
+    - enable-gpios : gpio pin to enable/disable the device.
+    - vled-supply : LED supply
+    - linux,default-trigger : (optional)
+       see Documentation/devicetree/bindings/leds/common.txt

Ditto.

Ack

Quoted 10 lines

Documentation/devicetree/bindings/leds/leds-lm3692x.txt line 30

Quoted 8 lines
Documentation/devicetree/bindings/leds/leds-lm3692x.txt new file +7 -0
+
+Required child properties:
+    - reg : 0
+
+Example:
+
+lm3692x@36 {

leds@36

Quoted 6 lines
Quoted 1 line

Rob why does this need to be leds? Is this because it would be a child of an I2C node?

Because node names are supposed to follow the generic type of device they are (e.g. serial, ethernet, bus, etc.), not the model of device. And yes, there are many examples that don't follow this.

OK. I guess I will need to update the code to take the compatible or for my case the extract the name from the struct i2c_device_id.

Jacek

I am going to have to update the code to extract the name differently when there is no label. I don't think pulling the parent node name will scale in the future.

Dan

Quoted 4 lines
Quoted 4 lines

Jacek
Would this not cause and issue for your proposal to take the parent node name as part of the LED label?

Dan

Signature · 6 lines
------------------
Dan Murphy
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
maintainer
#8 lore raw
In reply to Rob Herring
Quoted 77 lines · Rob Herring
Quoted 76 lines · Dan Murphy

Rob

Quoted 40 lines · Rob Herring
Quoted 39 lines · Dan Murphy

This adds the devicetree bindings for the LM3692x
I2C LED string driver.

---

v8 - Added address-cells and size-cells as well as child node reg - https://patchwork.kernel.org/patch/10091259/
v7 - No changes - https://patchwork.kernel.org/patch/10087475/
v6 - No changes -https://patchwork.kernel.org/patch/10085567/
v5 - No Changes - https://patchwork.kernel.org/patch/10081071/
v4 - Fix example node, added trigger entry, removed ambiguous x for compatible and
added common.txt pointer for label - https://patchwork.kernel.org/patch/10060107
v3 - No changes
v2 - No changes - https://patchwork.kernel.org/patch/10056677/

 .../devicetree/bindings/leds/leds-lm3692x.txt      | 47 ++++++++++++++++++++++
 1 file changed, 47 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/leds/leds-lm3692x.txt
Documentation/devicetree/bindings/leds/leds-lm3692x.txt new file +13 -0
new file mode 100644
index 000000000000..84f69342d879
@@ -0,0 +1,47 @@
+* Texas Instruments - LM3692x Highly Efficient White LED Driver
+
+The LM3692x is an ultra-compact, highly efficient,
+white-LED driver designed for LCD display backlighting.
+
+The main difference between the LM36922 and LM36923 is the number of
+LED strings it supports.  The LM36922 supports two strings while the LM36923
+supports three strings.
+
+Required properties:
+    - compatible:
+            "ti,lm36922"
+            "ti,lm36923"
Quoted 8 lines

Documentation/devicetree/bindings/leds/leds-lm3692x.txt line 19

Quoted 6 lines
Documentation/devicetree/bindings/leds/leds-lm3692x.txt new file +6 -0
+    - reg :  I2C slave address
+    - #address-cells : 1
+    - #size-cells : 0
+
+Optional properties:
+    - label : see Documentation/devicetree/bindings/leds/common.txt

Should be a child prop.

Thanks I forgot to move this to Optional Child Properties.

Quoted 7 lines

Documentation/devicetree/bindings/leds/leds-lm3692x.txt line 23

Quoted 5 lines
Documentation/devicetree/bindings/leds/leds-lm3692x.txt new file +4 -0
+    - enable-gpios : gpio pin to enable/disable the device.
+    - vled-supply : LED supply
+    - linux,default-trigger : (optional)
+       see Documentation/devicetree/bindings/leds/common.txt

Ditto.

Ack

Quoted 10 lines

Documentation/devicetree/bindings/leds/leds-lm3692x.txt line 30

Quoted 8 lines
Documentation/devicetree/bindings/leds/leds-lm3692x.txt new file +7 -0
+
+Required child properties:
+    - reg : 0
+
+Example:
+
+lm3692x@36 {

leds@36

Quoted 5 lines
Quoted 1 line

Rob why does this need to be leds? Is this because it would be a child of an I2C node?

Because node names are supposed to follow the generic type of device they are (e.g. serial, ethernet, bus, etc.), not the model of device. And yes, there are many examples that don't follow this.

Actually, it should be led-controller and led or leds be used for the LED child nodes (and gpio-led or pwd-led bindings), so like this:

led-controller@12 {
reg = <12>;

  led@0 {
    reg = <0>;
  };
  led@1 {
    reg = <1>;

};
};

Rob