Add support for /sys/class/backlight

Holger Macht hmacht at suse.de
Thu Oct 5 15:21:23 PDT 2006


On Thu 05. Oct - 23:10:45, Richard Hughes wrote:
> On Thu, 2006-10-05 at 23:52 +0200, 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 may drop the vendor specific code
> > in
> > acpi.c.
> 
> You mean the kernel guys actually agreed on a half decent
> abstraction? :-)
> 
> Looks good to me, although I'm a little concerned we might have both the
> backlight and the vendor specific files in the kernel and thus hal would
> pick up both as laptop_panels.

Yes, so we might want to mention the old interface as obsolete in the spec
and keep it some time for compatibility?

> Also, when we have a nice standard interface, perhaps we should aim to
> use a C addon rather than execute scripts (as it's probably quicker and
> we don't keep executing bash). Maybe crack, as davidz would say.

Yes, but with the new interface, both Set and Get methods are actually
four-liners in bash. So I don't care whether it's a addon or a script ;-)
One advantage of keeping the scripts for now is that we can easily
maintain backward compatibility. As soon as we remove the obsolete code,
we can do the step towards a addon?

Regards,
	Holger


More information about the hal mailing list