lkml.org 
[lkml]   [2016]   [Aug]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH RFC V3.5] leds: trigger: Introduce an USB port trigger
On Thu, 25 Aug 2016, Jacek Anaszewski wrote:

> >>> What kind of description do you mean? Where should it be used / where
> >>> should it appear?
> >>>
> >>
> >> Product name/symbol. Actually it should be USB subsystem responsibility
> >> to provide the means for querying the product name by port id, if it
> >> is possible at all.
> >
> > cat /sys/bus/usb/devices/PORT/product
> > cat /sys/bus/usb/devices/PORT/manufacturer
> >
> > These will work if there is a device registered under PORT.
>
> I've found only idProduct and idVendor files. They indeed uniquely
> identify the device, but the numbers are not human readable.
> Is there a way to retrieve the corresponding names in kernel?

If the device provides the string descriptors then the textual product
and manufacturer files are available in sysfs, otherwise they aren't.

> Does the lsusb command do the mapping in the user space or maybe
> it takes the names from kernel?

lsusb does the mapping in userspace, based on an ID database. On my
system (Fedora), the database is /etc/udev/hwdb.bin.

Alan Stern

\
 
 \ /
  Last update: 2016-09-17 09:57    [W:0.125 / U:0.048 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site