lkml.org 
[lkml]   [2015]   [May]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2] leds: fix brightness changing when software blinking is active
15.05.2015 17:09, Jacek Anaszewski пишет:
> On 05/15/2015 10:12 AM, Jacek Anaszewski wrote:
>> Hi Stas,
>>
>> On 05/14/2015 05:24 PM, Stas Sergeev wrote:
>>>
>>> The following sequence:
>>> echo timer >/sys/class/leds/<name>/trigger
>>> echo 1 >/sys/class/leds/<name>/brightness
>>> should change the ON brightness for blinking.
>>> The function led_set_brightness() was mistakenly initiating the
>>> delayed blink stop procedure, which resulted in no blinking with
>>> the timer trigger still active.
>>>
>>> This patch fixes the problem by changing led_set_brightness()
>>> to not initiate the delayed blink stop when brightness is not 0.
>
> This commit message is not valid for this version of the patch.
Why do you think so?
---
- schedule_work(&led_cdev->set_brightness_work);
+ if (brightness == LED_OFF)
+ schedule_work(&led_cdev->set_brightness_work);
---

LED_OFF is a 0 define.


\
 
 \ /
  Last update: 2015-05-15 19:01    [W:0.054 / U:0.116 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site