Add support for /sys/class/backlight

Richard Hughes hughsient at gmail.com
Thu Oct 5 15:30:02 PDT 2006


On Fri, 2006-10-06 at 00:21 +0200, Holger Macht wrote:
> 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?

By interface, you mean "the old way of getting the data" rather than a
dbus interface right?

> > 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?

Sounds like a plan.

Richard.




More information about the hal mailing list