LED devices

Richard Purdie rpurdie at openedhand.com
Wed May 30 05:55:32 PDT 2007


On Wed, 2007-05-30 at 13:35 +0100, Richard Hughes wrote:
> The new devices look like:
> 
> /sys/class/leds/thinklight\:white/brightness
> 
> An attribute in sysfs would be better than trying to parse the name of
> the device. Doing the latter seems a poor solution when sysfs is meant
> to be one value per file and easy to parse.
> 
> What's the big problem having names such as "thinklight" and then
> another attribute of "color"?

Each attribute uses memory for the sysfs entry and code for the access
functions. The value will never change. Exporting the information as
part of the device name seemed like a neat solution.

> > Btw. The LED handling is not that easy because there are some 
> > devices which have several functions via the same device in sysfs. 
> > They need to get handled via change the trigger.
>
> Sure, I don't think we should be setting any device from userspace that
> has a trigger - would that solve the issues?

Something somewhere is going to need to learn about triggers and provide
a mechanism so software can make an LED flash or similar. I don't know
if that is within the scope of HAL or not...

Cheers,

Richard



More information about the hal mailing list