drivers: use new PM macros

Port some drivers to the recently introduced macros to showcase its
usage and be able to do some initial testing (nRF52840).

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
This commit is contained in:
Gerard Marull-Paretas 2021-10-13 12:25:06 +02:00 committed by Carles Cufí
commit 88a69674c0
38 changed files with 123 additions and 71 deletions

View file

@ -288,9 +288,11 @@ static const struct spi_driver_api spi_cc13xx_cc26xx_driver_api = {
#endif
#define SPI_CC13XX_CC26XX_DEVICE_INIT(n) \
DEVICE_DT_INST_DEFINE(n, \
PM_DEVICE_DT_INST_DEFINE(n, spi_cc13xx_cc26xx_pm_action); \
\
DEVICE_DT_INST_DEFINE(n, \
spi_cc13xx_cc26xx_init_##n, \
spi_cc13xx_cc26xx_pm_action, \
PM_DEVICE_DT_INST_REF(n), \
&spi_cc13xx_cc26xx_data_##n, &spi_cc13xx_cc26xx_config_##n, \
POST_KERNEL, CONFIG_SPI_INIT_PRIORITY, \
&spi_cc13xx_cc26xx_driver_api)