Add support for /sys/class/backlight
David Zeuthen
david at fubar.dk
Mon Nov 27 08:47:24 PST 2006
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
2. Refuse to add a backlight object in ACPI / other backlight
abstractions if there is one already originating from
/sys/class/backlight
Sounds right?
David
More information about the hal
mailing list