]> git.baikalelectronics.ru Git - kernel.git/commit
HID: hid-sensor-custom: Add custom sensor iio support
authorYe Xiang <xiang.ye@intel.com>
Tue, 15 Dec 2020 05:44:42 +0000 (13:44 +0800)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Fri, 22 Jan 2021 08:52:02 +0000 (08:52 +0000)
commita1772498e288a7475a5f93fda985767e73560286
tree3d27444f0c1e3b52ebf66a6f292931650845a8d2
parentb9a0167268c1959a74e725bc5c0abe9031da79ea
HID: hid-sensor-custom: Add custom sensor iio support

Currently custom sensors properties are not decoded and it is up to
user space to interpret.

Some manufacturers already standardized the meaning of some custom sensors.
They can be presented as a proper IIO sensor. We can identify these sensors
based on manufacturer and serial number property in the report.

This change is identifying hinge sensor when the manufacturer is "INTEL".
This creates a platform device so that a sensor driver can be loaded to
process these sensors.

Signed-off-by: Ye Xiang <xiang.ye@intel.com>
Acked-by: Jiri Kosina <jkosina@suse.cz>
Link: https://lore.kernel.org/r/20201215054444.9324-2-xiang.ye@intel.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/hid/hid-sensor-custom.c
include/linux/hid-sensor-ids.h