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:
Peter Bigot 2020-10-29 10:26:24 -05:00 committed by Anas Nashif
parent 1240c28bce
commit 63043bc5ac
2 changed files with 2 additions and 4 deletions

View file

@ -296,8 +296,7 @@ static int twi_nrfx_pm_control(const struct device *dev,
.frequency = I2C_FREQUENCY(idx), \ .frequency = I2C_FREQUENCY(idx), \
} \ } \
}; \ }; \
DEVICE_DEFINE(twi_##idx, \ DEVICE_DT_DEFINE(I2C(idx), \
DT_LABEL(I2C(idx)), \
twi_##idx##_init, \ twi_##idx##_init, \
twi_nrfx_pm_control, \ twi_nrfx_pm_control, \
&twi_##idx##_data, \ &twi_##idx##_data, \

View file

@ -349,8 +349,7 @@ static int twim_nrfx_pm_control(const struct device *dev,
.frequency = I2C_FREQUENCY(idx), \ .frequency = I2C_FREQUENCY(idx), \
} \ } \
}; \ }; \
DEVICE_DEFINE(twim_##idx, \ DEVICE_DT_DEFINE(I2C(idx), \
DT_LABEL(I2C(idx)), \
twim_##idx##_init, \ twim_##idx##_init, \
twim_nrfx_pm_control, \ twim_nrfx_pm_control, \
&twim_##idx##_data, \ &twim_##idx##_data, \