]> git.baikalelectronics.ru Git - kernel.git/commit
iio: hid-sensors: Fix power and report state
authorSrinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Wed, 27 Nov 2013 22:19:00 +0000 (22:19 +0000)
committerJonathan Cameron <jic23@kernel.org>
Mon, 2 Dec 2013 21:05:32 +0000 (21:05 +0000)
commit8b1ec8cbef3d8a5ba77e9eae01b1154bbca0adf5
treecd586d7db56efdc9d4ef8d5dee1f008a137f354e
parent283a244cc55435467c7a4f68cfe5707297f2db0a
iio: hid-sensors: Fix power and report state

In the original HID sensor hub firmwares all Named array enums were
to 0-based. But the most recent hub implemented as 1-based,
because of the implementation by one of the major OS vendor.
Using logical minimum for the field as the base of enum. So we add
logical minimum to the selector values before setting those fields.
Some sensor hub FWs already changed logical minimum from 0 to 1
to reflect this and hope every other vendor will follow.
There is no easy way to add a common HID quirk for NAry elements,
even if the standard specifies these field as NAry, the collection
used to describe selectors is still just "logical".

Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
drivers/iio/common/hid-sensors/Kconfig
drivers/iio/common/hid-sensors/hid-sensor-trigger.c
include/linux/hid-sensor-ids.h