diff options
author | Mika Westerberg <mika.westerberg@linux.intel.com> | 2013-02-19 04:22:33 -0500 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2013-02-25 07:42:36 -0500 |
commit | 6399f335c2c5fb9c244bbb2b8a437498d260bed7 (patch) | |
tree | 947f73b142fb531e05af7b9af8cfa81a20c19cf4 /drivers/hid | |
parent | 545bef681088cbf49c9c11d63872698b81eac7eb (diff) |
HID: make sensor autodetection independent of underlying bus
Instead of limiting HID sensors to USB and I2C busses we can just make
everything that has usage page of HID_UP_SENSOR to be included in
HID_GROUP_SENSOR_HUB group. This allows the sensor-hub to work over
bluetooth (and other transports) as well.
Reported-by: Alexander Holler <holler@ahsoftware.de>
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Reviewed-By: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'drivers/hid')
-rw-r--r-- | drivers/hid/hid-core.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c index ff75cabf7393..fea20c650f3f 100644 --- a/drivers/hid/hid-core.c +++ b/drivers/hid/hid-core.c | |||
@@ -728,8 +728,7 @@ static int hid_scan_report(struct hid_device *hid) | |||
728 | } else if (page == HID_UP_SENSOR && | 728 | } else if (page == HID_UP_SENSOR && |
729 | item.type == HID_ITEM_TYPE_MAIN && | 729 | item.type == HID_ITEM_TYPE_MAIN && |
730 | item.tag == HID_MAIN_ITEM_TAG_BEGIN_COLLECTION && | 730 | item.tag == HID_MAIN_ITEM_TAG_BEGIN_COLLECTION && |
731 | (item_udata(&item) & 0xff) == HID_COLLECTION_PHYSICAL && | 731 | (item_udata(&item) & 0xff) == HID_COLLECTION_PHYSICAL) |
732 | (hid->bus == BUS_USB || hid->bus == BUS_I2C)) | ||
733 | hid->group = HID_GROUP_SENSOR_HUB; | 732 | hid->group = HID_GROUP_SENSOR_HUB; |
734 | } | 733 | } |
735 | 734 | ||