Skip to content

Commit 974e6f0

Browse files
Enric Balletbo i Serrajic23
authored andcommitted
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: Gwendal Grignou <[email protected]> Signed-off-by: Guenter Roeck <[email protected]> [eballetbo: split, squash and rebase on top of mainline the patches found in ChromeOS tree] Signed-off-by: Enric Balletbo i Serra <[email protected]> Signed-off-by: Jonathan Cameron <[email protected]>
1 parent 1001354 commit 974e6f0

File tree

9 files changed

+767
-5
lines changed

9 files changed

+767
-5
lines changed
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
What: /sys/bus/iio/devices/iio:deviceX/calibrate
2+
Date: July 2015
3+
KernelVersion: 4.7
4+
5+
Description:
6+
Writing '1' will perform a FOC (Fast Online Calibration). The
7+
corresponding calibration offsets can be read from *_calibbias
8+
entries.
9+
10+
What: /sys/bus/iio/devices/iio:deviceX/location
11+
Date: July 2015
12+
KernelVersion: 4.7
13+
14+
Description:
15+
This attribute returns a string with the physical location where
16+
the motion sensor is placed. For example, in a laptop a motion
17+
sensor can be located on the base or on the lid. Current valid
18+
values are 'base' and 'lid'.

drivers/iio/common/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
# IIO common modules
33
#
44

5+
source "drivers/iio/common/cros_ec_sensors/Kconfig"
56
source "drivers/iio/common/hid-sensors/Kconfig"
67
source "drivers/iio/common/ms_sensors/Kconfig"
78
source "drivers/iio/common/ssp_sensors/Kconfig"

drivers/iio/common/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
#
88

99
# When adding new entries keep the list in alphabetical order
10+
obj-y += cros_ec_sensors/
1011
obj-y += hid-sensors/
1112
obj-y += ms_sensors/
1213
obj-y += ssp_sensors/
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#
2+
# Chrome OS Embedded Controller managed sensors library
3+
#
4+
config IIO_CROS_EC_SENSORS_CORE
5+
tristate "ChromeOS EC Sensors Core"
6+
depends on SYSFS && MFD_CROS_EC
7+
select IIO_BUFFER
8+
select IIO_TRIGGERED_BUFFER
9+
help
10+
Base module for the ChromeOS EC Sensors module.
11+
Contains core functions used by other IIO CrosEC sensor
12+
drivers.
13+
Define common attributes and sysfs interrupt handler.
14+
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#
2+
# Makefile for sensors seen through the ChromeOS EC sensor hub.
3+
#
4+
5+
obj-$(CONFIG_IIO_CROS_EC_SENSORS_CORE) += cros_ec_sensors_core.o

0 commit comments

Comments
 (0)