From a8245f78a16128513c90ad2271ce4d547e2c0dc5 Mon Sep 17 00:00:00 2001 From: Gerard Marull-Paretas Date: Wed, 28 Apr 2021 11:03:29 +0200 Subject: [PATCH] drivers: i2c: remove usage of device_pm_control_nop device_pm_control_nop is now deprecated in favour of NULL. Signed-off-by: Gerard Marull-Paretas --- drivers/i2c/i2c_cc32xx.c | 2 +- drivers/i2c/i2c_dw.c | 2 +- drivers/i2c/i2c_emul.c | 2 +- drivers/i2c/i2c_esp32.c | 4 ++-- drivers/i2c/i2c_gecko.c | 2 +- drivers/i2c/i2c_gpio.c | 2 +- drivers/i2c/i2c_imx.c | 2 +- drivers/i2c/i2c_ite_it8xxx2.c | 2 +- drivers/i2c/i2c_litex.c | 2 +- drivers/i2c/i2c_ll_stm32.c | 2 +- drivers/i2c/i2c_lpc11u6x.c | 2 +- drivers/i2c/i2c_mchp_xec.c | 2 +- drivers/i2c/i2c_mcux.c | 2 +- drivers/i2c/i2c_mcux_flexcomm.c | 2 +- drivers/i2c/i2c_mcux_lpi2c.c | 2 +- drivers/i2c/i2c_nios2.c | 2 +- drivers/i2c/i2c_npcx_controller.c | 2 +- drivers/i2c/i2c_npcx_port.c | 2 +- drivers/i2c/i2c_rv32m1_lpi2c.c | 2 +- drivers/i2c/i2c_sam0.c | 2 +- drivers/i2c/i2c_sam4l_twim.c | 2 +- drivers/i2c/i2c_sam_twi.c | 2 +- drivers/i2c/i2c_sam_twihs.c | 2 +- drivers/i2c/i2c_sbcon.c | 2 +- drivers/i2c/i2c_sifive.c | 2 +- drivers/i2c/i2c_test.c | 2 +- drivers/i2c/slave/eeprom_slave.c | 2 +- 27 files changed, 28 insertions(+), 28 deletions(-) diff --git a/drivers/i2c/i2c_cc32xx.c b/drivers/i2c/i2c_cc32xx.c index f3e61506e5..5b81cbf84e 100644 --- a/drivers/i2c/i2c_cc32xx.c +++ b/drivers/i2c/i2c_cc32xx.c @@ -382,7 +382,7 @@ static const struct i2c_cc32xx_config i2c_cc32xx_config = { static struct i2c_cc32xx_data i2c_cc32xx_data; -DEVICE_DT_INST_DEFINE(0, &i2c_cc32xx_init, device_pm_control_nop, +DEVICE_DT_INST_DEFINE(0, &i2c_cc32xx_init, NULL, &i2c_cc32xx_data, &i2c_cc32xx_config, POST_KERNEL, CONFIG_KERNEL_INIT_PRIORITY_DEVICE, &i2c_cc32xx_driver_api); diff --git a/drivers/i2c/i2c_dw.c b/drivers/i2c/i2c_dw.c index 41b51ad958..2791248cc8 100644 --- a/drivers/i2c/i2c_dw.c +++ b/drivers/i2c/i2c_dw.c @@ -727,7 +727,7 @@ static int i2c_dw_initialize(const struct device *dev) I2C_DW_INIT_PCIE(n) \ }; \ static struct i2c_dw_dev_config i2c_##n##_runtime; \ - DEVICE_DT_INST_DEFINE(n, &i2c_dw_initialize, device_pm_control_nop, \ + DEVICE_DT_INST_DEFINE(n, &i2c_dw_initialize, NULL, \ &i2c_##n##_runtime, &i2c_config_dw_##n, \ POST_KERNEL, CONFIG_I2C_INIT_PRIORITY, \ &funcs); \ diff --git a/drivers/i2c/i2c_emul.c b/drivers/i2c/i2c_emul.c index c1754556c1..ffa630e4e9 100644 --- a/drivers/i2c/i2c_emul.c +++ b/drivers/i2c/i2c_emul.c @@ -145,7 +145,7 @@ static struct i2c_driver_api i2c_emul_api = { static struct i2c_emul_data i2c_emul_data_##n; \ DEVICE_DT_INST_DEFINE(n, \ i2c_emul_init, \ - device_pm_control_nop, \ + NULL, \ &i2c_emul_data_##n, \ &i2c_emul_cfg_##n, \ POST_KERNEL, \ diff --git a/drivers/i2c/i2c_esp32.c b/drivers/i2c/i2c_esp32.c index 3c31264c8f..d3ff4faa23 100644 --- a/drivers/i2c/i2c_esp32.c +++ b/drivers/i2c/i2c_esp32.c @@ -614,7 +614,7 @@ static const struct i2c_esp32_config i2c_esp32_config_0 = { static struct i2c_esp32_data i2c_esp32_data_0; -DEVICE_DT_INST_DEFINE(0, &i2c_esp32_init, device_pm_control_nop, +DEVICE_DT_INST_DEFINE(0, &i2c_esp32_init, NULL, &i2c_esp32_data_0, &i2c_esp32_config_0, POST_KERNEL, CONFIG_I2C_INIT_PRIORITY, &i2c_esp32_driver_api); @@ -658,7 +658,7 @@ static const struct i2c_esp32_config i2c_esp32_config_1 = { static struct i2c_esp32_data i2c_esp32_data_1; -DEVICE_DT_INST_DEFINE(1, &i2c_esp32_init, device_pm_control_nop, +DEVICE_DT_INST_DEFINE(1, &i2c_esp32_init, NULL, &i2c_esp32_data_1, &i2c_esp32_config_1, POST_KERNEL, CONFIG_I2C_INIT_PRIORITY, &i2c_esp32_driver_api); diff --git a/drivers/i2c/i2c_gecko.c b/drivers/i2c/i2c_gecko.c index 48bef709c0..1cbe806d7c 100644 --- a/drivers/i2c/i2c_gecko.c +++ b/drivers/i2c/i2c_gecko.c @@ -227,7 +227,7 @@ static const struct i2c_gecko_config i2c_gecko_config_##idx = { \ static struct i2c_gecko_data i2c_gecko_data_##idx; \ \ DEVICE_DT_INST_DEFINE(idx, &i2c_gecko_init, \ - device_pm_control_nop, \ + NULL, \ &i2c_gecko_data_##idx, &i2c_gecko_config_##idx, \ POST_KERNEL, CONFIG_KERNEL_INIT_PRIORITY_DEVICE, \ &i2c_gecko_driver_api); diff --git a/drivers/i2c/i2c_gpio.c b/drivers/i2c/i2c_gpio.c index 03618e626e..b8ffff65c1 100644 --- a/drivers/i2c/i2c_gpio.c +++ b/drivers/i2c/i2c_gpio.c @@ -184,7 +184,7 @@ static const struct i2c_gpio_config i2c_gpio_dev_cfg_##_num = { \ \ DEVICE_DT_INST_DEFINE(_num, \ i2c_gpio_init, \ - device_pm_control_nop, \ + NULL, \ &i2c_gpio_dev_data_##_num, \ &i2c_gpio_dev_cfg_##_num, \ POST_KERNEL, CONFIG_I2C_INIT_PRIORITY, &api); diff --git a/drivers/i2c/i2c_imx.c b/drivers/i2c/i2c_imx.c index f52631bec5..eb1eb2279b 100644 --- a/drivers/i2c/i2c_imx.c +++ b/drivers/i2c/i2c_imx.c @@ -373,7 +373,7 @@ static const struct i2c_driver_api i2c_imx_driver_api = { \ DEVICE_DT_INST_DEFINE(n, \ &i2c_imx_init, \ - device_pm_control_nop, \ + NULL, \ &i2c_imx_data_##n, &i2c_imx_config_##n, \ POST_KERNEL, \ CONFIG_KERNEL_INIT_PRIORITY_DEVICE, \ diff --git a/drivers/i2c/i2c_ite_it8xxx2.c b/drivers/i2c/i2c_ite_it8xxx2.c index 275f6a9c9d..ab1a131941 100644 --- a/drivers/i2c/i2c_ite_it8xxx2.c +++ b/drivers/i2c/i2c_ite_it8xxx2.c @@ -874,7 +874,7 @@ static const struct i2c_driver_api i2c_it8xxx2_driver_api = { static struct i2c_it8xxx2_data i2c_it8xxx2_data_##idx; \ \ DEVICE_DT_INST_DEFINE(idx, \ - &i2c_it8xxx2_init, &device_pm_control_nop, \ + &i2c_it8xxx2_init, &NULL, \ &i2c_it8xxx2_data_##idx, \ &i2c_it8xxx2_cfg_##idx, POST_KERNEL, \ CONFIG_KERNEL_INIT_PRIORITY_DEVICE, \ diff --git a/drivers/i2c/i2c_litex.c b/drivers/i2c/i2c_litex.c index b8c2473023..42a2c4bb1e 100644 --- a/drivers/i2c/i2c_litex.c +++ b/drivers/i2c/i2c_litex.c @@ -126,7 +126,7 @@ static const struct i2c_driver_api i2c_litex_driver_api = { \ DEVICE_DT_INST_DEFINE(n, \ i2c_litex_init, \ - device_pm_control_nop, \ + NULL, \ &i2c_bitbang_##n, \ &i2c_litex_cfg_##n, \ POST_KERNEL, \ diff --git a/drivers/i2c/i2c_ll_stm32.c b/drivers/i2c/i2c_ll_stm32.c index de511d3311..8ea869071c 100644 --- a/drivers/i2c/i2c_ll_stm32.c +++ b/drivers/i2c/i2c_ll_stm32.c @@ -349,7 +349,7 @@ static const struct i2c_stm32_config i2c_stm32_cfg_##name = { \ static struct i2c_stm32_data i2c_stm32_dev_data_##name; \ \ DEVICE_DT_DEFINE(DT_NODELABEL(name), &i2c_stm32_init, \ - device_pm_control_nop, &i2c_stm32_dev_data_##name, \ + NULL, &i2c_stm32_dev_data_##name, \ &i2c_stm32_cfg_##name, \ POST_KERNEL, CONFIG_KERNEL_INIT_PRIORITY_DEVICE, \ &api_funcs); \ diff --git a/drivers/i2c/i2c_lpc11u6x.c b/drivers/i2c/i2c_lpc11u6x.c index 9b13dcdb8a..7c0c8417f3 100644 --- a/drivers/i2c/i2c_lpc11u6x.c +++ b/drivers/i2c/i2c_lpc11u6x.c @@ -403,7 +403,7 @@ static struct lpc11u6x_i2c_data i2c_data_##idx; \ \ DEVICE_DT_INST_DEFINE(idx, \ &lpc11u6x_i2c_init, \ - device_pm_control_nop, \ + NULL, \ &i2c_data_##idx, &i2c_cfg_##idx, \ PRE_KERNEL_1, CONFIG_KERNEL_INIT_PRIORITY_OBJECTS, \ &i2c_api); \ diff --git a/drivers/i2c/i2c_mchp_xec.c b/drivers/i2c/i2c_mchp_xec.c index c06b47d62e..26952ef105 100644 --- a/drivers/i2c/i2c_mchp_xec.c +++ b/drivers/i2c/i2c_mchp_xec.c @@ -654,7 +654,7 @@ static int i2c_xec_init(const struct device *dev) .girq_bit = DT_INST_PROP(n, girq_bit), \ .irq_config_func = i2c_xec_irq_config_func_##n, \ }; \ - DEVICE_DT_INST_DEFINE(n, &i2c_xec_init, device_pm_control_nop, \ + DEVICE_DT_INST_DEFINE(n, &i2c_xec_init, NULL, \ &i2c_xec_data_##n, &i2c_xec_config_##n, \ POST_KERNEL, CONFIG_I2C_INIT_PRIORITY, \ &i2c_xec_driver_api); \ diff --git a/drivers/i2c/i2c_mcux.c b/drivers/i2c/i2c_mcux.c index 83a98d3c97..6b4353e4a9 100644 --- a/drivers/i2c/i2c_mcux.c +++ b/drivers/i2c/i2c_mcux.c @@ -231,7 +231,7 @@ static const struct i2c_driver_api i2c_mcux_driver_api = { static struct i2c_mcux_data i2c_mcux_data_ ## n; \ \ DEVICE_DT_INST_DEFINE(n, \ - &i2c_mcux_init, device_pm_control_nop, \ + &i2c_mcux_init, NULL, \ &i2c_mcux_data_ ## n, \ &i2c_mcux_config_ ## n, POST_KERNEL, \ CONFIG_KERNEL_INIT_PRIORITY_DEVICE, \ diff --git a/drivers/i2c/i2c_mcux_flexcomm.c b/drivers/i2c/i2c_mcux_flexcomm.c index c3d8e156cd..3921b3222a 100644 --- a/drivers/i2c/i2c_mcux_flexcomm.c +++ b/drivers/i2c/i2c_mcux_flexcomm.c @@ -227,7 +227,7 @@ static const struct i2c_driver_api mcux_flexcomm_driver_api = { static struct mcux_flexcomm_data mcux_flexcomm_data_##id; \ DEVICE_DT_INST_DEFINE(id, \ &mcux_flexcomm_init, \ - device_pm_control_nop, \ + NULL, \ &mcux_flexcomm_data_##id, \ &mcux_flexcomm_config_##id, \ POST_KERNEL, \ diff --git a/drivers/i2c/i2c_mcux_lpi2c.c b/drivers/i2c/i2c_mcux_lpi2c.c index 436daec9bb..d4107fa572 100644 --- a/drivers/i2c/i2c_mcux_lpi2c.c +++ b/drivers/i2c/i2c_mcux_lpi2c.c @@ -260,7 +260,7 @@ static const struct i2c_driver_api mcux_lpi2c_driver_api = { \ static struct mcux_lpi2c_data mcux_lpi2c_data_##n; \ \ - DEVICE_DT_INST_DEFINE(n, &mcux_lpi2c_init, device_pm_control_nop,\ + DEVICE_DT_INST_DEFINE(n, &mcux_lpi2c_init, NULL, \ &mcux_lpi2c_data_##n, \ &mcux_lpi2c_config_##n, POST_KERNEL, \ CONFIG_KERNEL_INIT_PRIORITY_DEVICE, \ diff --git a/drivers/i2c/i2c_nios2.c b/drivers/i2c/i2c_nios2.c index 862b2f4b41..948567aa8a 100644 --- a/drivers/i2c/i2c_nios2.c +++ b/drivers/i2c/i2c_nios2.c @@ -165,7 +165,7 @@ static struct i2c_nios2_config i2c_nios2_cfg = { }, }; -DEVICE_DT_INST_DEFINE(0, &i2c_nios2_init, device_pm_control_nop, +DEVICE_DT_INST_DEFINE(0, &i2c_nios2_init, NULL, NULL, &i2c_nios2_cfg, POST_KERNEL, CONFIG_KERNEL_INIT_PRIORITY_DEVICE, &i2c_nios2_driver_api); diff --git a/drivers/i2c/i2c_npcx_controller.c b/drivers/i2c/i2c_npcx_controller.c index adbf67b8c0..ff919c4bb4 100644 --- a/drivers/i2c/i2c_npcx_controller.c +++ b/drivers/i2c/i2c_npcx_controller.c @@ -920,7 +920,7 @@ static int i2c_ctrl_init(const struct device *dev) \ DEVICE_DT_INST_DEFINE(inst, \ NPCX_I2C_CTRL_INIT_FUNC(inst), \ - device_pm_control_nop, \ + NULL, \ &i2c_ctrl_data_##inst, &i2c_ctrl_cfg_##inst, \ PRE_KERNEL_1, CONFIG_KERNEL_INIT_PRIORITY_DEVICE, \ NULL); \ diff --git a/drivers/i2c/i2c_npcx_port.c b/drivers/i2c/i2c_npcx_port.c index b3c44c9eb9..f4ad0ace58 100644 --- a/drivers/i2c/i2c_npcx_port.c +++ b/drivers/i2c/i2c_npcx_port.c @@ -174,7 +174,7 @@ static const struct i2c_driver_api i2c_port_npcx_driver_api = { \ DEVICE_DT_INST_DEFINE(inst, \ NPCX_I2C_PORT_INIT_FUNC(inst), \ - device_pm_control_nop, \ + NULL, \ &i2c_npcx_port_data_##inst, \ &i2c_npcx_port_cfg_##inst, \ PRE_KERNEL_1, CONFIG_KERNEL_INIT_PRIORITY_DEVICE, \ diff --git a/drivers/i2c/i2c_rv32m1_lpi2c.c b/drivers/i2c/i2c_rv32m1_lpi2c.c index ccc002984e..ae9e09c0b9 100644 --- a/drivers/i2c/i2c_rv32m1_lpi2c.c +++ b/drivers/i2c/i2c_rv32m1_lpi2c.c @@ -266,7 +266,7 @@ static const struct i2c_driver_api rv32m1_lpi2c_driver_api = { }; \ DEVICE_DT_INST_DEFINE(id, \ &rv32m1_lpi2c_init, \ - device_pm_control_nop, \ + NULL, \ &rv32m1_lpi2c_##id##_data, \ &rv32m1_lpi2c_##id##_config, \ POST_KERNEL, CONFIG_I2C_INIT_PRIORITY, \ diff --git a/drivers/i2c/i2c_sam0.c b/drivers/i2c/i2c_sam0.c index e7e3ed28bf..891e8bb140 100644 --- a/drivers/i2c/i2c_sam0.c +++ b/drivers/i2c/i2c_sam0.c @@ -789,7 +789,7 @@ static const struct i2c_sam0_dev_config i2c_sam0_dev_config_##n = { \ static struct i2c_sam0_dev_data i2c_sam0_dev_data_##n; \ DEVICE_DT_INST_DEFINE(n, \ &i2c_sam0_initialize, \ - device_pm_control_nop, \ + NULL, \ &i2c_sam0_dev_data_##n, \ &i2c_sam0_dev_config_##n, POST_KERNEL, \ CONFIG_I2C_INIT_PRIORITY, \ diff --git a/drivers/i2c/i2c_sam4l_twim.c b/drivers/i2c/i2c_sam4l_twim.c index e9b09317ec..2443241f61 100644 --- a/drivers/i2c/i2c_sam4l_twim.c +++ b/drivers/i2c/i2c_sam4l_twim.c @@ -632,7 +632,7 @@ static const struct i2c_driver_api i2c_sam_twim_driver_api = { static struct i2c_sam_twim_dev_data i2c##n##_sam_data; \ \ DEVICE_DT_INST_DEFINE(n, &i2c_sam_twim_initialize, \ - device_pm_control_nop, \ + NULL, \ &i2c##n##_sam_data, &i2c##n##_sam_config, \ POST_KERNEL, CONFIG_I2C_INIT_PRIORITY, \ &i2c_sam_twim_driver_api) diff --git a/drivers/i2c/i2c_sam_twi.c b/drivers/i2c/i2c_sam_twi.c index 8458f56768..99533cf3c7 100644 --- a/drivers/i2c/i2c_sam_twi.c +++ b/drivers/i2c/i2c_sam_twi.c @@ -362,7 +362,7 @@ static const struct i2c_driver_api i2c_sam_twi_driver_api = { static struct i2c_sam_twi_dev_data i2c##n##_sam_data; \ \ DEVICE_DT_INST_DEFINE(n, &i2c_sam_twi_initialize, \ - device_pm_control_nop, \ + NULL, \ &i2c##n##_sam_data, &i2c##n##_sam_config, \ POST_KERNEL, CONFIG_I2C_INIT_PRIORITY, \ &i2c_sam_twi_driver_api); diff --git a/drivers/i2c/i2c_sam_twihs.c b/drivers/i2c/i2c_sam_twihs.c index ec763886c7..f41c10848d 100644 --- a/drivers/i2c/i2c_sam_twihs.c +++ b/drivers/i2c/i2c_sam_twihs.c @@ -349,7 +349,7 @@ static const struct i2c_driver_api i2c_sam_twihs_driver_api = { static struct i2c_sam_twihs_dev_data i2c##n##_sam_data; \ \ DEVICE_DT_INST_DEFINE(n, &i2c_sam_twihs_initialize, \ - device_pm_control_nop, \ + NULL, \ &i2c##n##_sam_data, &i2c##n##_sam_config, \ POST_KERNEL, CONFIG_I2C_INIT_PRIORITY, \ &i2c_sam_twihs_driver_api); diff --git a/drivers/i2c/i2c_sbcon.c b/drivers/i2c/i2c_sbcon.c index 3deb485176..9d9024de7c 100644 --- a/drivers/i2c/i2c_sbcon.c +++ b/drivers/i2c/i2c_sbcon.c @@ -118,7 +118,7 @@ static const struct i2c_sbcon_config i2c_sbcon_dev_cfg_##_num = { \ \ DEVICE_DT_INST_DEFINE(_num, \ i2c_sbcon_init, \ - device_pm_control_nop, \ + NULL, \ &i2c_sbcon_dev_data_##_num, \ &i2c_sbcon_dev_cfg_##_num, \ PRE_KERNEL_2, CONFIG_I2C_INIT_PRIORITY, &api); diff --git a/drivers/i2c/i2c_sifive.c b/drivers/i2c/i2c_sifive.c index 467146e8d1..863cf15e19 100644 --- a/drivers/i2c/i2c_sifive.c +++ b/drivers/i2c/i2c_sifive.c @@ -331,7 +331,7 @@ static struct i2c_driver_api i2c_sifive_api = { }; \ DEVICE_DT_INST_DEFINE(n, \ i2c_sifive_init, \ - device_pm_control_nop, \ + NULL, \ NULL, \ &i2c_sifive_cfg_##n, \ POST_KERNEL, \ diff --git a/drivers/i2c/i2c_test.c b/drivers/i2c/i2c_test.c index 3d51c51e65..fe56f0ef38 100644 --- a/drivers/i2c/i2c_test.c +++ b/drivers/i2c/i2c_test.c @@ -38,7 +38,7 @@ static int vnd_i2c_init(const struct device *dev) } #define VND_I2C_INIT(n) \ - DEVICE_DT_INST_DEFINE(n, &vnd_i2c_init, device_pm_control_nop, \ + DEVICE_DT_INST_DEFINE(n, &vnd_i2c_init, NULL, \ NULL, NULL, POST_KERNEL, \ CONFIG_KERNEL_INIT_PRIORITY_DEVICE, \ &vnd_i2c_api); diff --git a/drivers/i2c/slave/eeprom_slave.c b/drivers/i2c/slave/eeprom_slave.c index bdf4caf4bf..f93080dc8c 100644 --- a/drivers/i2c/slave/eeprom_slave.c +++ b/drivers/i2c/slave/eeprom_slave.c @@ -222,7 +222,7 @@ static int i2c_eeprom_slave_init(const struct device *dev) \ DEVICE_DT_INST_DEFINE(inst, \ &i2c_eeprom_slave_init, \ - device_pm_control_nop, \ + NULL, \ &i2c_eeprom_slave_##inst##_dev_data, \ &i2c_eeprom_slave_##inst##_cfg, \ POST_KERNEL, \