From: Richard Purdie [mailto:[email protected]]
>This is an updated version of the LED class/subsystem. The main change
>is the renamed API - I've settled on led_device -> led_classdev. Other
>minor issues like the error cases in the timer trigger were also fixed.
In the previous version 'frequency' for the timer trigger was actually
half the period of the oscillation - the time in ms between each (on/off)
state transition.
In this version 'frequency' is the frequency of the oscillation in Hz.
That creates a big problem for me because the value is parsed as an
integer and I can no longer achieve slow flash rates (<1Hz). Since I
have to be able to do this I made a fairly crude patch to store the
frequency in mHz, not Hz, and to handle a decimal point in the value.
Possible fixes:
1) Use 'period' not 'frequency' and accept a value in ms (as before,
but with the off-by-2 error corrected.)
2) Use 'mark' and 'space' or 'time_on', 'time_off' or something similar
and remove 'duty' (I *do* need flashing with duty cycle != 0.5)
3) Accept fractional frequency (as in my patch).
4) Provide both period and frequency as integers and accept that
long period flashs will come out as frequency '1' (but the period
would still need to be in ms, because periods about 1500ms are of
significant utility.)
John Bowler <[email protected]>
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]