On 25 September 2018 at 07:54, Bjorn Andersson
<bjorn.anders...@linaro.org> wrote:
> On Mon 10 Sep 19:47 PDT 2018, Baolin Wang wrote:
> [..]
>> diff --git a/Documentation/ABI/testing/sysfs-class-led-trigger-pattern 
>> b/Documentation/ABI/testing/sysfs-class-led-trigger-pattern
> [..]
>> +What:                /sys/class/leds/<led>/hw_pattern
>> +Date:                September 2018
>> +KernelVersion:       4.20
>> +Description:
>> +             Specify a hardware pattern for the LED, for LED hardware that
>> +             supports autonomously controlling brightness over time, 
>> according
>> +             to some preprogrammed hardware patterns.
>> +
>> +             Since different LED hardware can have different semantics of
>> +             hardware patterns, each driver is expected to provide its own
>> +             description for the hardware patterns in their ABI 
>> documentation
>> +             file.
>> +
>> +What:                /sys/class/leds/<led>/repeat
>> +Date:                September 2018
>> +KernelVersion:       4.20
>> +Description:
>> +             Specify a pattern repeat number. -1 means repeat indefinitely,
>> +             other negative numbers and number 0 are invalid.
>> +
>> +             This file will always return the originally written repeat
>> +             number.
>
> This captures the infinite case much better, thanks!
>
> Given that 0 is described as invalid, does this imply that setting a new
> pattern the repeat will be disabled? And hence if my hardware supports
> only infinite or no-repeat setting a new pattern is the way to disable
> further repeats (rather than just setting repeat = 0)?

It won't. A new pattern setting will not affect your infinite or
no-repeat setting.

> Regardless, I believe the semantics of these two files will work fine
> for my Qualcomm LPG driver.

Thanks.

-- 
Baolin Wang
Best Regards

Reply via email to