platform/chrome: Add cros_ec_accel_legacy driver
authorGwendal Grignou <gwendal@chromium.org>
Thu, 12 Oct 2017 17:33:23 +0000 (19:33 +0200)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Sat, 14 Oct 2017 19:34:01 +0000 (20:34 +0100)
commit11b86c7004ef14f9f8c1e2caf66bfaad6f3167a2
tree96523cdbbad6b3f1348b5f4ddedc2d2f778a5d5c
parentad7532cefd11d11a0814a75fb814c205ee3d9d4c
platform/chrome: Add cros_ec_accel_legacy driver

Add driver to support older EC firmware that only support deprecated
ec command. Rely on ACPI memory map register to access sensor
information.
Present same interface as the regular cros_ec sensor stack:
- one iio device per accelerometer
- use HTML5 axis definition
- use iio abi units
- accept calibration calls, but do nothing
Chrome can use the same code than regular cros_ec sensor stack to
calculate orientation and lid angle.

Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
Signed-off-by: Thierry Escande <thierry.escande@collabora.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Documentation/ABI/testing/sysfs-bus-iio-cros-ec
drivers/iio/accel/Kconfig
drivers/iio/accel/Makefile
drivers/iio/accel/cros_ec_accel_legacy.c [new file with mode: 0644]