ODROID: Added options the ignoring the Vu7 id.

- Ignoring Vu7 vid and pid when using other touch screen.
- Added disable_vu7 options to boot.ini when using other touch screen.

Change-Id: I99d3ed0767436dc3c3151e4b6fe9e045c2a73b8d
This commit is contained in:
Luke Go
2016-12-07 14:27:21 +09:00
committed by Chris KIM
parent d5e347c427
commit 019a3a4d77
2 changed files with 31 additions and 1 deletions

View File

@@ -2504,7 +2504,6 @@ static const struct hid_device_id hid_ignore_list[] = {
#endif
{ HID_USB_DEVICE(USB_VENDOR_ID_YEALINK, USB_DEVICE_ID_YEALINK_P1K_P4K_B2K) },
{ HID_USB_DEVICE(USB_VENDOR_ID_DWAV, USB_DEVICE_ID_DWAV_MULTITOUCH) },
{ HID_USB_DEVICE(USB_VENDOR_ID_ODROID, USB_DEVICE_ID_VU5) },
{ HID_USB_DEVICE(USB_VENDOR_ID_ODROID, USB_DEVICE_ID_VU7PLUS) },
{ }

View File

@@ -412,6 +412,33 @@ static int dwav_usb_mt_init(struct dwav_usb_mt *dwav_usb_mt, void *dev)
return 0;
}
static bool disable_vu7;
/*-------------------------------------------------------------------------*/
static int __init dwav_usb_mt_boot_para_setup(char *s)
{
disable_vu7 = false;
if (!strncmp(s, "true", 4))
disable_vu7 = true;
else if (!strncmp(s, "false", 5))
disable_vu7 = false;
else {
pr_err("%s - wrong disable_vu7 parameter", __func__);
disable_vu7 = true;
}
return 0;
}
__setup("disable_vu7=", dwav_usb_mt_boot_para_setup);
/*-------------------------------------------------------------------------*/
static bool dwav_usb_mt_ignore(const struct usb_device_id *id)
{
if (disable_vu7 && id->driver_info == ODROID_VU7)
return true;
else
return false;
}
/*-------------------------------------------------------------------------*/
static int dwav_usb_mt_probe(struct usb_interface *intf,
const struct usb_device_id *id)
@@ -423,6 +450,10 @@ static int dwav_usb_mt_probe(struct usb_interface *intf,
int err = 0;
/* ignore the vu7 id when using other device */
if (dwav_usb_mt_ignore(id))
return -ENODEV;
endpoint = dwav_usb_mt_get_input_endpoint(intf->cur_altsetting);
if (!endpoint)
return -ENXIO;