]> git.baikalelectronics.ru Git - kernel.git/commitdiff
USB: serial: ftdi_sio: add Olimex ARM-USB-TINY(H) PIDs
authorAndrey Korolyov <andrey@xdel.ru>
Tue, 16 May 2017 20:54:41 +0000 (23:54 +0300)
committerJohan Hovold <johan@kernel.org>
Wed, 17 May 2017 08:31:20 +0000 (10:31 +0200)
This patch adds support for recognition of ARM-USB-TINY(H) devices which
are almost identical to ARM-USB-OCD(H) but lacking separate barrel jack
and serial console.

By suggestion from Johan Hovold it is possible to replace
ftdi_jtag_quirk with a bit more generic construction. Since all
Olimex-ARM debuggers has exactly two ports, we could safely always use
only second port within the debugger family.

Signed-off-by: Andrey Korolyov <andrey@xdel.ru>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Johan Hovold <johan@kernel.org>
drivers/usb/serial/ftdi_sio.c
drivers/usb/serial/ftdi_sio_ids.h

index 0e634c11abbf22feda53a5f1b4888aec86143afe..aba74f817dc6594064241013b92e31138e587dce 100644 (file)
@@ -809,10 +809,10 @@ static const struct usb_device_id id_table_combined[] = {
        { USB_DEVICE(FTDI_VID, FTDI_PROPOX_ISPCABLEIII_PID) },
        { USB_DEVICE(FTDI_VID, CYBER_CORTEX_AV_PID),
                .driver_info = (kernel_ulong_t)&ftdi_jtag_quirk },
-       { USB_DEVICE(OLIMEX_VID, OLIMEX_ARM_USB_OCD_PID),
-               .driver_info = (kernel_ulong_t)&ftdi_jtag_quirk },
-       { USB_DEVICE(OLIMEX_VID, OLIMEX_ARM_USB_OCD_H_PID),
-               .driver_info = (kernel_ulong_t)&ftdi_jtag_quirk },
+       { USB_DEVICE_INTERFACE_NUMBER(OLIMEX_VID, OLIMEX_ARM_USB_OCD_PID, 1) },
+       { USB_DEVICE_INTERFACE_NUMBER(OLIMEX_VID, OLIMEX_ARM_USB_OCD_H_PID, 1) },
+       { USB_DEVICE_INTERFACE_NUMBER(OLIMEX_VID, OLIMEX_ARM_USB_TINY_PID, 1) },
+       { USB_DEVICE_INTERFACE_NUMBER(OLIMEX_VID, OLIMEX_ARM_USB_TINY_H_PID, 1) },
        { USB_DEVICE(FIC_VID, FIC_NEO1973_DEBUG_PID),
                .driver_info = (kernel_ulong_t)&ftdi_jtag_quirk },
        { USB_DEVICE(FTDI_VID, FTDI_OOCDLINK_PID),
index 71fb9e59db7125c845a9a1c23c4e33430a142a3e..4fcf1cecb6d721ad366666eec49774bcf9d00808 100644 (file)
 /* Olimex */
 #define OLIMEX_VID                     0x15BA
 #define OLIMEX_ARM_USB_OCD_PID         0x0003
+#define OLIMEX_ARM_USB_TINY_PID        0x0004
+#define OLIMEX_ARM_USB_TINY_H_PID      0x002a
 #define OLIMEX_ARM_USB_OCD_H_PID       0x002b
 
 /*