summaryrefslogtreecommitdiffstats
path: root/drivers/hid
diff options
context:
space:
mode:
authorMika Westerberg <mika.westerberg@linux.intel.com>2013-02-11 12:31:17 +0200
committerJiri Kosina <jkosina@suse.cz>2013-02-18 10:23:48 +0100
commitfa79f5ec534eaae59a7cb2ca208178f03f9b75ec (patch)
tree197d16f0363760a96bb7e9837c62ab239e1d601e /drivers/hid
parentcf5425bfcd6909f9831a00bc06ccb9a5b163766a (diff)
downloadlinux-fa79f5ec534eaae59a7cb2ca208178f03f9b75ec.tar.bz2
HID: extend autodetect to handle I2C sensors as well
Since the advent of HID over I2C protocol, it is possible to have sensor hubs behind I2C bus as well. We can autodetect this in a same way than USB sensor hubs. 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.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c
index eb2ee11b6412..fe3a59e2a5ba 100644
--- a/drivers/hid/hid-core.c
+++ b/drivers/hid/hid-core.c
@@ -729,7 +729,7 @@ static int hid_scan_report(struct hid_device *hid)
item.type == HID_ITEM_TYPE_MAIN &&
item.tag == HID_MAIN_ITEM_TAG_BEGIN_COLLECTION &&
(item_udata(&item) & 0xff) == HID_COLLECTION_PHYSICAL &&
- hid->bus == BUS_USB)
+ (hid->bus == BUS_USB || hid->bus == BUS_I2C))
hid->group = HID_GROUP_SENSOR_HUB;
}