ukbd vs. uhid

Hans Petter Selasky hselasky at c2i.net
Wed Jul 15 07:37:50 UTC 2009


On Tuesday 14 July 2009 22:19:52 Christoph Langguth wrote:
> Hi all,
>
> just bumping this issue, triggered by the mentioning of PR 102066, and
> using a better subject line which might receive replies :-)
>
> While trying to get my keyboard and its multimedia keys to work with
> usbhidctl (it doesn't really work at the moment), I came across this:
>
> - the keyboard is only handled by *either* ukbd *or* uhid. In fact, if
> unpatched, uhid will not even try to consider the device, because of the
> following code inside uhid.c's uhid_probe() function:
>
>          if (uaa->use_generic == 0) {
>                  /* give Mouse and Keyboard drivers a try first */
>                return (ENXIO);
>          }
>
> That means that the keyboard always ends up as device ukbdX, and never
> as uhidY.
>
> Before even trying to get it to work using uhid, I think this is the
> issue that needs to be sorted out: Can a device be handled by *two*
> independent drivers at once?

No. You would have to hook in a translation for your multimedia keys in the 
sys/dev/usb/input/ukbd.c driver I think.

If you unload ukbd, uhid will attach.

> - If so, how?
> - If not, what could a possible solution be?

--HPS


More information about the freebsd-usb mailing list