All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/3] HID: extend autodetect to handle I2C sensors as well
@ 2013-02-11 10:31 Mika Westerberg
  2013-02-11 10:31 ` [PATCH 2/3] HID: sensor-hub: get rid of unused sensor_hub_grabbed_usages[] table Mika Westerberg
                   ` (2 more replies)
  0 siblings, 3 replies; 24+ messages in thread
From: Mika Westerberg @ 2013-02-11 10:31 UTC (permalink / raw)
  To: linux-kernel
  Cc: Jiri Kosina, Benjamin Tissoires, linux-input,
	srinivas.pandruvada, Mika Westerberg

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>
---
 drivers/hid/hid-core.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c
index eb2ee11..fe3a59e 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;
 	}
 
-- 
1.7.10.4


^ permalink raw reply related	[flat|nested] 24+ messages in thread

end of thread, other threads:[~2013-02-25 12:43 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-02-11 10:31 [PATCH 1/3] HID: extend autodetect to handle I2C sensors as well Mika Westerberg
2013-02-11 10:31 ` [PATCH 2/3] HID: sensor-hub: get rid of unused sensor_hub_grabbed_usages[] table Mika Westerberg
2013-02-11 11:21   ` Benjamin Tissoires
2013-02-11 15:53   ` Pandruvada, Srinivas
2013-02-11 17:12     ` Benjamin Tissoires
2013-02-18  9:26     ` Jiri Kosina
2013-02-11 10:31 ` [PATCH 3/3] HID: sensor-hub: don't limit the driver only to USB bus Mika Westerberg
2013-02-11 11:22   ` Benjamin Tissoires
2013-02-18  9:28     ` Jiri Kosina
2013-02-11 15:54   ` Pandruvada, Srinivas
2013-02-12  9:12     ` Mika Westerberg
2013-02-18 11:03   ` Alexander Holler
2013-02-18 11:12     ` Mika Westerberg
2013-02-18 11:22       ` Alexander Holler
2013-02-18 11:33         ` Mika Westerberg
2013-02-18 11:37           ` Alexander Holler
2013-02-18 11:54             ` Mika Westerberg
2013-02-18 12:13               ` Alexander Holler
2013-02-19  9:22                 ` [PATCH] HID: make sensor autodetection independent of underlying bus Mika Westerberg
2013-02-21 10:42                   ` Benjamin Tissoires
2013-02-25 12:43                     ` Jiri Kosina
2013-02-21 10:34                 ` [PATCH 3/3] HID: sensor-hub: don't limit the driver only to USB bus Benjamin Tissoires
2013-02-21 10:52                   ` Alexander Holler
2013-02-11 11:20 ` [PATCH 1/3] HID: extend autodetect to handle I2C sensors as well Benjamin Tissoires

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.