Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 974e6f02 authored by Enric Balletbo i Serra's avatar Enric Balletbo i Serra Committed by Jonathan Cameron
Browse files

iio: cros_ec_sensors_core: Add common functions for the ChromeOS EC Sensor Hub.



Add the core functions to be able to support the sensors attached behind
the ChromeOS Embedded Controller and used by other IIO cros-ec sensor
drivers.

The cros_ec_sensor_core driver matches with current driver in ChromeOS
4.4 tree, so it includes all the fixes at the moment. The support for
this driver was made by Gwendal Grignou. The original patch and all the
fixes has been squashed and rebased on top of mainline.

Signed-off-by: default avatarGwendal Grignou <gwendal@chromium.org>
Signed-off-by: default avatarGuenter Roeck <groeck@chromium.org>
[eballetbo: split, squash and rebase on top of mainline the patches
found in ChromeOS tree]
Signed-off-by: default avatarEnric Balletbo i Serra <enric.balletbo@collabora.com>
Signed-off-by: default avatarJonathan Cameron <jic23@kernel.org>
parent 1001354c
Loading
Loading
Loading
Loading
+18 −0
Original line number Diff line number Diff line
What:		/sys/bus/iio/devices/iio:deviceX/calibrate
Date:		July 2015
KernelVersion:	4.7
Contact:	linux-iio@vger.kernel.org
Description:
		Writing '1' will perform a FOC (Fast Online Calibration). The
                corresponding calibration offsets can be read from *_calibbias
                entries.

What:		/sys/bus/iio/devices/iio:deviceX/location
Date:		July 2015
KernelVersion:	4.7
Contact:	linux-iio@vger.kernel.org
Description:
		This attribute returns a string with the physical location where
                the motion sensor is placed. For example, in a laptop a motion
                sensor can be located on the base or on the lid. Current valid
		values are 'base' and 'lid'.
+1 −0
Original line number Diff line number Diff line
@@ -2,6 +2,7 @@
# IIO common modules
#

source "drivers/iio/common/cros_ec_sensors/Kconfig"
source "drivers/iio/common/hid-sensors/Kconfig"
source "drivers/iio/common/ms_sensors/Kconfig"
source "drivers/iio/common/ssp_sensors/Kconfig"
+1 −0
Original line number Diff line number Diff line
@@ -7,6 +7,7 @@
#

# When adding new entries keep the list in alphabetical order
obj-y += cros_ec_sensors/
obj-y += hid-sensors/
obj-y += ms_sensors/
obj-y += ssp_sensors/
+14 −0
Original line number Diff line number Diff line
#
# Chrome OS Embedded Controller managed sensors library
#
config IIO_CROS_EC_SENSORS_CORE
	tristate "ChromeOS EC Sensors Core"
	depends on SYSFS && MFD_CROS_EC
	select IIO_BUFFER
	select IIO_TRIGGERED_BUFFER
	help
	  Base module for the ChromeOS EC Sensors module.
	  Contains core functions used by other IIO CrosEC sensor
	  drivers.
	  Define common attributes and sysfs interrupt handler.
+5 −0
Original line number Diff line number Diff line
#
# Makefile for sensors seen through the ChromeOS EC sensor hub.
#

obj-$(CONFIG_IIO_CROS_EC_SENSORS_CORE) += cros_ec_sensors_core.o
Loading