diff options
author | Dawid Niedzwiecki <dn@semihalf.com> | 2021-04-27 13:21:30 +0200 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-04-27 17:49:57 +0000 |
commit | 2adede07783d40c6115a96f5f70dbf94ea9a2215 (patch) | |
tree | 66c6163380fde6658d694a8d05b9be050b8258a6 /zephyr/projects/trogdor/lazor | |
parent | bd9ce7f5fc9808894880ab5a8102f67d19015051 (diff) | |
download | chrome-ec-2adede07783d40c6115a96f5f70dbf94ea9a2215.tar.gz |
zephyr: lazor: Fix alt motion sensors
Move the alternative motion sensor to 'motionsense-sensor-alt' node,
which is used to create 'motion_sensors_alt' array and 'sensor_alt_id'
enum.
BUG=b:183990188
BRANCH=none
TEST=zmake testall
Signed-off-by: Dawid Niedzwiecki <dn@semihalf.com>
Change-Id: I9dff17c9efaa97d288a9ed6a18f5f633a85d85b8
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2853595
Reviewed-by: Yuval Peress <peress@chromium.org>
Commit-Queue: Yuval Peress <peress@chromium.org>
Diffstat (limited to 'zephyr/projects/trogdor/lazor')
-rw-r--r-- | zephyr/projects/trogdor/lazor/motionsense.dts | 54 |
1 files changed, 30 insertions, 24 deletions
diff --git a/zephyr/projects/trogdor/lazor/motionsense.dts b/zephyr/projects/trogdor/lazor/motionsense.dts index d8fc6123a8..51d8505078 100644 --- a/zephyr/projects/trogdor/lazor/motionsense.dts +++ b/zephyr/projects/trogdor/lazor/motionsense.dts @@ -109,17 +109,17 @@ }; }; - alt_lid_accel { - compatible = "cros-ec,kx022"; + base_accel: base-accel { + compatible = "cros-ec,bmi160-accel"; status = "okay"; - label = "Lid Accel"; + + label = "Base Accel"; active-mask = "SENSOR_ACTIVE_S0_S3_S5"; - location = "MOTIONSENSE_LOC_LID"; - mutex = <&lid_mutex>; + location = "MOTIONSENSE_LOC_BASE"; + mutex = <&mutex_bmi160>; port = <&i2c_sensor>; - rot-standard-ref = <&lid_rot_ref>; - drv-data = <&kx022_data>; - alternate-for = <&lid_accel>; + rot-standard-ref = <&base_rot_ref>; + drv-data = <&bmi160_data>; configs { compatible = "cros-ec,motionsense-sensor-config"; @@ -134,17 +134,36 @@ }; }; - base_accel: base-accel { - compatible = "cros-ec,bmi160-accel"; + base-gyro { + compatible = "cros-ec,bmi160-gyro"; status = "okay"; - label = "Base Accel"; + label = "Base Gyro"; active-mask = "SENSOR_ACTIVE_S0_S3_S5"; location = "MOTIONSENSE_LOC_BASE"; mutex = <&mutex_bmi160>; port = <&i2c_sensor>; rot-standard-ref = <&base_rot_ref>; drv-data = <&bmi160_data>; + }; + }; + + /* + * List of alternative motion sensors that creates + * motion_sensors_alt array. + */ + motionsense-sensor-alt { + alt_lid_accel { + compatible = "cros-ec,kx022"; + status = "okay"; + label = "Lid Accel"; + active-mask = "SENSOR_ACTIVE_S0_S3_S5"; + location = "MOTIONSENSE_LOC_LID"; + mutex = <&lid_mutex>; + port = <&i2c_sensor>; + rot-standard-ref = <&lid_rot_ref>; + drv-data = <&kx022_data>; + alternate-for = <&lid_accel>; configs { compatible = "cros-ec,motionsense-sensor-config"; @@ -158,19 +177,6 @@ }; }; }; - - base-gyro { - compatible = "cros-ec,bmi160-gyro"; - status = "okay"; - - label = "Base Gyro"; - active-mask = "SENSOR_ACTIVE_S0_S3_S5"; - location = "MOTIONSENSE_LOC_BASE"; - mutex = <&mutex_bmi160>; - port = <&i2c_sensor>; - rot-standard-ref = <&base_rot_ref>; - drv-data = <&bmi160_data>; - }; }; motionsense-sensor-info { |