diff options
author | Lu Baolu <baolu.lu@linux.intel.com> | 2017-03-21 04:01:32 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2017-03-21 07:30:17 -0400 |
commit | 57fb47279a04cd53641dc5ae55a6d47e4f32a2fd (patch) | |
tree | 7ecd23ac73a41cf44176c1c69655f25f30038825 /drivers/usb/serial/usb_debug.c | |
parent | 1b5aeebf3a92273b4d85aeff37a16037bc3c3abf (diff) |
usb/serial: Add DBC debug device support to usb_debug
This patch adds DBC debug device support to the usb_debug driver.
Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com>
Acked-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Johan Hovold <johan@kernel.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Mathias Nyman <mathias.nyman@linux.intel.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: linux-usb@vger.kernel.org
Link: http://lkml.kernel.org/r/1490083293-3792-5-git-send-email-baolu.lu@linux.intel.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'drivers/usb/serial/usb_debug.c')
-rw-r--r-- | drivers/usb/serial/usb_debug.c | 28 |
1 files changed, 25 insertions, 3 deletions
diff --git a/drivers/usb/serial/usb_debug.c b/drivers/usb/serial/usb_debug.c index ca2fa5bbe17e..92f7e5c21162 100644 --- a/drivers/usb/serial/usb_debug.c +++ b/drivers/usb/serial/usb_debug.c | |||
@@ -32,7 +32,18 @@ static const struct usb_device_id id_table[] = { | |||
32 | { USB_DEVICE(0x0525, 0x127a) }, | 32 | { USB_DEVICE(0x0525, 0x127a) }, |
33 | { }, | 33 | { }, |
34 | }; | 34 | }; |
35 | MODULE_DEVICE_TABLE(usb, id_table); | 35 | |
36 | static const struct usb_device_id dbc_id_table[] = { | ||
37 | { USB_DEVICE(0x1d6b, 0x0004) }, | ||
38 | { }, | ||
39 | }; | ||
40 | |||
41 | static const struct usb_device_id id_table_combined[] = { | ||
42 | { USB_DEVICE(0x0525, 0x127a) }, | ||
43 | { USB_DEVICE(0x1d6b, 0x0004) }, | ||
44 | { }, | ||
45 | }; | ||
46 | MODULE_DEVICE_TABLE(usb, id_table_combined); | ||
36 | 47 | ||
37 | /* This HW really does not support a serial break, so one will be | 48 | /* This HW really does not support a serial break, so one will be |
38 | * emulated when ever the break state is set to true. | 49 | * emulated when ever the break state is set to true. |
@@ -71,9 +82,20 @@ static struct usb_serial_driver debug_device = { | |||
71 | .process_read_urb = usb_debug_process_read_urb, | 82 | .process_read_urb = usb_debug_process_read_urb, |
72 | }; | 83 | }; |
73 | 84 | ||
85 | static struct usb_serial_driver dbc_device = { | ||
86 | .driver = { | ||
87 | .owner = THIS_MODULE, | ||
88 | .name = "xhci_dbc", | ||
89 | }, | ||
90 | .id_table = dbc_id_table, | ||
91 | .num_ports = 1, | ||
92 | .break_ctl = usb_debug_break_ctl, | ||
93 | .process_read_urb = usb_debug_process_read_urb, | ||
94 | }; | ||
95 | |||
74 | static struct usb_serial_driver * const serial_drivers[] = { | 96 | static struct usb_serial_driver * const serial_drivers[] = { |
75 | &debug_device, NULL | 97 | &debug_device, &dbc_device, NULL |
76 | }; | 98 | }; |
77 | 99 | ||
78 | module_usb_serial_driver(serial_drivers, id_table); | 100 | module_usb_serial_driver(serial_drivers, id_table_combined); |
79 | MODULE_LICENSE("GPL"); | 101 | MODULE_LICENSE("GPL"); |