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 <luisf@croxel.com>
This commit is contained in:
Luis Ubieda 2025-04-15 12:36:29 -04:00 committed by Benjamin Cabé
commit 1d4d7422b0
2 changed files with 31 additions and 22 deletions

View file

@ -3,28 +3,7 @@
# Copyright (c) 2025 CogniPilot Foundation
# SPDX-License-Identifier: Apache-2.0
description: |
ICM45686 High-precision 6-axis motion tracking device
When setting the accel-pm, accel-range, accel-odr, gyro-pm, gyro-range,
gyro-odr properties in a .dts or .dtsi file you may include icm45686.h
and use the macros defined there.
Example:
#include <zephyr/dt-bindings/sensor/icm45686.h>
icm42688: icm45686@0 {
...
accel-pwr-mode = <ICM45686_DT_ACCEL_LN>;
accel-fs = <ICM45686_DT_ACCEL_FS_32>;
accel-odr = <ICM45686_DT_ACCEL_ODR_800>;
gyro-pwr-mode= <ICM45686_DT_GYRO_LN>;
gyro-fs = <ICM45686_DT_GYRO_FS_4000>;
gyro-odr = <ICM45686_DT_GYRO_ODR_800>;
};
compatible: "invensense,icm45686"
include: [sensor-device.yaml, spi-device.yaml]
include: sensor-device.yaml
properties:
int-gpios:

View file

@ -0,0 +1,30 @@
# Copyright (c) 2025 Croxel Inc.
# SPDX-License-Identifier: Apache-2.0
description: |
ICM45686 High-precision 6-axis motion tracking device
When setting the accel-pm, accel-range, accel-odr, gyro-pm, gyro-range,
gyro-odr properties in a .dts or .dtsi file you may include icm45686.h
and use the macros defined there.
Example:
#include <zephyr/dt-bindings/sensor/icm45686.h>
&spi0 {
...
icm42688: icm45686@0 {
...
accel-pwr-mode = <ICM45686_DT_ACCEL_LN>;
accel-fs = <ICM45686_DT_ACCEL_FS_32>;
accel-odr = <ICM45686_DT_ACCEL_ODR_800>;
gyro-pwr-mode= <ICM45686_DT_GYRO_LN>;
gyro-fs = <ICM45686_DT_GYRO_FS_4000>;
gyro-odr = <ICM45686_DT_GYRO_ODR_800>;
};
};
compatible: "invensense,icm45686"
include: ["spi-device.yaml", "invensense,icm45686-common.yaml"]