* Figuring out USB device locations
@ 2004-03-25 17:20 James Lamanna
2004-03-25 23:57 ` Greg KH
0 siblings, 1 reply; 4+ messages in thread
From: James Lamanna @ 2004-03-25 17:20 UTC (permalink / raw)
To: linux-kernel
Is there an easy way to find out what /dev entries usb devices get
mapped to from userspace? Specifically mice since the /dev location
isn't even printed in dmesg.
I have a program that needs to open each mouse independently so
/dev/input/mice isn't an option.
I'm also on a 2.4 kernel so sysfs/udev is not available.
Thanks.
--
James Lamanna
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Figuring out USB device locations
2004-03-25 17:20 Figuring out USB device locations James Lamanna
@ 2004-03-25 23:57 ` Greg KH
2004-03-26 0:33 ` James Lamanna
0 siblings, 1 reply; 4+ messages in thread
From: Greg KH @ 2004-03-25 23:57 UTC (permalink / raw)
To: James Lamanna; +Cc: linux-kernel
On Thu, Mar 25, 2004 at 09:20:47AM -0800, James Lamanna wrote:
> Is there an easy way to find out what /dev entries usb devices get
> mapped to from userspace?
"easy way" on 2.4? No, sorry. You need 2.6 to determine this in a
simple manner. But there are some files in the /proc/bus/usb/
and /proc/bus/input/ directories that will help you out.
Good luck,
greg k-h
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Figuring out USB device locations
2004-03-25 23:57 ` Greg KH
@ 2004-03-26 0:33 ` James Lamanna
2004-03-26 0:41 ` Greg KH
0 siblings, 1 reply; 4+ messages in thread
From: James Lamanna @ 2004-03-26 0:33 UTC (permalink / raw)
To: Greg KH; +Cc: linux-kernel
Greg KH wrote:
> On Thu, Mar 25, 2004 at 09:20:47AM -0800, James Lamanna wrote:
>
>>Is there an easy way to find out what /dev entries usb devices get
>>mapped to from userspace?
>
>
> "easy way" on 2.4? No, sorry. You need 2.6 to determine this in a
> simple manner. But there are some files in the /proc/bus/usb/
> and /proc/bus/input/ directories that will help you out.
Hmm...its not obvious to me how i can use /proc/bus/usb/xxx/yyy to get
the /dev entry information. I can get the USB device number, but I don't
see how to get at a mapping to a major/minor in /dev space (or is this
not possible in 2.4)...
--
James Lamanna
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Figuring out USB device locations
2004-03-26 0:33 ` James Lamanna
@ 2004-03-26 0:41 ` Greg KH
0 siblings, 0 replies; 4+ messages in thread
From: Greg KH @ 2004-03-26 0:41 UTC (permalink / raw)
To: James Lamanna; +Cc: linux-kernel
On Thu, Mar 25, 2004 at 04:33:06PM -0800, James Lamanna wrote:
> Greg KH wrote:
>
> >On Thu, Mar 25, 2004 at 09:20:47AM -0800, James Lamanna wrote:
> >
> >>Is there an easy way to find out what /dev entries usb devices get
> >>mapped to from userspace?
> >
> >
> >"easy way" on 2.4? No, sorry. You need 2.6 to determine this in a
> >simple manner. But there are some files in the /proc/bus/usb/
> >and /proc/bus/input/ directories that will help you out.
>
> Hmm...its not obvious to me how i can use /proc/bus/usb/xxx/yyy to get
> the /dev entry information. I can get the USB device number, but I don't
> see how to get at a mapping to a major/minor in /dev space (or is this
> not possible in 2.4)...
Well, for mice you can corrispond the usb position found in
/proc/bus/usb/devices with the input information found in
/proc/bus/usb/input to determine which /dev file that mouse is
(possibly, but you might get a close guess there.)
But remember, under 2.4 this is quite difficult. I suggest just giving
up and using 2.6 :)
thanks,
greg k-h
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2004-03-26 0:50 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-03-25 17:20 Figuring out USB device locations James Lamanna
2004-03-25 23:57 ` Greg KH
2004-03-26 0:33 ` James Lamanna
2004-03-26 0:41 ` Greg KH
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox