Re: [PATCH] USB: serial: pl2303: add Delock Infrared device id

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2/9/19 1:16 PM, Johan Hovold wrote:
> On Sat, Feb 09, 2019 at 12:18:40PM +0330, ebrahim@xxxxxxx wrote:
>> From: Ebrahim Byagowi <ebrahim@xxxxxxx>
>>
>> This makes Delock Infrared adapter to work as a USB to Serial device.
>> ---
>>  drivers/usb/serial/pl2303.c | 1 +
>>  drivers/usb/serial/pl2303.h | 3 +++
>>  2 files changed, 4 insertions(+)
>>
>> diff --git a/drivers/usb/serial/pl2303.c b/drivers/usb/serial/pl2303.c
>> index 98e7a5df0..d5ec72575 100644
>> --- a/drivers/usb/serial/pl2303.c
>> +++ b/drivers/usb/serial/pl2303.c
>> @@ -105,6 +105,7 @@ static const struct usb_device_id id_table[] = {
>>  	{ USB_DEVICE(SANWA_VENDOR_ID, SANWA_PRODUCT_ID) },
>>  	{ USB_DEVICE(ADLINK_VENDOR_ID, ADLINK_ND6530_PRODUCT_ID) },
>>  	{ USB_DEVICE(SMART_VENDOR_ID, SMART_PRODUCT_ID) },
>> +	{ USB_DEVICE(DELOCK_VENDOR_ID, DELOCK_PRODUCT_ID) },
>>  	{ }					/* Terminating entry */
>>  };
>>  
>> diff --git a/drivers/usb/serial/pl2303.h b/drivers/usb/serial/pl2303.h
>> index 4e2554d55..01936de13 100644
>> --- a/drivers/usb/serial/pl2303.h
>> +++ b/drivers/usb/serial/pl2303.h
>> @@ -153,3 +153,6 @@
>>  #define SMART_VENDOR_ID	0x0b8c
>>  #define SMART_PRODUCT_ID	0x2303
>>  
>> +/* Delock Infrared Adapter */
>> +#define DELOCK_VENDOR_ID	0x1685
>> +#define DELOCK_PRODUCT_ID	0x2000
> Please post the output of lsusb -v for this device, and perhaps also a
> log from when connecting the device with driver debugging enabled.
lsusb -v -d 1685:0200

Bus 002 Device 019: ID 1685:0200 Delock Infrared adapter
Couldn't open device, some information will be missing
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               1.10
  bDeviceClass          255 Vendor Specific Class
  bDeviceSubClass         1
  bDeviceProtocol         0
  bMaxPacketSize0         8
  idVendor           0x1685 Delock
  idProduct          0x0200 Infrared adapter
  bcdDevice            0.08
  iManufacturer           0
  iProduct                0
  iSerial                 0
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength       0x0027
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          0
    bmAttributes         0x80
      (Bus Powered)
    MaxPower              440mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           3
      bInterfaceClass         0
      bInterfaceSubClass      0
      bInterfaceProtocol      0
      iInterface              0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x000a  1x 10 bytes
        bInterval               1
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x02  EP 2 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0040  1x 64 bytes
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x83  EP 3 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0040  1x 64 bytes
        bInterval               0


I've uploaded a screenshot here
https://commons.wikimedia.org/wiki/File:A_modified_kernel_screenshot_on_QEMU.png
which shows it understands a remote control commands also.

>
> How did you determine that this a pl2303 device?

I tried to find a compatible driver from different IR adapters I have
around, one of them a 0df7:0620 which identifies itself as a `Mobile
Action Technology, Inc. MA-620 Infrared Adapter`, enlisted on the same
header, uses the driver and I found the same driver works for this dongle.

Uploaded the patch with signed-off tag and correcting a copy paste
error, please ignore the original. Thanks!

>
> Johan
>
>
>From 05164e35fca7c2b2bc3bb14e50c744a778460f6a Mon Sep 17 00:00:00 2001
From: Ebrahim Byagowi <ebrahim@xxxxxxx>
Date: Sat, 9 Feb 2019 11:05:23 +0330
Subject: [PATCH] USB: serial: pl2303: add Delock Infrared device id

This makes Delock Infrared adapter to work as a USB to Serial device.

Signed-off-by: Ebrahim Byagowi <ebrahim@xxxxxxx>
---
 drivers/usb/serial/pl2303.c | 1 +
 drivers/usb/serial/pl2303.h | 3 +++
 2 files changed, 4 insertions(+)

diff --git a/drivers/usb/serial/pl2303.c b/drivers/usb/serial/pl2303.c
index 98e7a5df0..d5ec72575 100644
--- a/drivers/usb/serial/pl2303.c
+++ b/drivers/usb/serial/pl2303.c
@@ -105,6 +105,7 @@ static const struct usb_device_id id_table[] = {
     { USB_DEVICE(SANWA_VENDOR_ID, SANWA_PRODUCT_ID) },
     { USB_DEVICE(ADLINK_VENDOR_ID, ADLINK_ND6530_PRODUCT_ID) },
     { USB_DEVICE(SMART_VENDOR_ID, SMART_PRODUCT_ID) },
+    { USB_DEVICE(DELOCK_VENDOR_ID, DELOCK_PRODUCT_ID) },
     { }                    /* Terminating entry */
 };
 
diff --git a/drivers/usb/serial/pl2303.h b/drivers/usb/serial/pl2303.h
index 4e2554d55..6e6df7823 100644
--- a/drivers/usb/serial/pl2303.h
+++ b/drivers/usb/serial/pl2303.h
@@ -153,3 +153,6 @@
 #define SMART_VENDOR_ID    0x0b8c
 #define SMART_PRODUCT_ID    0x2303
 
+/* Delock Infrared Adapter */
+#define DELOCK_VENDOR_ID    0x1685
+#define DELOCK_PRODUCT_ID    0x0200
-- 
2.20.1

>From 05164e35fca7c2b2bc3bb14e50c744a778460f6a Mon Sep 17 00:00:00 2001
From: Ebrahim Byagowi <ebrahim@xxxxxxx>
Date: Sat, 9 Feb 2019 11:05:23 +0330
Subject: [PATCH] USB: serial: pl2303: add Delock Infrared device id

This makes Delock Infrared adapter to work as a USB to Serial device.

Signed-off-by: Ebrahim Byagowi <ebrahim@xxxxxxx>
---
 drivers/usb/serial/pl2303.c | 1 +
 drivers/usb/serial/pl2303.h | 3 +++
 2 files changed, 4 insertions(+)

diff --git a/drivers/usb/serial/pl2303.c b/drivers/usb/serial/pl2303.c
index 98e7a5df0..d5ec72575 100644
--- a/drivers/usb/serial/pl2303.c
+++ b/drivers/usb/serial/pl2303.c
@@ -105,6 +105,7 @@ static const struct usb_device_id id_table[] = {
 	{ USB_DEVICE(SANWA_VENDOR_ID, SANWA_PRODUCT_ID) },
 	{ USB_DEVICE(ADLINK_VENDOR_ID, ADLINK_ND6530_PRODUCT_ID) },
 	{ USB_DEVICE(SMART_VENDOR_ID, SMART_PRODUCT_ID) },
+	{ USB_DEVICE(DELOCK_VENDOR_ID, DELOCK_PRODUCT_ID) },
 	{ }					/* Terminating entry */
 };
 
diff --git a/drivers/usb/serial/pl2303.h b/drivers/usb/serial/pl2303.h
index 4e2554d55..6e6df7823 100644
--- a/drivers/usb/serial/pl2303.h
+++ b/drivers/usb/serial/pl2303.h
@@ -153,3 +153,6 @@
 #define SMART_VENDOR_ID	0x0b8c
 #define SMART_PRODUCT_ID	0x2303
 
+/* Delock Infrared Adapter */
+#define DELOCK_VENDOR_ID	0x1685
+#define DELOCK_PRODUCT_ID	0x0200
-- 
2.20.1


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux