[PATCH v2 0/6] hid: Introduce device groups

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

 



Hi all,

Here is the second version of the extension to the device-driver
matching mechanism. The previous version did not work well with
out-of-tree drivers. The default group handling was backwards, so I
had better list the right behavior here for easier review. For
starters, drivers belong to one of these groups:

HID_GROUP_ANY - The default for all drivers. Matches any device.
HID_GROUP_GENERIC - The generic drivers. Matches generic devices only.
HID_GROUP_MULTITOUCH - The MT driver. Matches MT devices only.

A HID device is placed in one of the above groups during device
add. The logic is determined by the hid core. It does not matter to
userland which group a device belongs to, because all out-of-tree
drivers and all dynamic device ids belong to the default group, which
matches any device. The device groups only steer udev to the right
module, without loss of generality. In fact, switching drivers in
userland is simplified.

A known outstanding issue is the rebinding of a hid device to a driver
that affects the report parsing. I am currently testing a patchset for
it, which should go in before this one.  However, since it is largely
orthogonal, and it seems the present patchset does the right thing
with regards to everything else, I thought I'd give it another spin
first.

The patches apply to 3.4-rc3; final version will apply for next.

Enjoy,
Henrik

Henrik Rydberg (6):
  hid: Add device group to modalias
  hid: Parse the device before adding it
  hid: Create a generic device group
  hid: Allow bus wildcard matching
  hid-multitouch: Switch to device groups
  hid-multitouch: Remove remnant quirk handling

 drivers/hid/hid-core.c          |  130 ++++++++++++++-------------------------
 drivers/hid/hid-input.c         |   11 ----
 drivers/hid/hid-multitouch.c    |    3 +-
 drivers/hid/usbhid/hid-core.c   |    2 +-
 include/linux/hid.h             |   20 +++---
 include/linux/mod_devicetable.h |    4 +-
 net/bluetooth/hidp/core.c       |    2 +-
 scripts/mod/file2alias.c        |    5 +-
 8 files changed, 71 insertions(+), 106 deletions(-)

-- 
1.7.10

--
To unsubscribe from this list: send the line "unsubscribe linux-input" 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 Devel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Linux Wireless Networking]     [Linux Omap]

  Powered by Linux