diff options
author | Dawid Niedzwiecki <dn@semihalf.com> | 2021-04-27 10:53:36 +0200 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-04-29 08:19:21 +0000 |
commit | 2adbe4b949041fa54d35fc0f23866948d4c8d27d (patch) | |
tree | de97e82a9ff3380cfbdeb93d095f6359abce2b65 /zephyr/shim/src/motionsense_sensors.c | |
parent | 49154e4cb9cfcb9aad9b927766f746a1a1e11a4d (diff) | |
download | chrome-ec-2adbe4b949041fa54d35fc0f23866948d4c8d27d.tar.gz |
zephyr: Add CBI SSFC support
Some boards support different motion sensors based on the CBI SSFC field
stored in EEPROM. The decision about which sensor is made in runtime
thus all drivers have to be built-in.
Define structure of the SSFC in the device tree("named-cbi-ssfc"),
that allows using generic driver instead of board-specific code as it
is done in CrosEC.
Every SSFC field value("named-cbi-ssfc-value") is associated with
an alternative sensor(or sensors) which will be used (instead of the one
pointed by 'alternative-for' property) if the value in
EEPROM matches.
BUG=b:183990188
BRANCH=none
TEST=Add alternative motion sensors to the device tree, modify CBI SSFC
with 'cbi set 8 value 4', reboot EC and verify that the new sensors are
used with the 'accelinfo' command.
Signed-off-by: Dawid Niedzwiecki <dn@semihalf.com>
Change-Id: I3b5f3c171005885d96b1fdf14e844aaf862b6818
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2851896
Reviewed-by: Yuval Peress <peress@chromium.org>
Reviewed-by: Keith Short <keithshort@chromium.org>
Diffstat (limited to 'zephyr/shim/src/motionsense_sensors.c')
-rw-r--r-- | zephyr/shim/src/motionsense_sensors.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/zephyr/shim/src/motionsense_sensors.c b/zephyr/shim/src/motionsense_sensors.c index bac92e58e8..329c7a4cbe 100644 --- a/zephyr/shim/src/motionsense_sensors.c +++ b/zephyr/shim/src/motionsense_sensors.c @@ -296,7 +296,7 @@ struct motion_sensor_t motion_sensors[] = { * The list of alternate motion sensors that may be used at runtime to replace * an entry in the motion_sensors array. */ -__maybe_unused static struct motion_sensor_t motion_sensors_alt[] = { +__maybe_unused struct motion_sensor_t motion_sensors_alt[] = { #if DT_NODE_EXISTS(SENSOR_ALT_NODE) #include "motionsense_driver/sensor_drv_list.inc" #endif |