lkml.org 
[lkml]   [2015]   [May]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] leds: fix brightness changing when software blinking is active
14.05.2015 14:03, Stas Sergeev пишет:
> 14.05.2015 13:33, Jacek Anaszewski пишет:
>>> Indeed, but with these changes there should be no requirement
>>> for disabling a soft-blink from hard-irq context, which is what
>>> I really wanted to have. What am I missing?
>> Please look at this [1]. Author mentions setting brightness
>> from sound-card irq handler.
>>
>> [1] http://www.spinics.net/lists/linux-leds/msg00006.html
> He points to the following (out-of-tree??) code:
> ---
> if ((jiffies / HZ / 2) & 1)
> led_trigger_blink_oneshot(ledtrig_ide,
> &ide_blink_delay, &ide_blink_delay, 0);
> if ((jiffies / HZ / 4) & 1)
> led_trigger_event(ledtrig_ide, 100);
> if ((jiffies / HZ / 8) & 1)
> led_trigger_event(ledtrig_ide, 0);
> ---
> I think the problem was that oneshot_trig_deactivate() was
> not doing led_stop_software_blink(led_cdev), and so he needed
> a work-queue for switching out from oneshot trigger.
> My patch fixes exactly that: now oneshot trigger does the
> proper cleanup itself.
> Do you think my patch is not enough to handle this case?
Likely not, if he switches triggers in hard-irq context.
Though I wonder if it is important to care about the out-of-tree
code that could use the work-queue itself?
Anyway, I think I should split the patch to the fix and
the cleanup, to make the life easier.


\
 
 \ /
  Last update: 2015-05-14 14:21    [W:0.046 / U:0.032 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site