LED devices

Richard Hughes hughsient at gmail.com
Wed May 30 06:16:05 PDT 2007


On Wed, 2007-05-30 at 13:55 +0100, Richard Purdie wrote:
> 
> > 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.

NO! This is not what sysfs was designed for. In that logic:

/sys/battery/batt1:lion:rechargeable:sanyo:14400
/sys/battery/batt1::rechargeable::11000

Would be a valid devices. This means _nothing_ to userspace.

If we have to parse the values in sysfs device names then we might as
well go back to the horrors that are /proc. This is bad. One value per
file, simple as that. I'm surprised this hasn't been ripped to pieces on
LKML already.

Sorry to get emotional on this, but this seems a really bad idea to save
a few tens of bytes.

Richard.




More information about the hal mailing list