drivers/sensor: stmemsc: make use of spi_dt_spec and i2c_dt_spec
Make use of the new DT facilities that introduced two new bus structures, spi_dt_spec and i2c_dt_spec, as well as the macros, SPI_DT_SPEC_INST_GET and I2C_DT_SPEC_INST_GET, to retrieve info from DT. Signed-off-by: Armando Visconti <armando.visconti@st.com>
This commit is contained in:
parent
919b3f9165
commit
dabaaa1e5d
13 changed files with 42 additions and 62 deletions
|
@ -60,10 +60,10 @@ struct lis2dw12_device_config {
|
|||
stmdev_ctx_t ctx;
|
||||
union {
|
||||
#if DT_ANY_INST_ON_BUS_STATUS_OKAY(i2c)
|
||||
const struct stmemsc_cfg_i2c i2c;
|
||||
const struct i2c_dt_spec i2c;
|
||||
#endif
|
||||
#if DT_ANY_INST_ON_BUS_STATUS_OKAY(spi)
|
||||
const struct stmemsc_cfg_spi spi;
|
||||
const struct spi_dt_spec spi;
|
||||
#endif
|
||||
} stmemsc_cfg;
|
||||
lis2dw12_mode_t pm;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue