You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
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>
This commit is contained in:
committed by
Jiri Kosina
parent
62fad137bb
commit
4a7de0519d
@@ -885,6 +885,21 @@ config HID_SENSOR_HUB
|
||||
for events and handle data streams. Each sensor driver can format
|
||||
data and present to user mode using input or IIO interface.
|
||||
|
||||
config HID_SENSOR_CUSTOM_SENSOR
|
||||
tristate "HID Sensors hub custom sensor support"
|
||||
depends on HID_SENSOR_HUB
|
||||
default n
|
||||
---help---
|
||||
HID Sensor hub specification allows definition of some custom and
|
||||
generic sensors. Unlike other HID sensors, they can't be exported
|
||||
via Linux IIO because of custom fields. This is up to the manufacturer
|
||||
to decide how to interpret these special sensor ids and process in
|
||||
the user space. Currently some manufacturers are using these ids for
|
||||
sensor calibration and debugging other sensors. Manufacturers
|
||||
should't use these special custom sensor ids to export any of the
|
||||
standard sensors.
|
||||
Select this config option for custom/generic sensor support.
|
||||
|
||||
endmenu
|
||||
|
||||
endif # HID
|
||||
|
||||
@@ -101,6 +101,7 @@ obj-$(CONFIG_HID_WACOM) += wacom.o
|
||||
obj-$(CONFIG_HID_WALTOP) += hid-waltop.o
|
||||
obj-$(CONFIG_HID_WIIMOTE) += hid-wiimote.o
|
||||
obj-$(CONFIG_HID_SENSOR_HUB) += hid-sensor-hub.o
|
||||
obj-$(CONFIG_HID_SENSOR_CUSTOM_SENSOR) += hid-sensor-custom.o
|
||||
|
||||
obj-$(CONFIG_USB_HID) += usbhid/
|
||||
obj-$(CONFIG_USB_MOUSE) += usbhid/
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user