Messages in this thread |  | | | From | John Bowler <> | | Subject | RE: [PATCH 0/12] LED Class, Triggers and Drivers | | Date | Sun, 5 Feb 2006 12:10:27 -0800 |
| |
From: Richard Purdie [mailto:rpurdie@rpsys.net] >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 <jbowler@acm.org>
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
|  |