usb: core: allow a reference device for new_id
Often, usb drivers need some driver_info to get a device to work. To have access to driver_info when using new_id, allow to pass a reference vendor:product tuple from which new_id will inherit driver_info. Signed-off-by: Wolfram Sang <wsa@the-dreams.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:

committed by
Greg Kroah-Hartman

parent
c63fe8f6ca
commit
2fc82c2de6
@@ -50,13 +50,19 @@ Description:
|
||||
This may allow the driver to support more hardware than
|
||||
was included in the driver's static device ID support
|
||||
table at compile time. The format for the device ID is:
|
||||
idVendor idProduct bInterfaceClass.
|
||||
idVendor idProduct bInterfaceClass RefIdVendor RefIdProduct
|
||||
The vendor ID and device ID fields are required, the
|
||||
interface class is optional.
|
||||
rest is optional. The Ref* tuple can be used to tell the
|
||||
driver to use the same driver_data for the new device as
|
||||
it is used for the reference device.
|
||||
Upon successfully adding an ID, the driver will probe
|
||||
for the device and attempt to bind to it. For example:
|
||||
# echo "8086 10f5" > /sys/bus/usb/drivers/foo/new_id
|
||||
|
||||
Here add a new device (0458:7045) using driver_data from
|
||||
an already supported device (0458:704c):
|
||||
# echo "0458 7045 0 0458 704c" > /sys/bus/usb/drivers/foo/new_id
|
||||
|
||||
Reading from this file will list all dynamically added
|
||||
device IDs in the same format, with one entry per
|
||||
line. For example:
|
||||
|
Reference in New Issue
Block a user