Re: [rfc]your patch to deal with devices that need continous data traffic

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

 



On Thu, Sep 04, 2014 at 12:44:37PM +0200, Oliver Neukum wrote:
> Hi,
> 
> I also got a problem with such a device and I took your patch
> and applied it to this device. What do you think? The only
> substantial change I made was not counting unrequested input
> for autosuspend.

Ah, good to know there are more devices that need this quirk.

I got side-tracked with other stuff, but I should be able to submit the
patch this week (just want to look through it once more first).

Not sure the mark-last-busy needs to be moved, though. The device has
already been woken up, and might as well stay unsuspended for a while
longer should further events occur.

> From 7babd79010390e9bee19cf2ac2a0f374a59b1bed Mon Sep 17 00:00:00 2001
> From: Oliver Neukum <oneukum@xxxxxxx>
> Date: Wed, 3 Sep 2014 15:26:39 +0200
> Subject: [PATCH] usbhid: Johan's patch for devices that need constant polling
> 
> Some devices need constant polling or they crash.
> So move the start of IO from open() to start()
> 
> Signed-off-by: Oliver Neukum <oneukum@xxxxxxx>
> ---
>  drivers/hid/hid-ids.h           |  1 +
>  drivers/hid/usbhid/hid-core.c   | 31 +++++++++++++++++++++++++++----
>  drivers/hid/usbhid/hid-quirks.c |  1 +
>  3 files changed, 29 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h
> index 25cd674..b303a62 100644
> --- a/drivers/hid/hid-ids.h
> +++ b/drivers/hid/hid-ids.h
> @@ -733,6 +733,7 @@
>  #define USB_DEVICE_ID_PI_ENGINEERING_VEC_USB_FOOTPEDAL	0xff
>  
>  #define USB_VENDOR_ID_PIXART				0x093a
> +#define USB_DEVICE_ID_PIXART_USB_OPTICAL_MOUSE		0x2510
>  #define USB_DEVICE_ID_PIXART_OPTICAL_TOUCH_SCREEN	0x8001
>  #define USB_DEVICE_ID_PIXART_OPTICAL_TOUCH_SCREEN1	0x8002
>  #define USB_DEVICE_ID_PIXART_OPTICAL_TOUCH_SCREEN2	0x8003

<snip>

> diff --git a/drivers/hid/usbhid/hid-quirks.c b/drivers/hid/usbhid/hid-quirks.c
> index 15225f3..8a8c667 100644
> --- a/drivers/hid/usbhid/hid-quirks.c
> +++ b/drivers/hid/usbhid/hid-quirks.c
> @@ -79,6 +79,7 @@ static const struct hid_blacklist {
>  	{ USB_VENDOR_ID_NOVATEK, USB_DEVICE_ID_NOVATEK_MOUSE, HID_QUIRK_NO_INIT_REPORTS },
>  	{ USB_VENDOR_ID_PENMOUNT, USB_DEVICE_ID_PENMOUNT_1610, HID_QUIRK_NOGET },
>  	{ USB_VENDOR_ID_PENMOUNT, USB_DEVICE_ID_PENMOUNT_1640, HID_QUIRK_NOGET },
> +	{ USB_VENDOR_ID_PIXART, USB_DEVICE_ID_PIXART_OPTICAL_TOUCH_SCREEN, HID_QUIRK_ALWAYS_POLL },

You'd want to use USB_DEVICE_ID_PIXART_USB_OPTICAL_MOUSE here, or?

>  	{ USB_VENDOR_ID_PIXART, USB_DEVICE_ID_PIXART_OPTICAL_TOUCH_SCREEN, HID_QUIRK_NO_INIT_REPORTS },
>  	{ USB_VENDOR_ID_PIXART, USB_DEVICE_ID_PIXART_OPTICAL_TOUCH_SCREEN1, HID_QUIRK_NO_INIT_REPORTS },
>  	{ USB_VENDOR_ID_PIXART, USB_DEVICE_ID_PIXART_OPTICAL_TOUCH_SCREEN2, HID_QUIRK_NO_INIT_REPORTS },

Thanks,
Johan
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




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

  Powered by Linux