Add support for /sys/class/backlight
Holger Macht
hmacht at suse.de
Mon Nov 27 08:54:13 PST 2006
On Mon 27. Nov - 11:47:24, David Zeuthen wrote:
> On Fri, 2006-11-24 at 18:15 +0100, Holger Macht wrote:
> > Patch adding support for the /sys/class/backlight interface. If available,
> > a device /org/freedesktop/Hal/devices/computer_backlight is created. The
> > patch adds a class device and adjusts the scripts for the methods
> > GetBrightness and SetBrightness on the interface
> > org.freedesktop.Hal.Device.LaptopPanel. As soon as all kernel drivers are
> > converted to the new interface, we can drop the vendor specific code in
> > acpi.c. In case a driver supports both, the old /proc interface and the
> > new /sysfs one, the code in acpi.c immediately returns so that the /sysfs
> > interface is preferred.
> >
> > Comments? Commit approvals? ;-)
>
> Looks good to me. However, how do we ensure that we do the right thing
> if, for example, both /proc/acpi/ibm/... and /sys/class/backlight/<name>
> is present? I think we just need to
>
> 1. Make sure we coldplug sysfs bits before ACPI / other backlight
> abstractions
>From your last comment on this I thought this is the case, no?
> 2. Refuse to add a backlight object in ACPI / other backlight
> abstractions if there is one already originating from
> /sys/class/backlight
That's already included in the patch.
Regards,
Holger
More information about the hal
mailing list