diff mbox

[v3,1/2] dt: add cap11xx LED documentation

Message ID 1434169054-11035-2-git-send-email-mranostay@gmail.com (mailing list archive)
State New, archived
Headers show

Commit Message

Matt Ranostay June 13, 2015, 4:17 a.m. UTC
Some cap11xx devices have LEDs that can be controlled from userpace
and via triggers. Document their use and functionality here.

Signed-off-by: Matt Ranostay <mranostay@gmail.com>
---
 .../devicetree/bindings/input/cap11xx.txt          | 23 ++++++++++++++++++++++
 1 file changed, 23 insertions(+)

Comments

Jacek Anaszewski June 15, 2015, 8:15 a.m. UTC | #1
Hi Matt,

On 06/13/2015 06:17 AM, Matt Ranostay wrote:
> Some cap11xx devices have LEDs that can be controlled from userpace
> and via triggers. Document their use and functionality here.
>
> Signed-off-by: Matt Ranostay <mranostay@gmail.com>
> ---
>   .../devicetree/bindings/input/cap11xx.txt          | 23 ++++++++++++++++++++++
>   1 file changed, 23 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/input/cap11xx.txt b/Documentation/devicetree/bindings/input/cap11xx.txt
> index 7d0a300..ef89c27 100644
> --- a/Documentation/devicetree/bindings/input/cap11xx.txt
> +++ b/Documentation/devicetree/bindings/input/cap11xx.txt
> @@ -38,6 +38,11 @@ Optional properties:
>   				defaults. The array must have exactly six
>   				entries.
>
> +	linux,led-brightness:	Defines the ON brightness when the optional LED
> +				functionality is used. Valid values are 0-15.
> +				By default a value of 15 is set.

The ON brightness is controlled with the 'brightness' sysfs property.
The levels start from 1 and 0 turns the LED off. I think that this
property is useless then.

> +
>   Example:
>
>   i2c_controller {
> @@ -55,5 +60,23 @@ i2c_controller {
>   				 <105>,		/* KEY_LEFT */
>   				 <109>,		/* KEY_PAGEDOWN */
>   				 <104>;		/* KEY_PAGEUP */
> +
> +		linux,led-brightness = <15>;
> +
> +		usr@0 {
> +			label = "cap11xx:green:usr0";
> +			reg = <0>;
> +		};
> +
> +		usr@1 {
> +			label = "cap11xx:green:usr1";
> +			reg = <1>;
> +		};
> +
> +		alive@2 {
> +			label = "cap11xx:green:alive";
> +			reg = <2>;
> +			linux,default_trigger = "heartbeat";
> +		};
>   	};
>   }
>
Matt Ranostay June 15, 2015, 8:48 a.m. UTC | #2
On Mon, Jun 15, 2015 at 1:15 AM, Jacek Anaszewski
<j.anaszewski@samsung.com> wrote:
> Hi Matt,
>
> On 06/13/2015 06:17 AM, Matt Ranostay wrote:
>>
>> Some cap11xx devices have LEDs that can be controlled from userpace
>> and via triggers. Document their use and functionality here.
>>
>> Signed-off-by: Matt Ranostay <mranostay@gmail.com>
>> ---
>>   .../devicetree/bindings/input/cap11xx.txt          | 23
>> ++++++++++++++++++++++
>>   1 file changed, 23 insertions(+)
>>
>> diff --git a/Documentation/devicetree/bindings/input/cap11xx.txt
>> b/Documentation/devicetree/bindings/input/cap11xx.txt
>> index 7d0a300..ef89c27 100644
>> --- a/Documentation/devicetree/bindings/input/cap11xx.txt
>> +++ b/Documentation/devicetree/bindings/input/cap11xx.txt
>> @@ -38,6 +38,11 @@ Optional properties:
>>                                 defaults. The array must have exactly six
>>                                 entries.
>>
>> +       linux,led-brightness:   Defines the ON brightness when the
>> optional LED
>> +                               functionality is used. Valid values are
>> 0-15.
>> +                               By default a value of 15 is set.
>
>
> The ON brightness is controlled with the 'brightness' sysfs property.
> The levels start from 1 and 0 turns the LED off. I think that this
> property is useless then.
>

Yes but this defines the brightness for the ON state.. since it can be
from 0-100% duty cycle.

>
>> +
>>   Example:
>>
>>   i2c_controller {
>> @@ -55,5 +60,23 @@ i2c_controller {
>>                                  <105>,         /* KEY_LEFT */
>>                                  <109>,         /* KEY_PAGEDOWN */
>>                                  <104>;         /* KEY_PAGEUP */
>> +
>> +               linux,led-brightness = <15>;
>> +
>> +               usr@0 {
>> +                       label = "cap11xx:green:usr0";
>> +                       reg = <0>;
>> +               };
>> +
>> +               usr@1 {
>> +                       label = "cap11xx:green:usr1";
>> +                       reg = <1>;
>> +               };
>> +
>> +               alive@2 {
>> +                       label = "cap11xx:green:alive";
>> +                       reg = <2>;
>> +                       linux,default_trigger = "heartbeat";
>> +               };
>>         };
>>   }
>>
>
> --
> Best Regards,
> Jacek Anaszewski
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Jacek Anaszewski June 15, 2015, 10:10 a.m. UTC | #3
On 06/15/2015 10:48 AM, Matt Ranostay wrote:
> On Mon, Jun 15, 2015 at 1:15 AM, Jacek Anaszewski
> <j.anaszewski@samsung.com> wrote:
>> Hi Matt,
>>
>> On 06/13/2015 06:17 AM, Matt Ranostay wrote:
>>>
>>> Some cap11xx devices have LEDs that can be controlled from userpace
>>> and via triggers. Document their use and functionality here.
>>>
>>> Signed-off-by: Matt Ranostay <mranostay@gmail.com>
>>> ---
>>>    .../devicetree/bindings/input/cap11xx.txt          | 23
>>> ++++++++++++++++++++++
>>>    1 file changed, 23 insertions(+)
>>>
>>> diff --git a/Documentation/devicetree/bindings/input/cap11xx.txt
>>> b/Documentation/devicetree/bindings/input/cap11xx.txt
>>> index 7d0a300..ef89c27 100644
>>> --- a/Documentation/devicetree/bindings/input/cap11xx.txt
>>> +++ b/Documentation/devicetree/bindings/input/cap11xx.txt
>>> @@ -38,6 +38,11 @@ Optional properties:
>>>                                  defaults. The array must have exactly six
>>>                                  entries.
>>>
>>> +       linux,led-brightness:   Defines the ON brightness when the
>>> optional LED
>>> +                               functionality is used. Valid values are
>>> 0-15.
>>> +                               By default a value of 15 is set.
>>
>>
>> The ON brightness is controlled with the 'brightness' sysfs property.
>> The levels start from 1 and 0 turns the LED off. I think that this
>> property is useless then.
>>
>
> Yes but this defines the brightness for the ON state.. since it can be
> from 0-100% duty cycle.

Doesn't 0 mean that LED is off? If so, then valid values should start
from 1.

>>
>>> +
>>>    Example:
>>>
>>>    i2c_controller {
>>> @@ -55,5 +60,23 @@ i2c_controller {
>>>                                   <105>,         /* KEY_LEFT */
>>>                                   <109>,         /* KEY_PAGEDOWN */
>>>                                   <104>;         /* KEY_PAGEUP */
>>> +
>>> +               linux,led-brightness = <15>;
>>> +
>>> +               usr@0 {
>>> +                       label = "cap11xx:green:usr0";
>>> +                       reg = <0>;
>>> +               };
>>> +
>>> +               usr@1 {
>>> +                       label = "cap11xx:green:usr1";
>>> +                       reg = <1>;
>>> +               };
>>> +
>>> +               alive@2 {
>>> +                       label = "cap11xx:green:alive";
>>> +                       reg = <2>;
>>> +                       linux,default_trigger = "heartbeat";
>>> +               };
>>>          };
>>>    }
>>>
>>
>> --
>> Best Regards,
>> Jacek Anaszewski
>
Matt Ranostay June 15, 2015, 5 p.m. UTC | #4
On Mon, Jun 15, 2015 at 3:10 AM, Jacek Anaszewski
<j.anaszewski@samsung.com> wrote:
> On 06/15/2015 10:48 AM, Matt Ranostay wrote:
>>
>> On Mon, Jun 15, 2015 at 1:15 AM, Jacek Anaszewski
>> <j.anaszewski@samsung.com> wrote:
>>>
>>> Hi Matt,
>>>
>>> On 06/13/2015 06:17 AM, Matt Ranostay wrote:
>>>>
>>>>
>>>> Some cap11xx devices have LEDs that can be controlled from userpace
>>>> and via triggers. Document their use and functionality here.
>>>>
>>>> Signed-off-by: Matt Ranostay <mranostay@gmail.com>
>>>> ---
>>>>    .../devicetree/bindings/input/cap11xx.txt          | 23
>>>> ++++++++++++++++++++++
>>>>    1 file changed, 23 insertions(+)
>>>>
>>>> diff --git a/Documentation/devicetree/bindings/input/cap11xx.txt
>>>> b/Documentation/devicetree/bindings/input/cap11xx.txt
>>>> index 7d0a300..ef89c27 100644
>>>> --- a/Documentation/devicetree/bindings/input/cap11xx.txt
>>>> +++ b/Documentation/devicetree/bindings/input/cap11xx.txt
>>>> @@ -38,6 +38,11 @@ Optional properties:
>>>>                                  defaults. The array must have exactly
>>>> six
>>>>                                  entries.
>>>>
>>>> +       linux,led-brightness:   Defines the ON brightness when the
>>>> optional LED
>>>> +                               functionality is used. Valid values are
>>>> 0-15.
>>>> +                               By default a value of 15 is set.
>>>
>>>
>>>
>>> The ON brightness is controlled with the 'brightness' sysfs property.
>>> The levels start from 1 and 0 turns the LED off. I think that this
>>> property is useless then.
>>>
>>
>> Yes but this defines the brightness for the ON state.. since it can be
>> from 0-100% duty cycle.
>
>
> Doesn't 0 mean that LED is off? If so, then valid values should start
> from 1.
>
Ok makes sense since a 0% duty cycle is useless :)

>
>>>
>>>> +
>>>>    Example:
>>>>
>>>>    i2c_controller {
>>>> @@ -55,5 +60,23 @@ i2c_controller {
>>>>                                   <105>,         /* KEY_LEFT */
>>>>                                   <109>,         /* KEY_PAGEDOWN */
>>>>                                   <104>;         /* KEY_PAGEUP */
>>>> +
>>>> +               linux,led-brightness = <15>;
>>>> +
>>>> +               usr@0 {
>>>> +                       label = "cap11xx:green:usr0";
>>>> +                       reg = <0>;
>>>> +               };
>>>> +
>>>> +               usr@1 {
>>>> +                       label = "cap11xx:green:usr1";
>>>> +                       reg = <1>;
>>>> +               };
>>>> +
>>>> +               alive@2 {
>>>> +                       label = "cap11xx:green:alive";
>>>> +                       reg = <2>;
>>>> +                       linux,default_trigger = "heartbeat";
>>>> +               };
>>>>          };
>>>>    }
>>>>
>>>
>>> --
>>> Best Regards,
>>> Jacek Anaszewski
>>
>>
>
>
> --
> Best Regards,
> Jacek Anaszewski
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/Documentation/devicetree/bindings/input/cap11xx.txt b/Documentation/devicetree/bindings/input/cap11xx.txt
index 7d0a300..ef89c27 100644
--- a/Documentation/devicetree/bindings/input/cap11xx.txt
+++ b/Documentation/devicetree/bindings/input/cap11xx.txt
@@ -38,6 +38,11 @@  Optional properties:
 				defaults. The array must have exactly six
 				entries.
 
+	linux,led-brightness:	Defines the ON brightness when the optional LED
+				functionality is used. Valid values are 0-15.
+				By default a value of 15 is set.
+
+
 Example:
 
 i2c_controller {
@@ -55,5 +60,23 @@  i2c_controller {
 				 <105>,		/* KEY_LEFT */
 				 <109>,		/* KEY_PAGEDOWN */
 				 <104>;		/* KEY_PAGEUP */
+
+		linux,led-brightness = <15>;
+
+		usr@0 {
+			label = "cap11xx:green:usr0";
+			reg = <0>;
+		};
+
+		usr@1 {
+			label = "cap11xx:green:usr1";
+			reg = <1>;
+		};
+
+		alive@2 {
+			label = "cap11xx:green:alive";
+			reg = <2>;
+			linux,default_trigger = "heartbeat";
+		};
 	};
 }