]> git.baikalelectronics.ru Git - kernel.git/commit
HID: sensor: Custom and Generic sensor support
authorSrinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Fri, 10 Apr 2015 18:22:22 +0000 (11:22 -0700)
committerJiri Kosina <jkosina@suse.cz>
Fri, 10 Apr 2015 20:22:55 +0000 (22:22 +0200)
commit506e9fb23776a89e9ba11b98196957ebdbe8025c
tree587a0694e6db263f10290d3f3b4efc0619ca6469
parent83974920f6d3948db66f96d459293d726434f16e
HID: sensor: Custom and Generic sensor support

HID Sensor Spec defines two usage ids for custom sensors

HID_USAGE_SENSOR_TYPE_OTHER_CUSTOM (0x09, 0xE1)
HID_USAGE_SENSOR_TYPE_OTHER_GENERIC(0x09, 0xE2)

In addition the standard also defines usage ids for custom fields.
The purpose of these sensors is to extend the functionality or provide a way to
obfuscate the data being communicated by a sensor. Without knowing the mapping
between the data and its encapsulated form, it is difficult for an driver to
determine what data is being communicated by the sensor.  This allows some
differentiating use cases, where vendor can provide applications.  Since these
can't be represented by standard sensor interfaces like IIO, we present these
as fields with

- type (input/output)
- units
- min/max
- get/set value

In addition an dev interface to transfer report events. Details about this
interface is described in /Documentation/hid/hid-sensor.txt.  Manufacturers
should not use these ids for any standard sensors, otherwise the the
product/vendor id can be added to black list.

Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Reviewed-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
drivers/hid/Kconfig
drivers/hid/Makefile
drivers/hid/hid-sensor-custom.c [new file with mode: 0644]