LED devices

Danny Kukawka danny.kukawka at web.de
Wed May 30 10:12:03 PDT 2007


On Mittwoch, 30. Mai 2007, Richard Hughes wrote:
> On Wed, 2007-05-30 at 17:19 +0100, Richard Purdie wrote:
> > I will put my side (as the above maintainer) across. When deciding on
> > the naming for the LEDs in /sys/class/leds/ we had several choices.
> > Taking my handheld as an example, some choices were:
> > /sys/class/leds/spitz:amber/
> > /sys/class/leds/spitz:green/
>
> /sys/class/leds/spitz_amber/
> /sys/class/leds/spitz_green/
>
> makes most sense to me.

Sorry, but there is _no_ difference between both, you replaced only one char 
with an other.

[...]
> > If reading names from a string causes HAL problems, its not really
> > living up to its name...
>
> Not real problems, but every other device class can just be probed by
> reading one file. The leds class needs HAL to do sscanf on the device
> name to scrape key properties. This isn't very nice.

That's incorrect. We do stuff like that already for other devices. Only one 
example: sound subsystem. And this is also no problem. As already said: I see 
here no problem for HAL to parse the info from the sysfs path (and the sscanf 
is maybe faster than open/read/close the file, at least it would make no 
difference).

Danny



More information about the hal mailing list