Re: [PATCH v6 1/2] dt: bindings: lm3601x: Introduce the lm3601x driver

From: Dan Murphy
Date: Tue May 15 2018 - 17:29:34 EST


Jacek

On 05/15/2018 04:13 PM, Jacek Anaszewski wrote:
> Hi Dan,
>
> Thanks for the update.
>
> On 05/15/2018 05:43 PM, Dan Murphy wrote:
>> Introduce the device tree bindings for the lm3601x
>> family of LED torch, flash and IR drivers.
>>
>> Signed-off-by: Dan Murphy <dmurphy@xxxxxx>
>> ---
>>
>> v6 - Removed multiple led child nodes, fixed example to display micro ranges
>> for corresponding child nodes and added led-sources to define the current driver -
>> https://patchwork.kernel.org/patch/10392121/
>>
>> v5 - No changes - https://patchwork.kernel.org/patch/10391743/
>> v4 - Added " " around "=", changed strobe to flash on label, removed "support and
>> register" comment and change ir lable to ir:torch - See v2 patchworks for comments
>> v3 - Removed wildcard compatible - https://patchwork.kernel.org/patch/10386241/
>> v2 - No changes - https://patchwork.kernel.org/patch/10384587/
>>
>> Â .../devicetree/bindings/leds/leds-lm3601x.txt | 47 +++++++++++++++++++
>> Â 1 file changed, 47 insertions(+)
>> Â create mode 100644 Documentation/devicetree/bindings/leds/leds-lm3601x.txt
>>
>> diff --git a/Documentation/devicetree/bindings/leds/leds-lm3601x.txt b/Documentation/devicetree/bindings/leds/leds-lm3601x.txt
>> new file mode 100644
>> index 000000000000..27930a89e9a5
>> --- /dev/null
>> +++ b/Documentation/devicetree/bindings/leds/leds-lm3601x.txt
>> @@ -0,0 +1,47 @@
>> +* Texas Instruments - lm3601x Single-LED Flash Driver
>> +
>> +The LM3601X are ultra-small LED flash drivers that
>> +provide a high level of adjustability.
>> +
>> +Required properties:
>> +ÂÂÂ - compatible : Can be one of the following
>> +ÂÂÂÂÂÂÂ "ti,lm36010"
>> +ÂÂÂÂÂÂÂ "ti,lm36011"
>> +ÂÂÂ - reg : I2C slave address
>> +ÂÂÂ - #address-cells : 1
>> +ÂÂÂ - #size-cells : 0
>> +
>> +Required child properties:
>> +ÂÂÂ - reg : 0
>> +ÂÂÂ - led-sources:ÂÂÂ 0 - Indicates a IR mode
>> +ÂÂÂÂÂÂÂÂÂÂÂ 1 - Indicates a Torch (white LED) mode
>
> You don't need led-sources at all. Please use reg as in
> the previous version. led-sources is useful for describing
> more complex arrangements. Here reg will do.

OK. Thought we would keep consistent with the max IC.

>
>> +
>> +Required properties for flash LED child nodes:
>> +ÂÂÂ See Documentation/devicetree/bindings/leds/common.txt
>> +ÂÂÂ - flash-max-microamp : Range from 11mA -> 1.5A
>> +ÂÂÂ - flash-max-timeout-us : Range from 40ms -> 1600ms
>> +ÂÂÂ - led-max-microamp : Range from 2.4mA -> 376mA
>
> Please give also a step in the format like below
> (taken from max77693):
>
> ÂÂÂÂValid values: 62500 - 1000000, step by 62500 (rounded down)

I would do this but the step is not linear. The step is 40ms from 40 -> 400.
after that the step goes to 200ms from 400->1600.

same with the current ranges.

Dan

>
>
>> +
>> +Optional child properties:
>> +ÂÂÂ - label : see Documentation/devicetree/bindings/leds/common.txt
>> +
>> +Example:
>> +led-controller@64 {
>> +ÂÂÂ compatible = "ti,lm36010";
>> +ÂÂÂ #address-cells = <1>;
>> +ÂÂÂ #size-cells = <0>;
>> +ÂÂÂ reg = <0x64>;
>> +
>> +ÂÂÂ led@0 {
>> +ÂÂÂÂÂÂÂ reg = <0>;
>> +ÂÂÂÂÂÂÂ label = "white:torch";
>> +ÂÂÂÂÂÂÂ led-max-microamp = <376000>;
>> +ÂÂÂÂÂÂÂ flash-max-microamp = <1500000>;
>> +ÂÂÂÂÂÂÂ flash-max-timeout-us = <1600000>;
>> +ÂÂÂÂÂÂÂ led-sources = <1>;
>> +ÂÂÂ };
>> +}
>> +
>> +For more product information please see the links below:
>> +http://www.ti.com/product/LM36010
>> +http://www.ti.com/product/LM36011
>>
>


--
------------------
Dan Murphy