diff options
author | Alan Stern <stern@rowland.harvard.edu> | 2007-07-12 17:06:23 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2007-07-19 17:46:04 -0700 |
commit | 69d42a78f935d19384d1f6e4f94b65bb162b36df (patch) | |
tree | 03c7721d241f1db39671546db123b57def296b1d /drivers/macintosh/apm_emu.c | |
parent | 1b4cd43bd3f9aa7a794e29b80b0d984a8e144df4 (diff) |
USB: add "descriptors" binary sysfs attribute
This patch (as934) adds a new readonly binary sysfs attribute file
called "descriptors" for each USB device. The attribute contains the
device descriptor followed by the raw descriptor entry (config plug
subsidiary descriptors) for the current configuration.
Having this information available in fixed-format binary makes life a
lot easier for user programs by avoiding the need to open, read, and
parse multiple sysfs text files.
The information in this attribute file is much like that in usbfs's
device file, but there are some significant differences:
The 2-byte fields in the device descriptor are left in
little-endian byte order, as they appear on the bus and
in the kernel.
Only one raw descriptor set is presented, that of the
current configuration.
Opening this file will not cause a suspended device to be
autoresumed.
The last item in particular should be a big selling point for libusb,
which currently forces all USB devices to be resumed as it scans the
device tree.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Cc: Dave Mielke <dave@mielke.cc>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/macintosh/apm_emu.c')
0 files changed, 0 insertions, 0 deletions