ACPI "special" button device, and Toshiba specific bits
Richard Hughes
hughsient at gmail.com
Thu Dec 1 09:24:36 PST 2005
On Thu, 2005-12-01 at 11:55 -0500, David Zeuthen wrote:
> On Tue, 2005-11-29 at 20:05 +0000, Richard Hughes wrote:
> > Here are three patches to add the start of generic "special" ACPI button
> > support.
> >
> > The first patch just adds a blank Virtual Input device for all ACPI
> > machines:
> >
> > udi = '/org/freedesktop/Hal/devices/acpi_uinput'
> > info.udi = '/org/freedesktop/Hal/devices/acpi_uinput' (string)
> > info.addons = {'hald-addon-acpi-buttons-toshiba'} (string list)
> > linux.hotplug_type = 4 (0x4) (int)
> > info.capabilities = {'virtualinput'} (string list)
> > info.category = 'virtualinput' (string)
> > info.product = 'Virtual Input Device' (string)
> > info.parent = '/org/freedesktop/Hal/devices/computer' (string)
> > linux.acpi_type = 4 (0x4) (int)
> > linux.acpi_path = '/dev/uinput' (string)
>
> Some questions:
>
> 1. why is this device object necessary to expose? What is the purpose
> of it?
Could do, but I'm thinking of using this for the IBM specific bits, and
the Sony bits, so I thought I could just put it in the one place, rather
than three.
> 2. Also, why don't you just make the toshiba addon create the device
> objects you need?
Again, I could do if you think this is best. I'm thinking this "device"
might be more useful created generically, and then just added-to by the
addons, rather than created in each addon (of which we might be running
more than one, like toshiba and generic acpi)
> 3. Finally, why does the mapping from e.g. "Satellite Pro A10" to what
> keycodes does what have to be configurable in an .fdi file? Why
> don't you just hardcode that in the toshiba addon? It's not like
> it's likely to change, right?
Ohh yes it is :-) Some Toshibas have button mappings different to each
other, and some have buttons that don't exist. Plus keeping it in the
FDI lets us re-map buttons (such as F1 = Lock) without enforcing the
policy in the addon.
Thanks for the review.
Richard.
More information about the hal
mailing list