Re: [PATCH 1/2] dt-bindings: leds: Add binding for ubnt-spi LED.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 04/05/2019 21:45, Jacek Anaszewski wrote:
> I missed two issues, please take a look below.
> 
>> On 5/4/19 2:28 PM, list@xxxxxxxxxxxxx wrote:
>>> From: Christian Mauderer <oss@xxxxxxxxxxxxx>
>>>
> [...]
>>> +- ubnt-spi,max_bright:    Value for the maximum brightness. Default 
> 
> From DT POV the only valid reason for which max brightness level would
> need to be limited is a protection against hardware damage. Please use
> led-max-microamp property for that if this is the case. Otherwise such
> setting can be skipped.
> 
> There are two bindings that allow for configuring max-brightness level
> but they quite old.
> 

My intention with that has been slightly different than limiting the
current:

The driver uses a very simple protocol for setting the brightness: It
sends one byte via SPI. The value of that byte can be (for that
controller) between 0 and 63. My intention when adding the limits has
been to allow adaption to similar hardware by changing the values. If
for example some other controller wants brightness values between 42 and
173 the off_bright could be set to 42 and the max_bright to 173.

Note that Pavel Machek suggested: "Alternatively, call its led-spi-byte,
or something, as it is really trivial protocol. Maybe other chips will
have same interface?"

If I follow that suggestion (which I think would be a good idea), I
would even need the values as mandatory ones instead of optional ones.
Would "led-spi-byte,off-value" and "led-spi-byte,max-value" be better
names in that case?

>>> value for that
>>> +            is 63.
>>> +- label:        A label for the LED. If one is given, the LED will be
>>> +            named "ubnt-spi:<label>" or "ubnt-spi::" otherwise.
>>> +
> 
> Please use just:
> 
> label : see Documentation/devicetree/bindings/leds/common.txt
> 
I'll use that.



[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux