diff mbox series

[v4,1/5] dt-bindings: leds: Add bindings for lltc,lt3593

Message ID 20180621202322.11581-2-daniel@zonque.org
State Changes Requested, archived
Headers show
Series leds: add devicetree functionality to lltc, lt3593 driver | expand

Commit Message

Daniel Mack June 21, 2018, 8:23 p.m. UTC
This patch add the bindings document for LT3593 LED drivers.
The binding is kept consistent with other LED driver bindings in that it
stores all the LED-specific properties in its own subnode. As the hardware
only supports one channel, there can consequently only be one sub-node.

Signed-off-by: Daniel Mack <daniel@zonque.org>
---
 .../devicetree/bindings/leds/leds-lt3593.txt  | 34 +++++++++++++++++++
 1 file changed, 34 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/leds/leds-lt3593.txt

Comments

Rob Herring June 25, 2018, 3:59 p.m. UTC | #1
On Thu, Jun 21, 2018 at 10:23:18PM +0200, Daniel Mack wrote:
> This patch add the bindings document for LT3593 LED drivers.
> The binding is kept consistent with other LED driver bindings in that it
> stores all the LED-specific properties in its own subnode. As the hardware
> only supports one channel, there can consequently only be one sub-node.
> 
> Signed-off-by: Daniel Mack <daniel@zonque.org>
> ---
>  .../devicetree/bindings/leds/leds-lt3593.txt  | 34 +++++++++++++++++++
>  1 file changed, 34 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/leds/leds-lt3593.txt
> 
> diff --git a/Documentation/devicetree/bindings/leds/leds-lt3593.txt b/Documentation/devicetree/bindings/leds/leds-lt3593.txt
> new file mode 100644
> index 000000000000..b31d427448f8
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/leds/leds-lt3593.txt
> @@ -0,0 +1,34 @@
> +Bindings for Linear Technologies LT3593 LED controller
> +
> +Required properties:
> +- compatible:	Should be "lltc,lt3593".
> +
> +The hardware supports only one LED. The properties of this LED are
> +configured in a sub-node in the device node.
> +
> +Required sub-node properties:
> +- gpios:	A handle to the GPIO that is connected to the 'CTRL'
> +		pin of the chip.

lltc,ctrl-gpios

Or "shutdown-gpios" as that is a standard name and seems to be its 
function.

This also belongs in the parent node because it is a GPIO connection to 
the controller, not the LEDs.
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Daniel Mack June 25, 2018, 8:21 p.m. UTC | #2
Hi Rob,

Thanks for the review!

On 06/25/2018 05:59 PM, Rob Herring wrote:
> On Thu, Jun 21, 2018 at 10:23:18PM +0200, Daniel Mack wrote:
>> This patch add the bindings document for LT3593 LED drivers.
>> The binding is kept consistent with other LED driver bindings in that it
>> stores all the LED-specific properties in its own subnode. As the hardware
>> only supports one channel, there can consequently only be one sub-node.
>>
>> Signed-off-by: Daniel Mack <daniel@zonque.org>
>> ---
>>  .../devicetree/bindings/leds/leds-lt3593.txt  | 34 +++++++++++++++++++
>>  1 file changed, 34 insertions(+)
>>  create mode 100644 Documentation/devicetree/bindings/leds/leds-lt3593.txt
>>
>> diff --git a/Documentation/devicetree/bindings/leds/leds-lt3593.txt b/Documentation/devicetree/bindings/leds/leds-lt3593.txt
>> new file mode 100644
>> index 000000000000..b31d427448f8
>> --- /dev/null
>> +++ b/Documentation/devicetree/bindings/leds/leds-lt3593.txt
>> @@ -0,0 +1,34 @@
>> +Bindings for Linear Technologies LT3593 LED controller
>> +
>> +Required properties:
>> +- compatible:	Should be "lltc,lt3593".
>> +
>> +The hardware supports only one LED. The properties of this LED are
>> +configured in a sub-node in the device node.
>> +
>> +Required sub-node properties:
>> +- gpios:	A handle to the GPIO that is connected to the 'CTRL'
>> +		pin of the chip.
> 
> lltc,ctrl-gpios
> 
> Or "shutdown-gpios" as that is a standard name and seems to be its 
> function.

No, it's a control pin that receives multiple pulses to set the LED
current (and by that, its brightness).

> This also belongs in the parent node because it is a GPIO connection to 
> the controller, not the LEDs.

Okay, not a problem. I'll change that and send a patch.


Thanks!
Daniel

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/leds/leds-lt3593.txt b/Documentation/devicetree/bindings/leds/leds-lt3593.txt
new file mode 100644
index 000000000000..b31d427448f8
--- /dev/null
+++ b/Documentation/devicetree/bindings/leds/leds-lt3593.txt
@@ -0,0 +1,34 @@ 
+Bindings for Linear Technologies LT3593 LED controller
+
+Required properties:
+- compatible:	Should be "lltc,lt3593".
+
+The hardware supports only one LED. The properties of this LED are
+configured in a sub-node in the device node.
+
+Required sub-node properties:
+- gpios:	A handle to the GPIO that is connected to the 'CTRL'
+		pin of the chip.
+
+Optional sub-node properties:
+- label:	A label for the LED. If none is given, the LED will be
+		named "lt3595::".
+- linux,default-trigger: The default trigger for the LED.
+			See Documentation/devicetree/bindings/leds/common.txt
+- default-state:	The initial state of the LED.
+			See Documentation/devicetree/bindings/leds/common.txt
+
+If multiple chips of this type are found in a design, each one needs to
+be handled by its own device node.
+
+Example:
+
+led-controller {
+	compatible = "lltc,lt3593";
+
+	led {
+		label = "white:backlight";
+		gpios = <&gpio 0 GPIO_ACTIVE_HIGH>;
+		default-state = "on";
+	};
+};