Skip to content

Commit

Permalink
sensor: lsm6dsl: Update DTS support
Browse files Browse the repository at this point in the history
Now that we can support the same compatible but different bus types,
update the LSM6DSL support to utilize the same compatible for either I2C
or SPI.  We rename the i2c binding file to st,lsm6dsl-i2c.yaml just to
be a bit more clear.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
  • Loading branch information
galak committed Dec 7, 2018
1 parent 4d08522 commit 867c33e
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion boards/arm/96b_argonkey/96b_argonkey.dts
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@

/* ST Microelectronics LSM6DSL accel/gyro sensor */
lsm6dsl@1 {
compatible = "st,lsm6dsl-spi";
compatible = "st,lsm6dsl";
reg = <1>;
spi-max-frequency = <1000000>;
irq-gpios = <&gpiob 1 0>;
Expand Down
12 changes: 6 additions & 6 deletions boards/arm/96b_argonkey/dts_fixup.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@
#define DT_VL53L0X_I2C_ADDR DT_ST_STM32_I2C_V1_40005800_ST_VL53L0X_29_BASE_ADDRESS
#define DT_VL53L0X_I2C_MASTER_DEV_NAME DT_ST_STM32_I2C_V1_40005800_ST_VL53L0X_29_BUS_NAME

#define DT_LSM6DSL_DEV_NAME DT_ST_STM32_SPI_40003800_ST_LSM6DSL_SPI_1_LABEL
#define DT_LSM6DSL_SPI_SELECT_SLAVE DT_ST_STM32_SPI_40003800_ST_LSM6DSL_SPI_1_BASE_ADDRESS
#define DT_LSM6DSL_SPI_MASTER_DEV_NAME DT_ST_STM32_SPI_40003800_ST_LSM6DSL_SPI_1_BUS_NAME
#define DT_LSM6DSL_SPI_BUS_FREQ DT_ST_STM32_SPI_40003800_ST_LSM6DSL_SPI_1_SPI_MAX_FREQUENCY
#define DT_LSM6DSL_GPIO_DEV_NAME DT_ST_STM32_SPI_40003800_ST_LSM6DSL_SPI_1_IRQ_GPIOS_CONTROLLER
#define DT_LSM6DSL_GPIO_PIN_NUM DT_ST_STM32_SPI_40003800_ST_LSM6DSL_SPI_1_IRQ_GPIOS_PIN
#define DT_LSM6DSL_DEV_NAME DT_ST_STM32_SPI_40003800_ST_LSM6DSL_1_LABEL
#define DT_LSM6DSL_SPI_SELECT_SLAVE DT_ST_STM32_SPI_40003800_ST_LSM6DSL_1_BASE_ADDRESS
#define DT_LSM6DSL_SPI_MASTER_DEV_NAME DT_ST_STM32_SPI_40003800_ST_LSM6DSL_1_BUS_NAME
#define DT_LSM6DSL_SPI_BUS_FREQ DT_ST_STM32_SPI_40003800_ST_LSM6DSL_1_SPI_MAX_FREQUENCY
#define DT_LSM6DSL_GPIO_DEV_NAME DT_ST_STM32_SPI_40003800_ST_LSM6DSL_1_IRQ_GPIOS_CONTROLLER
#define DT_LSM6DSL_GPIO_PIN_NUM DT_ST_STM32_SPI_40003800_ST_LSM6DSL_1_IRQ_GPIOS_PIN

#define CONFIG_LP3943_DEV_NAME DT_ST_STM32_I2C_V1_40005C00_TI_LP3943_60_LABEL
#define CONFIG_LP3943_I2C_ADDRESS DT_ST_STM32_I2C_V1_40005C00_TI_LP3943_60_BASE_ADDRESS
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion dts/bindings/sensor/st,lsm6dsl-spi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ inherits:

properties:
compatible:
constraint: "st,lsm6dsl-spi"
constraint: "st,lsm6dsl"

irq-gpios:
type: compound
Expand Down

0 comments on commit 867c33e

Please sign in to comment.