From owner-freebsd-usb@FreeBSD.ORG Wed Jul 15 07:37:50 2009 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 83C991065673 for ; Wed, 15 Jul 2009 07:37:50 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe13.swipnet.se [212.247.155.129]) by mx1.freebsd.org (Postfix) with ESMTP id 19E2F8FC28 for ; Wed, 15 Jul 2009 07:37:49 +0000 (UTC) (envelope-from hselasky@c2i.net) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.0 c=1 a=gg2W7PyvkLb8p4ie143lBA==:17 a=8Hzi6sFRXyzT1sVkO2UA:9 a=OyI8bnEIFkyUpcx2gJMA:7 a=XA_NgHBAJ6Y2KeKgp3d_KI7_9wQA:4 Received: from [194.248.135.20] (account mc467741@c2i.net HELO laptop.adsl.tele2.no) by mailfe13.swip.net (CommuniGate Pro SMTP 5.2.13) with ESMTPA id 889875752; Wed, 15 Jul 2009 09:37:48 +0200 From: Hans Petter Selasky To: freebsd-usb@freebsd.org Date: Wed, 15 Jul 2009 09:37:32 +0200 User-Agent: KMail/1.11.4 (FreeBSD/8.0-BETA1; KDE/4.2.4; i386; ; ) References: <4A5CE868.4060903@rosenkeller.org> In-Reply-To: <4A5CE868.4060903@rosenkeller.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200907150937.33147.hselasky@c2i.net> Cc: Christoph Langguth Subject: Re: ukbd vs. uhid X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Jul 2009 07:37:50 -0000 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