Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 17 Feb 2019 16:00:32 -0600
From:      "Apollo D. Sharpe, Sr." <demetrioussharpe@netscape.net>
To:        Hans Petter Selasky <hps@selasky.org>, freebsd-usb@freebsd.org
Subject:   Re: Questions about the USB HID device drivers
Message-ID:  <3724cc29-b682-2395-bd95-cbfa418ad9f2@netscape.net>
In-Reply-To: <6762c7c9-f9dc-f7d2-0b1f-c2f6e2816cd7@selasky.org>
References:  <fd7883c8-604e-e7d7-b135-d1d957938e7c@netscape.net> <9c6a87dd-cf7c-d0eb-82f1-5e904baaf05f@selasky.org> <325834a2-d9f1-a1f4-dff1-7f724aeb4907@netscape.net> <6762c7c9-f9dc-f7d2-0b1f-c2f6e2816cd7@selasky.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On 2/15/19 7:46 AM, Hans Petter Selasky wrote:
> On 2/15/19 2:22 PM, A. D. Sharpe wrote:
>> On 2/15/2019 3:30 AM, Hans Petter Selasky wrote:
>>>
>>> Did you have a look at the code?
>>>
>>> sys/dev/usb/input/ums.c and sys/dev/usb/input/ukbd.c
>> I think I have a decent understanding of USB devices under FreeBSD. 
>> However, two things are tripping me up: a) the fact that the ums & 
>> ukbd drivers don't have "make_dev()" calls in them; and b) I can't 
>> seem to find an overall keyboard system or overall mouse system.
>>
>
> Events are delivered from the USB INTERRUPT endpoint's completion 
> handler to various places. At the moment events can end up via EVDEV 
> or simply sysmouse or the regular keyboard API depending on the system 
> configuration.
>
> At the moment, only for EVDEVS's /dev/input/xxxx, there is a 
> per-device character device handle, I think.


I think I've gotten a pretty good understanding of what's going on now, 
based on the answers that I've gotten from the developers part of the 
FreeBSD forums(*). The USB keyboard and mouse paths seems to go like this:

ums->usb_hid->/dev/ums0->sysmouse

ukbd->usb_hid->/dev/ukbd0->kbdmux


If this is correct, then the majority of my inquiry has been satisfied. 
My next questions are more centered around /dev as it relates to device 
drivers in general:

1. Is there a published standard of how device drivers should publish 
themselves in /dev? From what I can tell, they seem to be thrown into 
/dev without any sort of hierarchy to organize the nodes into what type 
of device they represent.

2. Does usb_hid automatically dump device nodes into /dev, or is there a 
way for hid drivers to specify specifically where their nodes should be 
publish -such as: /dev/input/somehiddevice0 ?


(*) 
https://forums.freebsd.org/threads/questions-about-the-usb-hid-device-drivers.69604/


-- 
Regards,

Apollo D. Sharpe, Sr.




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3724cc29-b682-2395-bd95-cbfa418ad9f2>