LED devices

Richard Purdie rpurdie at openedhand.com
Thu May 31 03:17:57 PDT 2007


On Thu, 2007-05-31 at 11:23 +0200, Kay Sievers wrote:
> If you have multiple identical devices connected, how does the current
> scheme cover that? Say 3 identical joysticks with LED's on it. How do
> you enumerate the devices?

The 'name' part of the string can have a number if appropriate and this
is left to the LED drivers themselves. Some drivers like spitz know
they're unique, others like the recent xbox driver add in numeric
digits. So far this has worked very well.

> How do you handle the same device (driver) that exists in several
> versions (OEM), all with different LED colors? I have Thinkpads with
> yellow and white ThinkLights (keyboard light in the lid) here. What
> color should the driver set, if it doesn't know it?

Its optional so it can leave it blank.

> The battery/ac light on my laptop is green, but orange while charging,
> how does that fit into the current scheme? These are not two devices for
> the user, there can be only one color at the time, green _or_ orange.

The colour element could therefore be left blank or set to green-orange.

> That scheme just asks for trouble. The function name in the device name
> would be nice though. The whole color attribute should be entirely
> optional, because there are tons of examples where drivers will not be
> able to tell it.

It is optional already and is just a convention. Not all devices
currently use it and the same would apply to the function name.

Regards,

Richard





More information about the hal mailing list