drivers: i2c: convert nrf drivers to dt device defines
Use the devicetree node as the source of object name and other information used when defining the device structure. Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
This commit is contained in:
parent
1240c28bce
commit
63043bc5ac
|
@ -296,8 +296,7 @@ static int twi_nrfx_pm_control(const struct device *dev,
|
|||
.frequency = I2C_FREQUENCY(idx), \
|
||||
} \
|
||||
}; \
|
||||
DEVICE_DEFINE(twi_##idx, \
|
||||
DT_LABEL(I2C(idx)), \
|
||||
DEVICE_DT_DEFINE(I2C(idx), \
|
||||
twi_##idx##_init, \
|
||||
twi_nrfx_pm_control, \
|
||||
&twi_##idx##_data, \
|
||||
|
|
|
@ -349,8 +349,7 @@ static int twim_nrfx_pm_control(const struct device *dev,
|
|||
.frequency = I2C_FREQUENCY(idx), \
|
||||
} \
|
||||
}; \
|
||||
DEVICE_DEFINE(twim_##idx, \
|
||||
DT_LABEL(I2C(idx)), \
|
||||
DEVICE_DT_DEFINE(I2C(idx), \
|
||||
twim_##idx##_init, \
|
||||
twim_nrfx_pm_control, \
|
||||
&twim_##idx##_data, \
|
||||
|
|
Loading…
Reference in a new issue