Mixing and matching usbfs with sysfs - Embedded
This is a discussion on Mixing and matching usbfs with sysfs - Embedded ; Hello,
I'm having trouble coming up with a decent way to combine information
found in /proc/bus/usb/devices (usbfs) with stuff under
/sys/class/usb/devices/.
Specifically I have a hard time mapping the topology info in the "T:"
lines of /proc/bus/usb/devices to the device ...
-
Mixing and matching usbfs with sysfs
Hello,
I'm having trouble coming up with a decent way to combine information
found in /proc/bus/usb/devices (usbfs) with stuff under
/sys/class/usb/devices/.
Specifically I have a hard time mapping the topology info in the "T:"
lines of /proc/bus/usb/devices to the device nodes unser
/sys/class/usb/devices.
for example, I can find out by hand that
/sys/bus/usb/devices/platform/at91_ohci/usb1/1-1/1-1.2/1-1.2:2.1
belongs to the device whose entry in /proc/bus/devices/usb starts with
T: Bus=01 Lev=02 Prnt=02 Port=01 Cnt=02 Dev#= 7 Spd=12 MxCh= 0
But I have no real idea on how to automatically match the two. So I
wonder if anyboday has solved this problem already?
Thanks in advance,
--
Linards Ticmanis
-
Re: Mixing and matching usbfs with sysfs
Linards Ticmanis wrote:
> I'm having trouble coming up with a decent way to combine information
> found in /proc/bus/usb/devices (usbfs) with stuff under
> /sys/class/usb/devices/.
>
> Specifically I have a hard time mapping the topology info in the "T:"
> lines of /proc/bus/usb/devices to the device nodes unser
> /sys/class/usb/devices.
Ok... just for the benefit of people who might use the archive in the
future:
The answer is, you can usually forget usbfs (/proc/bus/usb stuff) for
anything beyond simply viewing the contents. Everything that is there is
also buried in sysfs somewhere, and while /proc/bus/usb/devices is a
nice human readable thing, crisscrossing through sysfs is really much
easier for programs.
--
Linards Ticmanis