drivers: use common PM action callback naming
The PM callback is no longer referenced as "pm_control" but
"pm_action_cb", so reflect this new naming on the callbacks.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
diff --git a/drivers/display/display_st7735r.c b/drivers/display/display_st7735r.c
index f3bedec..291caa3 100644
--- a/drivers/display/display_st7735r.c
+++ b/drivers/display/display_st7735r.c
@@ -494,8 +494,8 @@
}
#ifdef CONFIG_PM_DEVICE
-static int st7735r_pm_control(const struct device *dev,
- enum pm_device_action action)
+static int st7735r_pm_action(const struct device *dev,
+ enum pm_device_action action)
{
int ret = 0;
struct st7735r_data *data = (struct st7735r_data *)dev->data;
@@ -573,7 +573,7 @@
.x_offset = DT_INST_PROP(inst, x_offset), \
.y_offset = DT_INST_PROP(inst, y_offset), \
}; \
- DEVICE_DT_INST_DEFINE(inst, st7735r_init, st7735r_pm_control, \
+ DEVICE_DT_INST_DEFINE(inst, st7735r_init, st7735r_pm_action, \
&st7735r_data_ ## inst, &st7735r_config_ ## inst, \
POST_KERNEL, CONFIG_DISPLAY_INIT_PRIORITY, \
&st7735r_api);
diff --git a/drivers/display/display_st7789v.c b/drivers/display/display_st7789v.c
index e6f9a95..6fd72cf 100644
--- a/drivers/display/display_st7789v.c
+++ b/drivers/display/display_st7789v.c
@@ -396,8 +396,8 @@
}
#ifdef CONFIG_PM_DEVICE
-static int st7789v_pm_control(const struct device *dev,
- enum pm_device_action action)
+static int st7789v_pm_action(const struct device *dev,
+ enum pm_device_action action)
{
struct st7789v_data *data = (struct st7789v_data *)dev->data;
int ret = 0;
@@ -439,5 +439,5 @@
};
DEVICE_DT_INST_DEFINE(0, &st7789v_init,
- st7789v_pm_control, &st7789v_data, NULL, POST_KERNEL,
+ st7789v_pm_action, &st7789v_data, NULL, POST_KERNEL,
CONFIG_DISPLAY_INIT_PRIORITY, &st7789v_api);
diff --git a/drivers/entropy/entropy_cc13xx_cc26xx.c b/drivers/entropy/entropy_cc13xx_cc26xx.c
index eabbd8e..01ce405 100644
--- a/drivers/entropy/entropy_cc13xx_cc26xx.c
+++ b/drivers/entropy/entropy_cc13xx_cc26xx.c
@@ -264,8 +264,8 @@
#endif
#ifdef CONFIG_PM_DEVICE
-static int entropy_cc13xx_cc26xx_pm_control(const struct device *dev,
- enum pm_device_action action)
+static int entropy_cc13xx_cc26xx_pm_action(const struct device *dev,
+ enum pm_device_action action)
{
struct entropy_cc13xx_cc26xx_data *data = get_dev_data(dev);
@@ -351,7 +351,7 @@
DEVICE_DT_INST_DEFINE(0,
entropy_cc13xx_cc26xx_init,
- entropy_cc13xx_cc26xx_pm_control,
+ entropy_cc13xx_cc26xx_pm_action,
&entropy_cc13xx_cc26xx_data, NULL,
PRE_KERNEL_1, CONFIG_ENTROPY_INIT_PRIORITY,
&entropy_cc13xx_cc26xx_driver_api);
diff --git a/drivers/ethernet/eth_mcux.c b/drivers/ethernet/eth_mcux.c
index a7f4de2..8724955 100644
--- a/drivers/ethernet/eth_mcux.c
+++ b/drivers/ethernet/eth_mcux.c
@@ -183,8 +183,8 @@
static void eth_mcux_phy_enter_reset(struct eth_context *context);
void eth_mcux_phy_stop(struct eth_context *context);
-static int eth_mcux_device_pm_control(const struct device *dev,
- enum pm_device_action action)
+static int eth_mcux_device_pm_action(const struct device *dev,
+ enum pm_device_action action)
{
struct eth_context *eth_ctx = (struct eth_context *)dev->data;
int ret = 0;
@@ -231,10 +231,10 @@
return ret;
}
-#define ETH_MCUX_PM_FUNC eth_mcux_device_pm_control
+#define ETH_MCUX_PM_ACTION_CB eth_mcux_device_pm_action
#else
-#define ETH_MCUX_PM_FUNC NULL
+#define ETH_MCUX_PM_ACTION_CB NULL
#endif /* CONFIG_NET_POWER_MANAGEMENT */
#if ETH_MCUX_FIXED_LINK
@@ -1395,7 +1395,7 @@
\
ETH_NET_DEVICE_DT_INST_DEFINE(n, \
eth_init, \
- ETH_MCUX_PM_FUNC, \
+ ETH_MCUX_PM_ACTION_CB, \
ð##n##_context, \
ð##n##_buffer_config, \
CONFIG_ETH_INIT_PRIORITY, \
diff --git a/drivers/flash/spi_flash_at45.c b/drivers/flash/spi_flash_at45.c
index 22fddd9..93a4a0b 100644
--- a/drivers/flash/spi_flash_at45.c
+++ b/drivers/flash/spi_flash_at45.c
@@ -593,8 +593,8 @@
}
#if IS_ENABLED(CONFIG_PM_DEVICE)
-static int spi_flash_at45_pm_control(const struct device *dev,
- enum pm_device_action action)
+static int spi_flash_at45_pm_action(const struct device *dev,
+ enum pm_device_action action)
{
const struct spi_flash_at45_config *dev_config = get_dev_config(dev);
@@ -700,7 +700,7 @@
"atmel,at45 is not compatible with its " \
"total size");)) \
DEVICE_DT_INST_DEFINE(idx, \
- spi_flash_at45_init, spi_flash_at45_pm_control, \
+ spi_flash_at45_init, spi_flash_at45_pm_action, \
&inst_##idx##_data, &inst_##idx##_config, \
POST_KERNEL, CONFIG_SPI_FLASH_AT45_INIT_PRIORITY, \
&spi_flash_at45_api);
diff --git a/drivers/gpio/gpio_dw.c b/drivers/gpio/gpio_dw.c
index d44ea78..7a63ae9 100644
--- a/drivers/gpio/gpio_dw.c
+++ b/drivers/gpio/gpio_dw.c
@@ -429,8 +429,8 @@
* Implements the driver control management functionality
* the *context may include IN data or/and OUT data
*/
-static int gpio_dw_device_ctrl(const struct device *dev,
- enum pm_device_action action)
+static int gpio_dw_device_pm_action(const struct device *dev,
+ enum pm_device_action action)
{
switch (action) {
case PM_DEVICE_ACTION_SUSPEND:
@@ -535,7 +535,7 @@
};
DEVICE_DT_INST_DEFINE(0,
- gpio_dw_initialize, gpio_dw_device_ctrl, &gpio_0_runtime,
+ gpio_dw_initialize, gpio_dw_device_pm_action, &gpio_0_runtime,
&gpio_config_0, POST_KERNEL, CONFIG_GPIO_DW_INIT_PRIORITY,
&api_funcs);
@@ -597,7 +597,7 @@
};
DEVICE_DT_INST_DEFINE(1,
- gpio_dw_initialize, gpio_dw_device_ctrl, &gpio_1_runtime,
+ gpio_dw_initialize, gpio_dw_device_pm_action, &gpio_1_runtime,
&gpio_dw_config_1, POST_KERNEL, CONFIG_GPIO_DW_INIT_PRIORITY,
&api_funcs);
@@ -658,7 +658,7 @@
};
DEVICE_DT_INST_DEFINE(2,
- gpio_dw_initialize, gpio_dw_device_ctrl, &gpio_2_runtime,
+ gpio_dw_initialize, gpio_dw_device_pm_action, &gpio_2_runtime,
&gpio_dw_config_2, POST_KERNEL, CONFIG_GPIO_DW_INIT_PRIORITY,
&api_funcs);
@@ -719,7 +719,7 @@
};
DEVICE_DT_INST_DEFINE(3,
- gpio_dw_initialize, gpio_dw_device_ctrl, &gpio_3_runtime,
+ gpio_dw_initialize, gpio_dw_device_pm_action, &gpio_3_runtime,
&gpio_dw_config_3, POST_KERNEL, CONFIG_GPIO_DW_INIT_PRIORITY,
&api_funcs);
diff --git a/drivers/gpio/gpio_emul.c b/drivers/gpio/gpio_emul.c
index a8682a4..f805eaf 100644
--- a/drivers/gpio/gpio_emul.c
+++ b/drivers/gpio/gpio_emul.c
@@ -664,8 +664,8 @@
}
#ifdef CONFIG_PM_DEVICE
-static int gpio_emul_pm_device_ctrl(const struct device *dev,
- enum pm_device_action action)
+static int gpio_emul_pm_device_pm_action(const struct device *dev,
+ enum pm_device_action action)
{
ARG_UNUSED(dev);
ARG_UNUSED(action);
@@ -673,7 +673,7 @@
return 0;
}
#else
-#define gpio_emul_pm_device_ctrl NULL
+#define gpio_emul_pm_device_pm_action NULL
#endif
/*
@@ -710,7 +710,7 @@
}; \
\
DEVICE_DT_INST_DEFINE(_num, gpio_emul_init, \
- gpio_emul_pm_device_ctrl, \
+ gpio_emul_pm_device_pm_action, \
&gpio_emul_data_##_num, \
&gpio_emul_config_##_num, POST_KERNEL, \
CONFIG_KERNEL_INIT_PRIORITY_DEVICE, \
diff --git a/drivers/gpio/gpio_stm32.c b/drivers/gpio/gpio_stm32.c
index fdb93bc..e4c6a93 100644
--- a/drivers/gpio/gpio_stm32.c
+++ b/drivers/gpio/gpio_stm32.c
@@ -570,8 +570,8 @@
};
#ifdef CONFIG_PM_DEVICE
-static int gpio_stm32_pm_device_ctrl(const struct device *dev,
- enum pm_device_action action)
+static int gpio_stm32_pm_action(const struct device *dev,
+ enum pm_device_action action)
{
switch (action) {
case PM_DEVICE_ACTION_RESUME:
@@ -632,7 +632,7 @@
static struct gpio_stm32_data gpio_stm32_data_## __suffix; \
DEVICE_DT_DEFINE(__node, \
gpio_stm32_init, \
- gpio_stm32_pm_device_ctrl, \
+ gpio_stm32_pm_action, \
&gpio_stm32_data_## __suffix, \
&gpio_stm32_cfg_## __suffix, \
PRE_KERNEL_1, \
diff --git a/drivers/i2c/i2c_cc13xx_cc26xx.c b/drivers/i2c/i2c_cc13xx_cc26xx.c
index 38e7449..2d2e08f 100644
--- a/drivers/i2c/i2c_cc13xx_cc26xx.c
+++ b/drivers/i2c/i2c_cc13xx_cc26xx.c
@@ -326,8 +326,8 @@
#endif
#ifdef CONFIG_PM_DEVICE
-static int i2c_cc13xx_cc26xx_pm_control(const struct device *dev,
- enum pm_device_action action)
+static int i2c_cc13xx_cc26xx_pm_action(const struct device *dev,
+ enum pm_device_action action)
{
int ret = 0;
@@ -437,7 +437,7 @@
DEVICE_DT_INST_DEFINE(0,
i2c_cc13xx_cc26xx_init,
- i2c_cc13xx_cc26xx_pm_control,
+ i2c_cc13xx_cc26xx_pm_action,
&i2c_cc13xx_cc26xx_data, &i2c_cc13xx_cc26xx_config,
POST_KERNEL, CONFIG_I2C_INIT_PRIORITY,
&i2c_cc13xx_cc26xx_driver_api);
diff --git a/drivers/i2c/i2c_nrfx_twi.c b/drivers/i2c/i2c_nrfx_twi.c
index 64ac076..1a4df6b 100644
--- a/drivers/i2c/i2c_nrfx_twi.c
+++ b/drivers/i2c/i2c_nrfx_twi.c
@@ -225,8 +225,8 @@
}
#ifdef CONFIG_PM_DEVICE
-static int twi_nrfx_pm_control(const struct device *dev,
- enum pm_device_action action)
+static int twi_nrfx_pm_action(const struct device *dev,
+ enum pm_device_action action)
{
int ret = 0;
@@ -287,7 +287,7 @@
}; \
DEVICE_DT_DEFINE(I2C(idx), \
twi_##idx##_init, \
- twi_nrfx_pm_control, \
+ twi_nrfx_pm_action, \
&twi_##idx##_data, \
&twi_##idx##z_config, \
POST_KERNEL, \
diff --git a/drivers/i2c/i2c_nrfx_twim.c b/drivers/i2c/i2c_nrfx_twim.c
index 1d181d4..46f6f3d 100644
--- a/drivers/i2c/i2c_nrfx_twim.c
+++ b/drivers/i2c/i2c_nrfx_twim.c
@@ -290,8 +290,8 @@
}
#ifdef CONFIG_PM_DEVICE
-static int twim_nrfx_pm_control(const struct device *dev,
- enum pm_device_action action)
+static int twim_nrfx_pm_action(const struct device *dev,
+ enum pm_device_action action)
{
int ret = 0;
@@ -372,7 +372,7 @@
}; \
DEVICE_DT_DEFINE(I2C(idx), \
twim_##idx##_init, \
- twim_nrfx_pm_control, \
+ twim_nrfx_pm_action, \
&twim_##idx##_data, \
&twim_##idx##z_config, \
POST_KERNEL, \
diff --git a/drivers/interrupt_controller/intc_ioapic.c b/drivers/interrupt_controller/intc_ioapic.c
index 212be55..1201124 100644
--- a/drivers/interrupt_controller/intc_ioapic.c
+++ b/drivers/interrupt_controller/intc_ioapic.c
@@ -309,8 +309,8 @@
* the *context may include IN data or/and OUT data
*/
__pinned_func
-static int ioapic_device_ctrl(const struct device *dev,
- enum pm_device_action action)
+static int ioapic_pm_action(const struct device *dev,
+ enum pm_device_action action)
{
int ret = 0;
@@ -497,7 +497,7 @@
#ifdef CONFIG_PM_DEVICE
-SYS_DEVICE_DEFINE("ioapic", ioapic_init, ioapic_device_ctrl, PRE_KERNEL_1,
+SYS_DEVICE_DEFINE("ioapic", ioapic_init, ioapic_pm_action, PRE_KERNEL_1,
CONFIG_KERNEL_INIT_PRIORITY_DEFAULT);
#else
SYS_INIT(ioapic_init, PRE_KERNEL_1, CONFIG_KERNEL_INIT_PRIORITY_DEFAULT);
diff --git a/drivers/interrupt_controller/intc_loapic.c b/drivers/interrupt_controller/intc_loapic.c
index 0a8f055..1ac58c8 100644
--- a/drivers/interrupt_controller/intc_loapic.c
+++ b/drivers/interrupt_controller/intc_loapic.c
@@ -408,8 +408,8 @@
* the *context may include IN data or/and OUT data
*/
__pinned_func
-static int loapic_device_ctrl(const struct device *dev,
- enum pm_device_action action)
+static int loapic_pm_action(const struct device *dev,
+ enum pm_device_action action)
{
int ret = 0;
@@ -427,7 +427,7 @@
return ret;
}
-SYS_DEVICE_DEFINE("loapic", loapic_init, loapic_device_ctrl, PRE_KERNEL_1,
+SYS_DEVICE_DEFINE("loapic", loapic_init, loapic_pm_action, PRE_KERNEL_1,
CONFIG_KERNEL_INIT_PRIORITY_DEFAULT);
#else
SYS_INIT(loapic_init, PRE_KERNEL_1, CONFIG_KERNEL_INIT_PRIORITY_DEFAULT);
diff --git a/drivers/led/led_pwm.c b/drivers/led/led_pwm.c
index f6c2e75..d1afcd0 100644
--- a/drivers/led/led_pwm.c
+++ b/drivers/led/led_pwm.c
@@ -114,8 +114,8 @@
}
#ifdef CONFIG_PM_DEVICE
-static int led_pwm_pm_control(const struct device *dev,
- enum pm_device_action action)
+static int led_pwm_pm_action(const struct device *dev,
+ enum pm_device_action action)
{
const struct led_pwm_config *config = DEV_CFG(dev);
@@ -176,7 +176,7 @@
.led = led_pwm_##id, \
}; \
\
-DEVICE_DT_INST_DEFINE(id, &led_pwm_init, led_pwm_pm_control, \
+DEVICE_DT_INST_DEFINE(id, &led_pwm_init, led_pwm_pm_action, \
NULL, &led_pwm_config_##id, POST_KERNEL, \
CONFIG_LED_INIT_PRIORITY, &led_pwm_api);
diff --git a/drivers/pwm/pwm_nrfx.c b/drivers/pwm/pwm_nrfx.c
index d2a5f7a..234552e 100644
--- a/drivers/pwm/pwm_nrfx.c
+++ b/drivers/pwm/pwm_nrfx.c
@@ -294,8 +294,8 @@
memset(dev->data, 0, sizeof(struct pwm_nrfx_data));
}
-static int pwm_nrfx_pm_control(const struct device *dev,
- enum pm_device_action action)
+static int pwm_nrfx_pm_action(const struct device *dev,
+ enum pm_device_action action)
{
int err = 0;
@@ -314,7 +314,7 @@
}
#else
-#define pwm_nrfx_pm_control NULL
+#define pwm_nrfx_pm_action NULL
#endif /* CONFIG_PM_DEVICE */
@@ -369,7 +369,7 @@
.seq.length = NRF_PWM_CHANNEL_COUNT \
}; \
DEVICE_DT_DEFINE(PWM(idx), \
- pwm_nrfx_init, pwm_nrfx_pm_control, \
+ pwm_nrfx_init, pwm_nrfx_pm_action, \
&pwm_nrfx_##idx##_data, \
&pwm_nrfx_##idx##config, \
POST_KERNEL, CONFIG_KERNEL_INIT_PRIORITY_DEVICE, \
diff --git a/drivers/sensor/apds9960/apds9960.c b/drivers/sensor/apds9960/apds9960.c
index bff5e8b..a942c77 100644
--- a/drivers/sensor/apds9960/apds9960.c
+++ b/drivers/sensor/apds9960/apds9960.c
@@ -408,8 +408,8 @@
}
#ifdef CONFIG_PM_DEVICE
-static int apds9960_device_ctrl(const struct device *dev,
- enum pm_device_action action)
+static int apds9960_pm_action(const struct device *dev,
+ enum pm_device_action action)
{
const struct apds9960_config *config = dev->config;
struct apds9960_data *data = dev->data;
@@ -535,5 +535,5 @@
static struct apds9960_data apds9960_data;
DEVICE_DT_INST_DEFINE(0, apds9960_init,
- apds9960_device_ctrl, &apds9960_data, &apds9960_config,
+ apds9960_pm_action, &apds9960_data, &apds9960_config,
POST_KERNEL, CONFIG_SENSOR_INIT_PRIORITY, &apds9960_driver_api);
diff --git a/drivers/sensor/bme280/bme280.c b/drivers/sensor/bme280/bme280.c
index b90b50f..e2b8f34 100644
--- a/drivers/sensor/bme280/bme280.c
+++ b/drivers/sensor/bme280/bme280.c
@@ -394,7 +394,7 @@
}
#ifdef CONFIG_PM_DEVICE
-int bme280_pm_ctrl(const struct device *dev, enum pm_device_action action)
+int bme280_pm_action(const struct device *dev, enum pm_device_action action)
{
int ret = 0;
@@ -448,7 +448,7 @@
(BME280_CONFIG_I2C(inst))); \
DEVICE_DT_INST_DEFINE(inst, \
bme280_chip_init, \
- bme280_pm_ctrl, \
+ bme280_pm_action, \
&bme280_data_##inst, \
&bme280_config_##inst, \
POST_KERNEL, \
diff --git a/drivers/sensor/bmp388/bmp388.c b/drivers/sensor/bmp388/bmp388.c
index b0c930a..29f2466 100644
--- a/drivers/sensor/bmp388/bmp388.c
+++ b/drivers/sensor/bmp388/bmp388.c
@@ -549,8 +549,8 @@
}
#ifdef CONFIG_PM_DEVICE
-static int bmp388_device_ctrl(const struct device *dev,
- enum pm_device_action action)
+static int bmp388_pm_action(const struct device *dev,
+ enum pm_device_action action)
{
uint8_t reg_val;
@@ -723,7 +723,7 @@
DEVICE_DT_INST_DEFINE( \
inst, \
bmp388_init, \
- bmp388_device_ctrl, \
+ bmp388_pm_action, \
&bmp388_data_##inst, \
&bmp388_config_##inst, \
POST_KERNEL, \
diff --git a/drivers/sensor/bq274xx/bq274xx.c b/drivers/sensor/bq274xx/bq274xx.c
index daaebb3..bbf32b7 100644
--- a/drivers/sensor/bq274xx/bq274xx.c
+++ b/drivers/sensor/bq274xx/bq274xx.c
@@ -727,8 +727,8 @@
return 0;
}
-static int bq274xx_pm_control(const struct device *dev,
- enum pm_device_action action)
+static int bq274xx_pm_action(const struct device *dev,
+ enum pm_device_action action)
{
int ret;
struct bq274xx_data *data = dev->data;
@@ -773,7 +773,7 @@
.terminate_voltage = DT_INST_PROP(index, terminate_voltage), \
}; \
\
- DEVICE_DT_INST_DEFINE(index, &bq274xx_gauge_init, bq274xx_pm_control, \
+ DEVICE_DT_INST_DEFINE(index, &bq274xx_gauge_init, bq274xx_pm_action, \
&bq274xx_driver_##index, \
&bq274xx_config_##index, POST_KERNEL, \
CONFIG_SENSOR_INIT_PRIORITY, \
diff --git a/drivers/sensor/fdc2x1x/fdc2x1x.c b/drivers/sensor/fdc2x1x/fdc2x1x.c
index cedbb79..000a9a0 100644
--- a/drivers/sensor/fdc2x1x/fdc2x1x.c
+++ b/drivers/sensor/fdc2x1x/fdc2x1x.c
@@ -481,8 +481,8 @@
* @param pm_state - power management state
* @return 0 in case of success, negative error code otherwise.
*/
-static int fdc2x1x_device_pm_ctrl(const struct device *dev,
- enum pm_device_action action)
+static int fdc2x1x_device_pm_action(const struct device *dev,
+ enum pm_device_action action)
{
int ret;
const struct fdc2x1x_config *cfg = dev->config;
@@ -1027,7 +1027,7 @@
\
DEVICE_DT_INST_DEFINE(n, \
fdc2x1x_init, \
- fdc2x1x_device_pm_ctrl, \
+ fdc2x1x_device_pm_action, \
&fdc2x1x_data_##n, \
&fdc2x1x_config_##n, \
POST_KERNEL, \
diff --git a/drivers/sensor/ina219/ina219.c b/drivers/sensor/ina219/ina219.c
index d4cf2e1..0ee24e9 100644
--- a/drivers/sensor/ina219/ina219.c
+++ b/drivers/sensor/ina219/ina219.c
@@ -217,7 +217,8 @@
}
#ifdef CONFIG_PM_DEVICE
-static int ina219_pm_ctrl(const struct device *dev, enum pm_device_action action)
+static int ina219_pm_action(const struct device *dev,
+ enum pm_device_action action)
{
uint16_t reg_val;
@@ -303,7 +304,7 @@
\
DEVICE_DT_INST_DEFINE(n, \
ina219_init, \
- ina219_pm_ctrl,\
+ ina219_pm_action, \
&ina219_data_##n, \
&ina219_config_##n, \
POST_KERNEL, \
diff --git a/drivers/sensor/lis2mdl/lis2mdl.c b/drivers/sensor/lis2mdl/lis2mdl.c
index ed3feb1..3f98337 100644
--- a/drivers/sensor/lis2mdl/lis2mdl.c
+++ b/drivers/sensor/lis2mdl/lis2mdl.c
@@ -442,8 +442,8 @@
}
#ifdef CONFIG_PM_DEVICE
-static int lis2mdl_pm_control(const struct device *dev,
- enum pm_device_action action)
+static int lis2mdl_pm_action(const struct device *dev,
+ enum pm_device_action action)
{
const struct lis2mdl_config *config = dev->config;
stmdev_ctx_t *ctx = (stmdev_ctx_t *)&config->ctx;
@@ -490,7 +490,7 @@
#define LIS2MDL_DEVICE_INIT(inst) \
DEVICE_DT_INST_DEFINE(inst, \
lis2mdl_init, \
- lis2mdl_pm_control, \
+ lis2mdl_pm_action, \
&lis2mdl_data_##inst, \
&lis2mdl_config_##inst, \
POST_KERNEL, \
diff --git a/drivers/sensor/lm77/lm77.c b/drivers/sensor/lm77/lm77.c
index 4639210..8bdc8de 100644
--- a/drivers/sensor/lm77/lm77.c
+++ b/drivers/sensor/lm77/lm77.c
@@ -361,7 +361,8 @@
}
#ifdef CONFIG_PM_DEVICE
-static int lm77_pm_control(const struct device *dev, enum pm_device_action action)
+static int lm77_pm_action(const struct device *dev,
+ enum pm_device_action action)
{
const struct lm77_config *config = dev->config;
union lm77_reg_config creg = config->config_dt;
@@ -395,9 +396,9 @@
#endif /* ! LM77_TRIGGER_SUPPORT */
#ifdef CONFIG_PM_DEVICE
-#define LM77_PM_CONTROL_FUNC lm77_pm_control
+#define LM77_PM_ACTION_CB lm77_pm_action
#else /* CONFIG_PM_DEVICE */
-#define LM77_PM_CONTROL_FUNC NULL
+#define LM77_PM_ACTION_CB NULL
#endif /* ! CONFIG_PM_DEVICE */
#define LM77_INIT(n) \
@@ -417,7 +418,7 @@
}; \
\
DEVICE_DT_INST_DEFINE(n, lm77_init, \
- LM77_PM_CONTROL_FUNC, \
+ LM77_PM_ACTION_CB, \
&lm77_data_##n, \
&lm77_config_##n, POST_KERNEL, \
CONFIG_SENSOR_INIT_PRIORITY, \
diff --git a/drivers/sensor/qdec_nrfx/qdec_nrfx.c b/drivers/sensor/qdec_nrfx/qdec_nrfx.c
index 3e928a7..75e5a52 100644
--- a/drivers/sensor/qdec_nrfx/qdec_nrfx.c
+++ b/drivers/sensor/qdec_nrfx/qdec_nrfx.c
@@ -207,8 +207,8 @@
}
#ifdef CONFIG_PM_DEVICE
-static int qdec_nrfx_pm_control(const struct device *dev,
- enum pm_device_action action)
+static int qdec_nrfx_pm_action(const struct device *dev,
+ enum pm_device_action action)
{
ARG_UNUSED(dev);
@@ -242,5 +242,5 @@
};
DEVICE_DT_INST_DEFINE(0, qdec_nrfx_init,
- qdec_nrfx_pm_control, NULL, NULL, POST_KERNEL,
+ qdec_nrfx_pm_action, NULL, NULL, POST_KERNEL,
CONFIG_SENSOR_INIT_PRIORITY, &qdec_nrfx_driver_api);
diff --git a/drivers/sensor/sgp40/sgp40.c b/drivers/sensor/sgp40/sgp40.c
index 00705d1..0ae1513 100644
--- a/drivers/sensor/sgp40/sgp40.c
+++ b/drivers/sensor/sgp40/sgp40.c
@@ -186,7 +186,8 @@
#ifdef CONFIG_PM_DEVICE
-static int sgp40_pm_ctrl(const struct device *dev, enum pm_device_action action)
+static int sgp40_pm_action(const struct device *dev,
+ enum pm_device_action action)
{
uint16_t cmd;
@@ -256,7 +257,7 @@
\
DEVICE_DT_INST_DEFINE(n, \
sgp40_init, \
- sgp40_pm_ctrl,\
+ sgp40_pm_action, \
&sgp40_data_##n, \
&sgp40_config_##n, \
POST_KERNEL, \
diff --git a/drivers/sensor/si7210/si7210.c b/drivers/sensor/si7210/si7210.c
index 3e1af7b..3d62893 100644
--- a/drivers/sensor/si7210/si7210.c
+++ b/drivers/sensor/si7210/si7210.c
@@ -425,7 +425,8 @@
};
#ifdef CONFIG_PM_DEVICE
-static int si7210_pm_ctrl(const struct device *dev, enum pm_device_action action)
+static int si7210_pm_action(const struct device *dev,
+ enum pm_device_action action)
{
int rc;
@@ -536,7 +537,7 @@
static const struct si7210_config si7210_config_##inst = { \
.bus = I2C_DT_SPEC_INST_GET(inst), \
}; \
- DEVICE_DT_INST_DEFINE(inst, si7210_init, si7210_pm_ctrl, \
+ DEVICE_DT_INST_DEFINE(inst, si7210_init, si7210_pm_action, \
&si7210_data_##inst, &si7210_config_##inst, POST_KERNEL, \
CONFIG_SENSOR_INIT_PRIORITY, &si7210_api_funcs);
diff --git a/drivers/sensor/vcnl4040/vcnl4040.c b/drivers/sensor/vcnl4040/vcnl4040.c
index 6fa065f..71e7de1 100644
--- a/drivers/sensor/vcnl4040/vcnl4040.c
+++ b/drivers/sensor/vcnl4040/vcnl4040.c
@@ -218,8 +218,8 @@
#endif
#ifdef CONFIG_PM_DEVICE
-static int vcnl4040_device_ctrl(const struct device *dev,
- enum pm_device_action action)
+static int vcnl4040_pm_action(const struct device *dev,
+ enum pm_device_action action)
{
int ret = 0;
uint16_t ps_conf;
@@ -364,5 +364,5 @@
static struct vcnl4040_data vcnl4040_data;
DEVICE_DT_INST_DEFINE(0, vcnl4040_init,
- vcnl4040_device_ctrl, &vcnl4040_data, &vcnl4040_config,
+ vcnl4040_pm_action, &vcnl4040_data, &vcnl4040_config,
POST_KERNEL, CONFIG_SENSOR_INIT_PRIORITY, &vcnl4040_driver_api);
diff --git a/drivers/serial/uart_cc13xx_cc26xx.c b/drivers/serial/uart_cc13xx_cc26xx.c
index fb53130..0deece2 100644
--- a/drivers/serial/uart_cc13xx_cc26xx.c
+++ b/drivers/serial/uart_cc13xx_cc26xx.c
@@ -397,8 +397,8 @@
#endif
#ifdef CONFIG_PM_DEVICE
-static int uart_cc13xx_cc26xx_pm_control(const struct device *dev,
- enum pm_device_action action)
+static int uart_cc13xx_cc26xx_pm_action(const struct device *dev,
+ enum pm_device_action action)
{
int ret = 0;
@@ -537,7 +537,7 @@
#define UART_CC13XX_CC26XX_DEVICE_DEFINE(n) \
DEVICE_DT_INST_DEFINE(n, \
uart_cc13xx_cc26xx_init_##n, \
- uart_cc13xx_cc26xx_pm_control, \
+ uart_cc13xx_cc26xx_pm_action, \
&uart_cc13xx_cc26xx_data_##n, &uart_cc13xx_cc26xx_config_##n,\
PRE_KERNEL_1, CONFIG_SERIAL_INIT_PRIORITY, \
&uart_cc13xx_cc26xx_driver_api)
diff --git a/drivers/serial/uart_neorv32.c b/drivers/serial/uart_neorv32.c
index f255f7a..504381b 100644
--- a/drivers/serial/uart_neorv32.c
+++ b/drivers/serial/uart_neorv32.c
@@ -440,7 +440,8 @@
}
#ifdef CONFIG_PM_DEVICE
-static int neorv32_uart_pm_control(const struct device *dev, enum pm_device_action action)
+static int neorv32_uart_pm_action(const struct device *dev,
+ enum pm_device_action action)
{
uint32_t ctrl = neorv32_uart_read_ctrl(dev);
@@ -484,9 +485,9 @@
};
#ifdef CONFIG_PM_DEVICE
-#define NEORV32_UART_PM_CONTROL_FUNC neorv32_uart_pm_control
+#define NEORV32_UART_PM_ACTION_CB neorv32_uart_pm_action
#else /* CONFIG_PM_DEVICE */
-#define NEORV32_UART_PM_CONTROL_FUNC NULL
+#define NEORV32_UART_PM_ACTION_CB NULL
#endif /* ! CONFIG_PM_DEVICE */
#ifdef CONFIG_UART_INTERRUPT_DRIVEN
@@ -536,7 +537,7 @@
}; \
\
DEVICE_DT_DEFINE(node_id, &neorv32_uart_init, \
- NEORV32_UART_PM_CONTROL_FUNC, \
+ NEORV32_UART_PM_ACTION_CB, \
&neorv32_uart_##n##_data, \
&neorv32_uart_##n##_config, \
PRE_KERNEL_1, \
diff --git a/drivers/serial/uart_npcx.c b/drivers/serial/uart_npcx.c
index a6448f6..0968aca 100644
--- a/drivers/serial/uart_npcx.c
+++ b/drivers/serial/uart_npcx.c
@@ -438,8 +438,8 @@
return 0;
}
-static inline int uart_npcx_pm_control(const struct device *dev,
- enum pm_device_action action)
+static inline int uart_npcx_pm_action(const struct device *dev,
+ enum pm_device_action action)
{
/* If next device power state is SUSPEND power state */
switch (action) {
@@ -504,7 +504,7 @@
\
DEVICE_DT_INST_DEFINE(inst, \
&uart_npcx_init, \
- uart_npcx_pm_control, \
+ uart_npcx_pm_action, \
&uart_npcx_data_##inst, &uart_npcx_cfg_##inst, \
PRE_KERNEL_1, CONFIG_SERIAL_INIT_PRIORITY, \
&uart_npcx_driver_api); \
diff --git a/drivers/serial/uart_nrfx_uart.c b/drivers/serial/uart_nrfx_uart.c
index 781ea5f..f469b9b 100644
--- a/drivers/serial/uart_nrfx_uart.c
+++ b/drivers/serial/uart_nrfx_uart.c
@@ -1142,8 +1142,8 @@
}
}
-static int uart_nrfx_pm_control(const struct device *dev,
- enum pm_device_action action)
+static int uart_nrfx_pm_action(const struct device *dev,
+ enum pm_device_action action)
{
switch (action) {
case PM_DEVICE_ACTION_RESUME:
@@ -1183,7 +1183,7 @@
DEVICE_DT_INST_DEFINE(0,
uart_nrfx_init,
- uart_nrfx_pm_control,
+ uart_nrfx_pm_action,
&uart_nrfx_uart0_data,
NULL,
/* Initialize UART device before UART console. */
diff --git a/drivers/serial/uart_nrfx_uarte.c b/drivers/serial/uart_nrfx_uarte.c
index 005d858..826dc10 100644
--- a/drivers/serial/uart_nrfx_uarte.c
+++ b/drivers/serial/uart_nrfx_uarte.c
@@ -1831,8 +1831,8 @@
}
-static int uarte_nrfx_pm_control(const struct device *dev,
- enum pm_device_action action)
+static int uarte_nrfx_pm_action(const struct device *dev,
+ enum pm_device_action action)
{
NRF_UARTE_Type *uarte = get_uarte_instance(dev);
#if defined(CONFIG_UART_ASYNC_API) || defined(UARTE_INTERRUPT_DRIVEN)
@@ -1999,7 +1999,7 @@
} \
DEVICE_DT_DEFINE(UARTE(idx), \
uarte_##idx##_init, \
- uarte_nrfx_pm_control, \
+ uarte_nrfx_pm_action, \
&uarte_##idx##_data, \
&uarte_##idx##z_config, \
PRE_KERNEL_1, \
diff --git a/drivers/spi/spi_cc13xx_cc26xx.c b/drivers/spi/spi_cc13xx_cc26xx.c
index a95bd9b..1b9b0b2 100644
--- a/drivers/spi/spi_cc13xx_cc26xx.c
+++ b/drivers/spi/spi_cc13xx_cc26xx.c
@@ -208,8 +208,8 @@
}
#ifdef CONFIG_PM_DEVICE
-static int spi_cc13xx_cc26xx_pm_control(const struct device *dev,
- enum pm_device_action action)
+static int spi_cc13xx_cc26xx_pm_action(const struct device *dev,
+ enum pm_device_action action)
{
switch (action) {
case PM_DEVICE_ACTION_RESUME:
@@ -292,7 +292,7 @@
#define SPI_CC13XX_CC26XX_DEVICE_INIT(n) \
DEVICE_DT_INST_DEFINE(n, \
spi_cc13xx_cc26xx_init_##n, \
- spi_cc13xx_cc26xx_pm_control, \
+ spi_cc13xx_cc26xx_pm_action, \
&spi_cc13xx_cc26xx_data_##n, &spi_cc13xx_cc26xx_config_##n, \
POST_KERNEL, CONFIG_SPI_INIT_PRIORITY, \
&spi_cc13xx_cc26xx_driver_api)
diff --git a/drivers/spi/spi_nrfx_spi.c b/drivers/spi/spi_nrfx_spi.c
index cdca4b6..b07d69e 100644
--- a/drivers/spi/spi_nrfx_spi.c
+++ b/drivers/spi/spi_nrfx_spi.c
@@ -273,8 +273,8 @@
#ifdef CONFIG_PM_DEVICE
-static int spi_nrfx_pm_control(const struct device *dev,
- enum pm_device_action action)
+static int spi_nrfx_pm_action(const struct device *dev,
+ enum pm_device_action action)
{
int ret = 0;
struct spi_nrfx_data *data = get_dev_data(dev);
@@ -351,7 +351,7 @@
}; \
DEVICE_DT_DEFINE(SPI(idx), \
spi_##idx##_init, \
- spi_nrfx_pm_control, \
+ spi_nrfx_pm_action, \
&spi_##idx##_data, \
&spi_##idx##z_config, \
POST_KERNEL, CONFIG_SPI_INIT_PRIORITY, \
diff --git a/drivers/spi/spi_nrfx_spim.c b/drivers/spi/spi_nrfx_spim.c
index 6066ebe..f8bf82f 100644
--- a/drivers/spi/spi_nrfx_spim.c
+++ b/drivers/spi/spi_nrfx_spim.c
@@ -330,8 +330,8 @@
};
#ifdef CONFIG_PM_DEVICE
-static int spim_nrfx_pm_control(const struct device *dev,
- enum pm_device_action action)
+static int spim_nrfx_pm_action(const struct device *dev,
+ enum pm_device_action action)
{
int ret = 0;
struct spi_nrfx_data *data = get_dev_data(dev);
@@ -420,7 +420,7 @@
}; \
DEVICE_DT_DEFINE(SPIM(idx), \
spi_##idx##_init, \
- spim_nrfx_pm_control, \
+ spim_nrfx_pm_action, \
&spi_##idx##_data, \
&spi_##idx##z_config, \
POST_KERNEL, CONFIG_SPI_INIT_PRIORITY, \