]> asedeno.scripts.mit.edu Git - linux.git/commit
HID: hid-sensor-hub: fix attribute read for logical usage id
authorSrinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Thu, 26 Feb 2015 02:56:27 +0000 (18:56 -0800)
committerJiri Kosina <jkosina@suse.cz>
Mon, 16 Mar 2015 15:21:18 +0000 (16:21 +0100)
commiteb96483349e946f10d41c2a5674922e1d86603d9
tree8f16a4f5150241d83a68958a05a0c05611a9fe6b
parent3950e03389cfc8ee9d7131074d999b5fb6bbc2bf
HID: hid-sensor-hub: fix attribute read for logical usage id

For defining enumeration values like report or power status events, the
enumeration usage ids are enclosed in a logical collection.  In this case we
need to match logical usage id for pending read on this usage id. For example,
in the below field, when read is requested for 0319, the report will
contain one of the status usages like 850, 851 etc. In this case the raw
event will not match 0319. So when logical collection matches, then wake
up the pending thread.

      Physical(Sensor.OtherCustom)
      Logical(Sensor.0319)
      Application(Sensor.Sensor)
      Usage(6)
        Sensor.0850
        Sensor.0851
        Sensor.0852
        Sensor.0853
        Sensor.0854
        Sensor.0855
      Logical Minimum(1)
      Logical Maximum(5)
      Report Size(8)
      Report Count(1)
      Report Offset(24)
      Flags( Array Absolute )

Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
drivers/hid/hid-sensor-hub.c