Re: [PATCH 2/6] usbhid: move all quirk handling code and data to usb-quirks.[ch]

2007-04-16 Thread Paul Walmsley
On Mon, 16 Apr 2007, Jiri Kosina wrote: actually, this seems wrong to me. In case of Wacom or IOWarrior devices, we want the usb_hid_configure() to return immediately, without claiming the device (and propagate -ENODEV through hid_probe()). That's what the original code does, and that is corre

Re: [PATCH 0/7] usbhid: quirks cleanup, add dynamic quirks, ConfigFS interface

2007-04-12 Thread Paul Walmsley
On Thu, 12 Apr 2007, Jiri Kosina wrote: On Thu, 12 Apr 2007, Paul Walmsley wrote: Now, another implementation approach would be to get rid of the quirk type names entirely, to use a path such as: /usbhid/quirks_runtime/: with the last component being a r/w configfs attribute containing the

Re: [PATCH 0/7] usbhid: quirks cleanup, add dynamic quirks, ConfigFS interface

2007-04-12 Thread Paul Walmsley
On Thu, 12 Apr 2007, Jiri Kosina wrote: On Wed, 11 Apr 2007, Paul Walmsley wrote: You're talking about using another static struct hid_blacklist array in place of the struct hid_quirk_types array, right? no, in fact I was just thinking about extending the hid_blacklist[] with addit

[PATCH 5/6] usbhid: add 'quirks' module parameter

2007-04-11 Thread Paul Walmsley
From: Paul Walmsley <[EMAIL PROTECTED]> Add a 'quirks' module parameter for the usbhid module, so users can add or modify quirks at module load time. Signed-off-by: Paul Walmsley <[EMAIL PROTECTED]> --- Documentation/kernel-parameters.txt |8 ++ drivers

[PATCH 4/6 RESEND] usbhid: add support for dynamically-created quirks

2007-04-11 Thread Paul Walmsley
From: Paul Walmsley <[EMAIL PROTECTED]> Add internal support for dynamically-allocated HID quirks, "dquirks" (for "dynamic quirks"). Includes several functions to add/modify quirks from the list. This code is used by the next patch to implement quirk modification

patches 4 & 5 sent incorrectly

2007-04-11 Thread Paul Walmsley
so, stupid thinko here, sent the wrong patches for 4 and 5 of the previous set. Will resend those two. Sorry everyone, - Paul

[PATCH 6/6] usbhid: add configfs USB HID quirk configuration

2007-04-11 Thread Paul Walmsley
From: Paul Walmsley <[EMAIL PROTECTED]> Add support for runtime USB HID quirk configuration via ConfigFS, after the usbhid module has been loaded. Also included is support for dynamic quirk removal. Signed-off-by: Paul Walmsley <[EMAIL PROTECTED]> --- drivers/hid/us

[PATCH 5/6] usbhid: add 'quirks' module parameter

2007-04-11 Thread Paul Walmsley
From: Paul Walmsley <[EMAIL PROTECTED]> Add internal support for dynamically-allocated HID quirks, "dquirks" (for "dynamic quirks"). Includes several functions to add/modify quirks from the list. This code is used by the next patch to implement quirk modification upon

[PATCH 4/6] usbhid: add support for dynamically-created quirks

2007-04-11 Thread Paul Walmsley
From: Paul Walmsley <[EMAIL PROTECTED]> Add internal support for dynamically-allocated HID quirks, "dquirks" (for "dynamic quirks"). Includes several functions to add/modify quirks from the list. This code is used by the next patch to implement quirk modification upon

[PATCH 3/6] usbhid: clarify static quirk handling as 'squirks'

2007-04-11 Thread Paul Walmsley
From: Paul Walmsley <[EMAIL PROTECTED]> Rename existing quirks handling code that operates over a static array to "squirks" (short for static quirks) to differentiate it from the dynamically-allocated quirks that will be introduced in the next patch. Add an accessor function

[PATCH 2/6] usbhid: move all quirk handling code and data to usb-quirks.[ch]

2007-04-11 Thread Paul Walmsley
From: Paul Walmsley <[EMAIL PROTECTED]> Encapsulate quirk handling into its own files, hid-quirks.[ch]. Move the USB_VENDOR* and USB_DEVICE* defines and the hid_blacklist[] array there from hid-core.c. Add hid-quirks.c:usbhid_lookup_quirks() to return quirk information to hid-core.c. C

[PATCH 1/6] usbhid: create hid-quirks.h

2007-04-11 Thread Paul Walmsley
From: Paul Walmsley <[EMAIL PROTECTED]> Move the HID quirks #defines from hid.h into their own header file, hid-quirks.h. Signed-off-by: Paul Walmsley <[EMAIL PROTECTED]> --- drivers/hid/usbhid/hid-core.c |1 + drivers/hid/usbhid/hiddev.c |1 + include/linux/hid-quirks

[PATCH 0/6] usbhid: quirks cleanup, add dynamic quirks, ConfigFS interface

2007-04-11 Thread Paul Walmsley
Changes from the patchset I sent last night are: - rebased against current mm branch of hid.git - fixed whitespace - renamed 'equirks' to 'dquirks' - renamed struct hid_quirk_name to hid_quirk_type My application for this code is to switch quirks at runtime for a data acquisition device.

Re: [PATCH 0/7] usbhid: quirks cleanup, add dynamic quirks, ConfigFS interface

2007-04-11 Thread Paul Walmsley
On Wed, 11 Apr 2007, Jiri Kosina wrote: On Wed, 11 Apr 2007, Jiri Kosina wrote: - [7/7] I agree with using configfs. What is quite unfortunate is that adding a new quirk requires now another place that it is necessary to modify - forgetting to do it and keeping configfs values out-of-sync

Re: [PATCH 0/7] usbhid: quirks cleanup, add dynamic quirks, ConfigFS interface

2007-04-11 Thread Paul Walmsley
Hello Jiri, On Wed, 11 Apr 2007, Jiri Kosina wrote: I have a few rather simple notes to your patches. Thanks for the review - I've fixed all of the issues that you noted and rebased the patches against hid.git - will post them shortly. I made one other cosmetic change, 'equirks' is now 'dq

[PATCH 7/7] usbhid: add configfs USB HID quirk configuration

2007-04-10 Thread Paul Walmsley
From: Paul Walmsley <[EMAIL PROTECTED]> Add support for runtime USB HID quirk configuration via ConfigFS, after the usbhid module has been loaded. Also included is support for dynamic quirk removal. Signed-off-by: Paul Walmsley <[EMAIL PROTECTED]> --- drivers/usb/i

[PATCH 6/7] usbhid: add 'quirks' module parameter

2007-04-10 Thread Paul Walmsley
From: Paul Walmsley <[EMAIL PROTECTED]> Add a 'quirks' module parameter for the usbhid module, so users can add or modify quirks at module load time. Signed-off-by: Paul Walmsley <[EMAIL PROTECTED]> --- Documentation/kernel-parameters.txt |8 ++ driver

[PATCH 5/7] usbhid: add support for dynamically-created quirks

2007-04-10 Thread Paul Walmsley
From: Paul Walmsley <[EMAIL PROTECTED]> Add internal support for dynamically-allocated HID quirks, "equirks" (for "extra quirks"). Includes several functions to add/modify quirks from the list. This code is used by the next patch to implement quirk modification upon

[PATCH 3/7] usbhid: move all quirk handling code and data to usb-quirks.[ch]

2007-04-10 Thread Paul Walmsley
From: Paul Walmsley <[EMAIL PROTECTED]> Encapsulate quirk handling into its own files, hid-quirks.[ch]. Move the USB_VENDOR* and USB_DEVICE* defines and the hid_blacklist[] array there from hid-core.c. Add hid-quirks.c:usbhid_lookup_any_quirks() to return quirk information to hid-

[PATCH 4/7] usbhid: clarify static quirk handling as 'squirks'

2007-04-10 Thread Paul Walmsley
From: Paul Walmsley <[EMAIL PROTECTED]> Rename existing quirks handling code that operates over a static array to "squirks" (short for static quirks) to differentate it from the dynamically-allocated "extra" quirks that will be introduced in the next patch.

[PATCH 2/7] usbhid: consolidate USB_VENDOR*, USB_DEVICE* defines

2007-04-10 Thread Paul Walmsley
From: Paul Walmsley <[EMAIL PROTECTED]> Consolidate the USB_VENDOR* and USB_DEVICE* defines into one block. Signed-off-by: Paul Walmsley <[EMAIL PROTECTED]> --- drivers/usb/input/hid-core.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) Index: linux/drive

[PATCH 1/7] usbhid: create hid-quirks.h

2007-04-10 Thread Paul Walmsley
From: Paul Walmsley <[EMAIL PROTECTED]> Move the HID quirks #defines from hid.h into their own header file, hid-quirks.h. Signed-off-by: Paul Walmsley <[EMAIL PROTECTED]> --- drivers/usb/input/hid-core.c |1 + drivers/usb/input/hiddev.c |1 + include/linux/hid-quirk

[PATCH 0/7] usbhid: quirks cleanup, add dynamic quirks, ConfigFS interface

2007-04-10 Thread Paul Walmsley
Hello, As requested, I respun the runtime USB HID quirks patches that I posted a few weeks ago. My application for this code is to switch quirks at runtime for a data acquisition device. This device has at least two drivers written for it: one kernel module driver requiring HID_QUIRK_IGNOR

Re: [PATCH 0/7] usbhid: add load-time and run-time USB HID quirks configuration

2007-03-21 Thread Paul Walmsley
Hi Jiri, On Tue, 20 Mar 2007, Jiri Kosina wrote: What is your opinion on an alternative aproach - the hid_blacklist[] could stay intact, and the linked list in your patch will be used in a slightly different way - it will be used to define *exceptions* (which will be possible to be tuned in run

Re: [PATCH 0/7] usbhid: add load-time and run-time USB HID quirks configuration

2007-03-19 Thread Paul Walmsley
Hello Jiri, thanks for the review. On Mon, 19 Mar 2007, Jiri Kosina wrote: You can currently "force" HID_QUIRK_IGNORE for the device that has been already bound to usbhid driver through 'unbind' file in sysfs. This lets you to ask usbhid driver to release the device. So you can just have HID_Q

[PATCH 7/7] usbhid: add Kconfig option USBHID_PROC_FS

2007-03-18 Thread Paul Walmsley
From: Paul Walmsley <[EMAIL PROTECTED]> Add a Kconfig option USBHID_PROC_FS that controls the appearance of /proc/usbhid/device_quirks. Signed-off-by: Paul Walmsley <[EMAIL PROTECTED]> --- dev/drivers/usb/input/Kconfig | 26 ++ 1 file changed, 2

[PATCH 6/7] usbhid: add /proc/usbhid/device_quirks handler

2007-03-18 Thread Paul Walmsley
From: Paul Walmsley <[EMAIL PROTECTED]> Add a procfs file, /proc/usbhid/device_quirks. Reading this file returns a list of all currently active USB HID quirks. Writing a specially-formatted string (documented in the Kconfig option USBHID_PROC_FS text) will add, replace, or remove ex

[PATCH 5/7] usbhid: add hid_quirks modparam docs

2007-03-18 Thread Paul Walmsley
From: Paul Walmsley <[EMAIL PROTECTED]> Add basic documentation for the usbhid.hid_quirks module parameter. Signed-off-by: Paul Walmsley <[EMAIL PROTECTED]> --- dev/Documentation/kernel-parameters.txt |9 + 1 file changed, 9 insertions(+) Index: linux/dev/Document

[PATCH 4/7] usbhid: add hid_quirks module parameter

2007-03-18 Thread Paul Walmsley
From: Paul Walmsley <[EMAIL PROTECTED]> Add a new module parameter, usbhid.hid_quirks, which can be used to modify the HID quirks list. Signed-off-by: Paul Walmsley <[EMAIL PROTECTED]> --- dev/drivers/usb/input/hid-core.c | 131 +++ 1 file

[PATCH 3/7] usbhid: convert Wacom and Codemercs quirks to list entries

2007-03-18 Thread Paul Walmsley
From: Paul Walmsley <[EMAIL PROTECTED]> Convert the existing Wacom and Codemercs quirks from special-purpose code to quirks list entries with non-0x masks. Signed-off-by: Paul Walmsley <[EMAIL PROTECTED]> --- dev/drivers/usb/input/hid-core.c | 14 -- 1 fil

[PATCH 2/7] usbhid: convert hid_blacklist array into a list at loadtime

2007-03-18 Thread Paul Walmsley
From: Paul Walmsley <[EMAIL PROTECTED]> Convert the existing fixed-length hid_blacklist array to a list, initialized at module load-time. Add a idProductMask field to support quirks which match against multiple USB product IDs from the same vendor. Signed-off-by: Paul Walmsley &

[PATCH 1/7] usbhid: specify explicit size for hid_blacklist.quirks

2007-03-18 Thread Paul Walmsley
From: Paul Walmsley <[EMAIL PROTECTED]> Explicitly specify the size of the hid_blacklist quirks member, to guard against surprises on architectures where unsigned ints aren't 32 bits long. Signed-off-by: Paul Walmsley <[EMAIL PROTECTED]> --- dev/drivers/usb/input/hid-core.

[PATCH 0/7] usbhid: add load-time and run-time USB HID quirks configuration

2007-03-18 Thread Paul Walmsley
The USB HID quirk list ('hid_blacklist') is a compile-time fixed array in the current kernel. Any modifications require editing the module source and recompiling. Some distributions compile the usbhid code into the kernel, thus requiring that the entire kernel be rebuilt. For most HID devices,