Skip to content

Commit 1d4d742

Browse files
ubiedakartben
authored andcommitted
sensor: icm45686: Refactor DTS bindings to unify common properties
To split bus support into separate files. This patch does not introduce any functionality, but rather precedes a patch introducing I2C bus support. Signed-off-by: Luis Ubieda <[email protected]>
1 parent 3b29b9f commit 1d4d742

File tree

2 files changed

+31
-22
lines changed

2 files changed

+31
-22
lines changed

dts/bindings/sensor/invensense,icm45686.yaml renamed to dts/bindings/sensor/invensense,icm45686-common.yaml

Lines changed: 1 addition & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -3,28 +3,7 @@
33
# Copyright (c) 2025 CogniPilot Foundation
44
# SPDX-License-Identifier: Apache-2.0
55

6-
description: |
7-
ICM45686 High-precision 6-axis motion tracking device
8-
When setting the accel-pm, accel-range, accel-odr, gyro-pm, gyro-range,
9-
gyro-odr properties in a .dts or .dtsi file you may include icm45686.h
10-
and use the macros defined there.
11-
12-
Example:
13-
#include <zephyr/dt-bindings/sensor/icm45686.h>
14-
15-
icm42688: icm45686@0 {
16-
...
17-
18-
accel-pwr-mode = <ICM45686_DT_ACCEL_LN>;
19-
accel-fs = <ICM45686_DT_ACCEL_FS_32>;
20-
accel-odr = <ICM45686_DT_ACCEL_ODR_800>;
21-
gyro-pwr-mode= <ICM45686_DT_GYRO_LN>;
22-
gyro-fs = <ICM45686_DT_GYRO_FS_4000>;
23-
gyro-odr = <ICM45686_DT_GYRO_ODR_800>;
24-
};
25-
26-
compatible: "invensense,icm45686"
27-
include: [sensor-device.yaml, spi-device.yaml]
6+
include: sensor-device.yaml
287

298
properties:
309
int-gpios:
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# Copyright (c) 2025 Croxel Inc.
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
description: |
5+
ICM45686 High-precision 6-axis motion tracking device
6+
When setting the accel-pm, accel-range, accel-odr, gyro-pm, gyro-range,
7+
gyro-odr properties in a .dts or .dtsi file you may include icm45686.h
8+
and use the macros defined there.
9+
10+
Example:
11+
#include <zephyr/dt-bindings/sensor/icm45686.h>
12+
13+
&spi0 {
14+
...
15+
16+
icm42688: icm45686@0 {
17+
...
18+
19+
accel-pwr-mode = <ICM45686_DT_ACCEL_LN>;
20+
accel-fs = <ICM45686_DT_ACCEL_FS_32>;
21+
accel-odr = <ICM45686_DT_ACCEL_ODR_800>;
22+
gyro-pwr-mode= <ICM45686_DT_GYRO_LN>;
23+
gyro-fs = <ICM45686_DT_GYRO_FS_4000>;
24+
gyro-odr = <ICM45686_DT_GYRO_ODR_800>;
25+
};
26+
};
27+
28+
compatible: "invensense,icm45686"
29+
30+
include: ["spi-device.yaml", "invensense,icm45686-common.yaml"]

0 commit comments

Comments
 (0)