Date: Fri, 26 Jun 2009 21:32:43 +0200 From: Christoph Langguth <christoph@rosenkeller.org> To: freebsd-usb@freebsd.org Cc: Rui Paulo <rpaulo@freebsd.org> Subject: Re: How to add support for Macbook Pro (USB) keyboard? Message-ID: <4A45225B.1010503@rosenkeller.org> In-Reply-To: <200906020937.20466.hselasky@c2i.net> References: <4A0DC89C.6010708@rosenkeller.org> <200905162158.22210.hselasky@c2i.net> <4A0F25C5.9020706@rosenkeller.org> <200906020937.20466.hselasky@c2i.net>
next in thread | previous in thread | raw e-mail | index | archive | help
Hans Petter Selasky schrieb: > Hi Christoph! > > Rui Paulo has an additional patch for ukbd.c. Can you look at it and verify? > > --HPS > > <cite> > > Here's how it worked: > http://wiki.freebsd.org/AppleMacbook#head-7eab3730c3bf3d04bdfb0d1d3649eaddf2fed595 > > If there's any problem with the userland approach, I would like to know. > If there isn't, please consider removing the kenrel support for the > eject key. > > </cite> > I have looked inside this a bit deeper. While the usbhidctl approach doesn't really work for this keyboard at the moment, here are my observations: - 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? - If so, how? - If not, what could a possible solution be? Thanks & cheers, Chris
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4A45225B.1010503>