Re: Strange timer LED behavior

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

 



> 
> Hi!
> 
>> We use the sysfs timer trigger of the led subsystem to control our leds (turn on, turn off, and blink).  While doing this we found a strange behavior.  If the values of delay_on and delay_off are ever both zero, the led subsystem will make the decision to blink at a 500ms on and 500ms off rate.
>> 
>> # cd /sys/class/leds/g01
>> # cat delay_on
>> 0
>> # cat delay_off
>> 86400
>> # echo 0 > delay_off
>> # cat delay_on
>> 500
>> # cat delay_off
>> 500
>> 
>> drivers/led/led-core.c:184
>>    /* blink with 1 Hz as default if nothing specified */
>>    if (!*delay_on && !*delay_off)
>>        *delay_on = *delay_off = 500;
>> 
>> Is there a reason that the kernel would decide to blink at this default rate instead of leaving the timer disabled?
>> 
> 
> Yep. It allows hardware to provide different values if it can only
> blink at fixed rate.

Ok, I understand how hardware might make a different choice, but in this scenario we’re using software to blink, so everything is handled by the kernel.  Also, if the interface is hardware enabled, isn’t the path at line 177 used (which returns before the default is set)?

Seth






[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux