Griffin Powermate

Peter Hutterer peter.hutterer at who-t.net
Sat May 9 16:19:22 PDT 2009


On Sat, May 09, 2009 at 11:29:28PM +0100, Phil Endecott wrote:
> I am painfully transitioning my system from an old HAL-less setup to a 
> new HAL-powered one.  Some of you may have seen my questions about the 
> Griffin Powermate on the xorg list.  I now need to get HAL to 
> understand it.  Has anyone else used this device with HAL?
> 
> The Griffin Powermate is basically a USB dial.  See e.g. 
> http://www.griffintechnology.com/products/powermate/.  USB HID has no 
> problem with it being just a dial and single button and describes it as 
> such; there is a kernel input event driver for it that returns DIAL 
> events, and X works with it (at least, the old Xorg evdev driver worked 
> with it, and the very-latest new evdev driver should work with it).  So 
> HAL is now the only bit that's missing.
> 
> Currently, with my Debian HAL packages, I get this:
> 
> udi = '/org/freedesktop/Hal/devices/usb_device_77d_410_noserial_if0_logicaldev_input'
>    button.has_state = false  (bool)
>    info.addons.singleton = {'hald-addon-input'} (string list)
>    info.capabilities = {'input', 'button'} (string list)
>    info.category = 'input'  (string)
>    info.parent = 
> '/org/freedesktop/Hal/devices/usb_device_77d_410_noserial_if0'  (string)
>    info.product = 'Griffin PowerMate'  (string)
>    info.subsystem = 'input'  (string)
>    info.udi = 
> '/org/freedesktop/Hal/devices/usb_device_77d_410_noserial_if0_logicaldev_input'  
> ($
>    input.device = '/dev/input/event3'  (string)
>    input.originating_device = 
> '/org/freedesktop/Hal/devices/usb_device_77d_410_noserial_if0'  (s$
>    input.product = 'Griffin PowerMate'  (string)
>    linux.device_file = '/dev/input/event3'  (string)
>    linux.hotplug_type = 2  (0x2)  (int)
>    linux.subsystem = 'input'  (string)
>    linux.sysfs_path = '/sys/class/input/input7/event3'  (string)
> 
> My x11-evdev.fdi looks for capabilities = input.mouse or input.keys.  
> Since this description only has capabilities = input,button it isn't 
> going to match.

just add the match rule for input.button. We only check for mouse and keys
because that's what evdev traditionally suppported (we've added touchpads
and tablets since too). it's gotten better with 2.2 and once the powermate
is supported we can manage virtually any device, so the match rule for
input.button may become permanent anyway.
 
> So I could hack the x11-evdev.fdi to detect this device.  But it might 
> be better if there were an info.dial capability, or something like 
> that.  I guess I would then add something in the "information" 
> directory to match the product ID and declare it as a dial (right? - 
> sorry, I'm completely new to this).

too complicated. if we can deal with a device that has a dial button only,
we can deal with any device that has a single button (or just buttons). so
there's no need for product-specific matches.
 
Cheers,
  Peter


More information about the hal mailing list