LED devices

Kay Sievers kay.sievers at vrfy.org
Fri Jun 1 07:49:46 PDT 2007


On Fri, 2007-06-01 at 15:28 +0100, Richard Hughes wrote:
> On Fri, 2007-06-01 at 16:20 +0200, Johannes Berg wrote:
> > On Fri, 2007-06-01 at 13:36 +0100, Richard Hughes wrote:

> > What I'd also like to see is have an LED be associated with some other
> > device, as a parent. So instead of being pure "class devs" they could
> > live in say /sys/devices/pci0002:24/0002:24:0f.0/led/ like we now
> > have /sys/devices/pci0002:24/0002:24:0f.0/net/.
> 
> Sure, but for another day :-)

No, that day is now. :) Just convert the led-class to "struct device",
it is currently using the deprecated class_device-interface. You will
get the devices in /sys/devices for free then.

If the driver that requests the led device, specifies a parent for the
device (which the led class hopefully already allows), the led
device-directory will show up in /sys/devices instead of /sys/class,
like almost all other class devices already do today. 

The devpath of the led device would contain all parents that belong to
the device, like Johannes pointed out, this sort of information is
absolutely needed in HAL to get the correct dependency in the device
tree.

So, it's not another day, it's now. :)

Kay



More information about the hal mailing list