diff options
Diffstat (limited to 'drivers')
| -rw-r--r-- | drivers/media/IR/imon.c | 27 |
1 files changed, 17 insertions, 10 deletions
diff --git a/drivers/media/IR/imon.c b/drivers/media/IR/imon.c index 2bae9ba2e40c..4bbd45f4284c 100644 --- a/drivers/media/IR/imon.c +++ b/drivers/media/IR/imon.c | |||
| @@ -94,6 +94,7 @@ struct imon_context { | |||
| 94 | 94 | ||
| 95 | bool display_supported; /* not all controllers do */ | 95 | bool display_supported; /* not all controllers do */ |
| 96 | bool display_isopen; /* display port has been opened */ | 96 | bool display_isopen; /* display port has been opened */ |
| 97 | bool rf_device; /* true if iMON 2.4G LT/DT RF device */ | ||
| 97 | bool rf_isassociating; /* RF remote associating */ | 98 | bool rf_isassociating; /* RF remote associating */ |
| 98 | bool dev_present_intf0; /* USB device presence, interface 0 */ | 99 | bool dev_present_intf0; /* USB device presence, interface 0 */ |
| 99 | bool dev_present_intf1; /* USB device presence, interface 1 */ | 100 | bool dev_present_intf1; /* USB device presence, interface 1 */ |
| @@ -1465,7 +1466,7 @@ static void imon_incoming_packet(struct imon_context *ictx, | |||
| 1465 | idev = ictx->idev; | 1466 | idev = ictx->idev; |
| 1466 | 1467 | ||
| 1467 | /* filter out junk data on the older 0xffdc imon devices */ | 1468 | /* filter out junk data on the older 0xffdc imon devices */ |
| 1468 | if ((buf[0] == 0xff) && (buf[7] == 0xff)) | 1469 | if ((buf[0] == 0xff) && (buf[1] == 0xff) && (buf[2] == 0xff)) |
| 1469 | return; | 1470 | return; |
| 1470 | 1471 | ||
| 1471 | /* Figure out what key was pressed */ | 1472 | /* Figure out what key was pressed */ |
| @@ -1908,6 +1909,7 @@ static struct imon_context *imon_init_intf0(struct usb_interface *intf) | |||
| 1908 | ictx->dev_present_intf0 = true; | 1909 | ictx->dev_present_intf0 = true; |
| 1909 | ictx->rx_urb_intf0 = rx_urb; | 1910 | ictx->rx_urb_intf0 = rx_urb; |
| 1910 | ictx->tx_urb = tx_urb; | 1911 | ictx->tx_urb = tx_urb; |
| 1912 | ictx->rf_device = false; | ||
| 1911 | 1913 | ||
| 1912 | ictx->vendor = le16_to_cpu(ictx->usbdev_intf0->descriptor.idVendor); | 1914 | ictx->vendor = le16_to_cpu(ictx->usbdev_intf0->descriptor.idVendor); |
| 1913 | ictx->product = le16_to_cpu(ictx->usbdev_intf0->descriptor.idProduct); | 1915 | ictx->product = le16_to_cpu(ictx->usbdev_intf0->descriptor.idProduct); |
| @@ -2047,6 +2049,12 @@ static void imon_get_ffdc_type(struct imon_context *ictx) | |||
| 2047 | dev_info(ictx->dev, "0xffdc iMON Knob, iMON IR"); | 2049 | dev_info(ictx->dev, "0xffdc iMON Knob, iMON IR"); |
| 2048 | ictx->display_supported = false; | 2050 | ictx->display_supported = false; |
| 2049 | break; | 2051 | break; |
| 2052 | /* iMON 2.4G LT (usb stick), no display, iMON RF */ | ||
| 2053 | case 0x4e: | ||
| 2054 | dev_info(ictx->dev, "0xffdc iMON 2.4G LT, iMON RF"); | ||
| 2055 | ictx->display_supported = false; | ||
| 2056 | ictx->rf_device = true; | ||
| 2057 | break; | ||
| 2050 | /* iMON VFD, no IR (does have vol knob tho) */ | 2058 | /* iMON VFD, no IR (does have vol knob tho) */ |
| 2051 | case 0x35: | 2059 | case 0x35: |
| 2052 | dev_info(ictx->dev, "0xffdc iMON VFD + knob, no IR"); | 2060 | dev_info(ictx->dev, "0xffdc iMON VFD + knob, no IR"); |
| @@ -2197,15 +2205,6 @@ static int __devinit imon_probe(struct usb_interface *interface, | |||
| 2197 | goto fail; | 2205 | goto fail; |
| 2198 | } | 2206 | } |
| 2199 | 2207 | ||
| 2200 | if (product == 0xffdc) { | ||
| 2201 | /* RF products *also* use 0xffdc... sigh... */ | ||
| 2202 | sysfs_err = sysfs_create_group(&interface->dev.kobj, | ||
| 2203 | &imon_rf_attribute_group); | ||
| 2204 | if (sysfs_err) | ||
| 2205 | err("%s: Could not create RF sysfs entries(%d)", | ||
| 2206 | __func__, sysfs_err); | ||
| 2207 | } | ||
| 2208 | |||
| 2209 | } else { | 2208 | } else { |
| 2210 | /* this is the secondary interface on the device */ | 2209 | /* this is the secondary interface on the device */ |
| 2211 | ictx = imon_init_intf1(interface, first_if_ctx); | 2210 | ictx = imon_init_intf1(interface, first_if_ctx); |
| @@ -2233,6 +2232,14 @@ static int __devinit imon_probe(struct usb_interface *interface, | |||
| 2233 | 2232 | ||
| 2234 | imon_set_display_type(ictx, interface); | 2233 | imon_set_display_type(ictx, interface); |
| 2235 | 2234 | ||
| 2235 | if (product == 0xffdc && ictx->rf_device) { | ||
| 2236 | sysfs_err = sysfs_create_group(&interface->dev.kobj, | ||
| 2237 | &imon_rf_attribute_group); | ||
| 2238 | if (sysfs_err) | ||
| 2239 | err("%s: Could not create RF sysfs entries(%d)", | ||
| 2240 | __func__, sysfs_err); | ||
| 2241 | } | ||
| 2242 | |||
| 2236 | if (ictx->display_supported) | 2243 | if (ictx->display_supported) |
| 2237 | imon_init_display(ictx, interface); | 2244 | imon_init_display(ictx, interface); |
| 2238 | } | 2245 | } |
