From e4288acd27e4d871c3ac11797bb34c4f11bb806c Mon Sep 17 00:00:00 2001 From: Marcin Niestroj Date: Wed, 10 May 2023 10:52:48 +0200 Subject: [PATCH] dts: bindings: st,lsm6dsl: unify I2C and SPI bindings Use the same wording in description for both I2C and SPI variants to improve consistency. Create st,lsm6dsl-common.yaml to include common binding properties from I2C and SPI variants. Signed-off-by: Marcin Niestroj --- dts/bindings/sensor/st,lsm6dsl-common.yaml | 10 ++++++++++ dts/bindings/sensor/st,lsm6dsl-i2c.yaml | 11 ++++------- dts/bindings/sensor/st,lsm6dsl-spi.yaml | 11 +++-------- 3 files changed, 17 insertions(+), 15 deletions(-) create mode 100644 dts/bindings/sensor/st,lsm6dsl-common.yaml diff --git a/dts/bindings/sensor/st,lsm6dsl-common.yaml b/dts/bindings/sensor/st,lsm6dsl-common.yaml new file mode 100644 index 00000000000..2e37c7ac207 --- /dev/null +++ b/dts/bindings/sensor/st,lsm6dsl-common.yaml @@ -0,0 +1,10 @@ +# Copyright (c) 2017, Linaro Limited +# Copyright (c) 2023, Marcin Niestroj +# SPDX-License-Identifier: Apache-2.0 + +include: sensor-device.yaml + +properties: + irq-gpios: + # This signal is active high when produced by the sensor + type: phandle-array diff --git a/dts/bindings/sensor/st,lsm6dsl-i2c.yaml b/dts/bindings/sensor/st,lsm6dsl-i2c.yaml index cd99c27c8d9..e1deed569ca 100644 --- a/dts/bindings/sensor/st,lsm6dsl-i2c.yaml +++ b/dts/bindings/sensor/st,lsm6dsl-i2c.yaml @@ -1,13 +1,10 @@ # Copyright (c) 2017, Linaro Limited # SPDX-License-Identifier: Apache-2.0 -description: STMicroelectronics LSM6DSL 6-axis accelerometer and gyrometer +description: | + STMicroelectronics LSM6DSL 6-axis accelerometer and gyrometer accessed through + I2C bus compatible: "st,lsm6dsl" -include: [sensor-device.yaml, i2c-device.yaml] - -properties: - irq-gpios: - # This signal is active high when produced by the sensor - type: phandle-array +include: ["i2c-device.yaml", "st,lsm6dsl-common.yaml"] diff --git a/dts/bindings/sensor/st,lsm6dsl-spi.yaml b/dts/bindings/sensor/st,lsm6dsl-spi.yaml index 08695559fe9..4e4c9803f14 100644 --- a/dts/bindings/sensor/st,lsm6dsl-spi.yaml +++ b/dts/bindings/sensor/st,lsm6dsl-spi.yaml @@ -2,14 +2,9 @@ # SPDX-License-Identifier: Apache-2.0 description: | - STMicroelectronics LSM6DSL 6-axis accelerometer and gyrometer accessed - through SPI bus + STMicroelectronics LSM6DSL 6-axis accelerometer and gyrometer accessed through + SPI bus compatible: "st,lsm6dsl" -include: [sensor-device.yaml, spi-device.yaml] - -properties: - irq-gpios: - # This signal is active high when produced by the sensor - type: phandle-array +include: ["spi-device.yaml", "st,lsm6dsl-common.yaml"]