pm: device: remove ctrl_command callback argument
The ctrl_command is not used anymore, so remove it from the callback signature. Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
This commit is contained in:
parent
da0ff4ae46
commit
9e7d545bb4
42 changed files with 20 additions and 58 deletions
|
@ -499,7 +499,7 @@ static int st7735r_enter_sleep(struct st7735r_data *data)
|
||||||
return st7735r_transmit(data, ST7735R_CMD_SLEEP_IN, NULL, 0);
|
return st7735r_transmit(data, ST7735R_CMD_SLEEP_IN, NULL, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int st7735r_pm_control(const struct device *dev, uint32_t ctrl_command,
|
static int st7735r_pm_control(const struct device *dev,
|
||||||
enum pm_device_state *state)
|
enum pm_device_state *state)
|
||||||
{
|
{
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
|
|
|
@ -401,7 +401,7 @@ static void st7789v_enter_sleep(struct st7789v_data *data)
|
||||||
st7789v_transmit(data, ST7789V_CMD_SLEEP_IN, NULL, 0);
|
st7789v_transmit(data, ST7789V_CMD_SLEEP_IN, NULL, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int st7789v_pm_control(const struct device *dev, uint32_t ctrl_command,
|
static int st7789v_pm_control(const struct device *dev,
|
||||||
enum pm_device_state *state)
|
enum pm_device_state *state)
|
||||||
{
|
{
|
||||||
struct st7789v_data *data = (struct st7789v_data *)dev->data;
|
struct st7789v_data *data = (struct st7789v_data *)dev->data;
|
||||||
|
|
|
@ -291,7 +291,6 @@ static int entropy_cc13xx_cc26xx_set_power_state(const struct device *dev,
|
||||||
}
|
}
|
||||||
|
|
||||||
static int entropy_cc13xx_cc26xx_pm_control(const struct device *dev,
|
static int entropy_cc13xx_cc26xx_pm_control(const struct device *dev,
|
||||||
uint32_t ctrl_command,
|
|
||||||
enum pm_device_state *state)
|
enum pm_device_state *state)
|
||||||
{
|
{
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
|
|
|
@ -185,7 +185,6 @@ static void eth_mcux_phy_enter_reset(struct eth_context *context);
|
||||||
void eth_mcux_phy_stop(struct eth_context *context);
|
void eth_mcux_phy_stop(struct eth_context *context);
|
||||||
|
|
||||||
static int eth_mcux_device_pm_control(const struct device *dev,
|
static int eth_mcux_device_pm_control(const struct device *dev,
|
||||||
uint32_t command,
|
|
||||||
enum pm_device_state *state)
|
enum pm_device_state *state)
|
||||||
{
|
{
|
||||||
struct eth_context *eth_ctx = (struct eth_context *)dev->data;
|
struct eth_context *eth_ctx = (struct eth_context *)dev->data;
|
||||||
|
|
|
@ -625,7 +625,6 @@ static int spi_flash_at45_init(const struct device *dev)
|
||||||
|
|
||||||
#if IS_ENABLED(CONFIG_PM_DEVICE)
|
#if IS_ENABLED(CONFIG_PM_DEVICE)
|
||||||
static int spi_flash_at45_pm_control(const struct device *dev,
|
static int spi_flash_at45_pm_control(const struct device *dev,
|
||||||
uint32_t ctrl_command,
|
|
||||||
enum pm_device_state *state)
|
enum pm_device_state *state)
|
||||||
{
|
{
|
||||||
const struct spi_flash_at45_config *dev_config = get_dev_config(dev);
|
const struct spi_flash_at45_config *dev_config = get_dev_config(dev);
|
||||||
|
|
|
@ -442,7 +442,6 @@ static inline int gpio_dw_resume_from_suspend_port(const struct device *port)
|
||||||
* the *context may include IN data or/and OUT data
|
* the *context may include IN data or/and OUT data
|
||||||
*/
|
*/
|
||||||
static int gpio_dw_device_ctrl(const struct device *port,
|
static int gpio_dw_device_ctrl(const struct device *port,
|
||||||
uint32_t ctrl_command,
|
|
||||||
enum pm_device_state *state)
|
enum pm_device_state *state)
|
||||||
{
|
{
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
|
|
|
@ -595,7 +595,6 @@ static int gpio_stm32_set_power_state(const struct device *dev,
|
||||||
}
|
}
|
||||||
|
|
||||||
static int gpio_stm32_pm_device_ctrl(const struct device *dev,
|
static int gpio_stm32_pm_device_ctrl(const struct device *dev,
|
||||||
uint32_t ctrl_command,
|
|
||||||
enum pm_device_state *state)
|
enum pm_device_state *state)
|
||||||
{
|
{
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
|
|
|
@ -365,7 +365,6 @@ static int i2c_cc13xx_cc26xx_set_power_state(const struct device *dev,
|
||||||
}
|
}
|
||||||
|
|
||||||
static int i2c_cc13xx_cc26xx_pm_control(const struct device *dev,
|
static int i2c_cc13xx_cc26xx_pm_control(const struct device *dev,
|
||||||
uint32_t ctrl_command,
|
|
||||||
enum pm_device_state *state)
|
enum pm_device_state *state)
|
||||||
{
|
{
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
|
|
|
@ -217,7 +217,6 @@ static int init_twi(const struct device *dev)
|
||||||
|
|
||||||
#ifdef CONFIG_PM_DEVICE
|
#ifdef CONFIG_PM_DEVICE
|
||||||
static int twi_nrfx_pm_control(const struct device *dev,
|
static int twi_nrfx_pm_control(const struct device *dev,
|
||||||
uint32_t ctrl_command,
|
|
||||||
enum pm_device_state *state)
|
enum pm_device_state *state)
|
||||||
{
|
{
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
|
|
|
@ -255,7 +255,6 @@ static int init_twim(const struct device *dev)
|
||||||
|
|
||||||
#ifdef CONFIG_PM_DEVICE
|
#ifdef CONFIG_PM_DEVICE
|
||||||
static int twim_nrfx_pm_control(const struct device *dev,
|
static int twim_nrfx_pm_control(const struct device *dev,
|
||||||
uint32_t ctrl_command,
|
|
||||||
enum pm_device_state *state)
|
enum pm_device_state *state)
|
||||||
{
|
{
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
|
|
|
@ -175,7 +175,6 @@ static int arc_v2_irq_unit_resume(const struct device *dev)
|
||||||
* @return operation result
|
* @return operation result
|
||||||
*/
|
*/
|
||||||
static int arc_v2_irq_unit_device_ctrl(const struct device *dev,
|
static int arc_v2_irq_unit_device_ctrl(const struct device *dev,
|
||||||
uint32_t ctrl_command,
|
|
||||||
enum pm_device_state *state)
|
enum pm_device_state *state)
|
||||||
{
|
{
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
|
|
|
@ -310,7 +310,6 @@ int ioapic_resume_from_suspend(const struct device *port)
|
||||||
*/
|
*/
|
||||||
__pinned_func
|
__pinned_func
|
||||||
static int ioapic_device_ctrl(const struct device *dev,
|
static int ioapic_device_ctrl(const struct device *dev,
|
||||||
uint32_t ctrl_command,
|
|
||||||
enum pm_device_state *state)
|
enum pm_device_state *state)
|
||||||
{
|
{
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
|
|
|
@ -409,7 +409,6 @@ int loapic_resume(const struct device *port)
|
||||||
*/
|
*/
|
||||||
__pinned_func
|
__pinned_func
|
||||||
static int loapic_device_ctrl(const struct device *port,
|
static int loapic_device_ctrl(const struct device *port,
|
||||||
uint32_t ctrl_command,
|
|
||||||
enum pm_device_state *state)
|
enum pm_device_state *state)
|
||||||
{
|
{
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
|
|
|
@ -142,7 +142,7 @@ static int led_pwm_pm_set_state(const struct device *dev,
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int led_pwm_pm_control(const struct device *dev, uint32_t ctrl_command,
|
static int led_pwm_pm_control(const struct device *dev,
|
||||||
enum pm_device_state *state)
|
enum pm_device_state *state)
|
||||||
{
|
{
|
||||||
return led_pwm_pm_set_state(dev, *state);
|
return led_pwm_pm_set_state(dev, *state);
|
||||||
|
|
|
@ -318,7 +318,6 @@ static int pwm_nrfx_set_power_state(enum pm_device_state new_state,
|
||||||
}
|
}
|
||||||
|
|
||||||
static int pwm_nrfx_pm_control(const struct device *dev,
|
static int pwm_nrfx_pm_control(const struct device *dev,
|
||||||
uint32_t ctrl_command,
|
|
||||||
enum pm_device_state *state)
|
enum pm_device_state *state)
|
||||||
{
|
{
|
||||||
int err = 0;
|
int err = 0;
|
||||||
|
@ -334,10 +333,9 @@ static int pwm_nrfx_pm_control(const struct device *dev,
|
||||||
|
|
||||||
#define PWM_NRFX_PM_CONTROL(idx) \
|
#define PWM_NRFX_PM_CONTROL(idx) \
|
||||||
static int pwm_##idx##_nrfx_pm_control(const struct device *dev, \
|
static int pwm_##idx##_nrfx_pm_control(const struct device *dev, \
|
||||||
uint32_t ctrl_command, \
|
|
||||||
enum pm_device_state *state) \
|
enum pm_device_state *state) \
|
||||||
{ \
|
{ \
|
||||||
return pwm_nrfx_pm_control(dev, ctrl_command, state) \
|
return pwm_nrfx_pm_control(dev, state) \
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
|
|
||||||
|
|
|
@ -409,7 +409,6 @@ static int apds9960_init_interrupt(const struct device *dev)
|
||||||
|
|
||||||
#ifdef CONFIG_PM_DEVICE
|
#ifdef CONFIG_PM_DEVICE
|
||||||
static int apds9960_device_ctrl(const struct device *dev,
|
static int apds9960_device_ctrl(const struct device *dev,
|
||||||
uint32_t ctrl_command,
|
|
||||||
enum pm_device_state *state)
|
enum pm_device_state *state)
|
||||||
{
|
{
|
||||||
const struct apds9960_config *config = dev->config;
|
const struct apds9960_config *config = dev->config;
|
||||||
|
|
|
@ -410,8 +410,7 @@ static int bme280_chip_init(const struct device *dev)
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_PM_DEVICE
|
#ifdef CONFIG_PM_DEVICE
|
||||||
int bme280_pm_ctrl(const struct device *dev, uint32_t ctrl_command,
|
int bme280_pm_ctrl(const struct device *dev, enum pm_device_state *state)
|
||||||
enum pm_device_state *state)
|
|
||||||
{
|
{
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
enum pm_device_state curr_state;
|
enum pm_device_state curr_state;
|
||||||
|
|
|
@ -583,7 +583,6 @@ static int bmp388_set_power_state(const struct device *dev,
|
||||||
|
|
||||||
static int bmp388_device_ctrl(
|
static int bmp388_device_ctrl(
|
||||||
const struct device *dev,
|
const struct device *dev,
|
||||||
uint32_t ctrl_command,
|
|
||||||
enum pm_device_state *state)
|
enum pm_device_state *state)
|
||||||
{
|
{
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
|
|
|
@ -731,7 +731,7 @@ static int bq274xx_exit_shutdown_mode(const struct device *dev)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int bq274xx_pm_control(const struct device *dev, uint32_t ctrl_command,
|
static int bq274xx_pm_control(const struct device *dev,
|
||||||
enum pm_device_state *state)
|
enum pm_device_state *state)
|
||||||
{
|
{
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
|
|
|
@ -535,7 +535,6 @@ static int fdc2x1x_set_pm_state(const struct device *dev,
|
||||||
}
|
}
|
||||||
|
|
||||||
static int fdc2x1x_device_pm_ctrl(const struct device *dev,
|
static int fdc2x1x_device_pm_ctrl(const struct device *dev,
|
||||||
uint32_t ctrl_command,
|
|
||||||
enum pm_device_state *state)
|
enum pm_device_state *state)
|
||||||
{
|
{
|
||||||
struct fdc2x1x_data *data = dev->data;
|
struct fdc2x1x_data *data = dev->data;
|
||||||
|
|
|
@ -475,7 +475,7 @@ static int lis2mdl_set_power_state(struct lis2mdl_data *lis2mdl,
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int lis2mdl_pm_control(const struct device *dev, uint32_t ctrl_command,
|
static int lis2mdl_pm_control(const struct device *dev,
|
||||||
enum pm_device_state *state)
|
enum pm_device_state *state)
|
||||||
{
|
{
|
||||||
struct lis2mdl_data *lis2mdl = dev->data;
|
struct lis2mdl_data *lis2mdl = dev->data;
|
||||||
|
|
|
@ -240,7 +240,6 @@ static int qdec_nrfx_pm_set_state(struct qdec_nrfx_data *data,
|
||||||
}
|
}
|
||||||
|
|
||||||
static int qdec_nrfx_pm_control(const struct device *dev,
|
static int qdec_nrfx_pm_control(const struct device *dev,
|
||||||
uint32_t ctrl_command,
|
|
||||||
enum pm_device_state *state)
|
enum pm_device_state *state)
|
||||||
{
|
{
|
||||||
struct qdec_nrfx_data *data = &qdec_nrfx_data;
|
struct qdec_nrfx_data *data = &qdec_nrfx_data;
|
||||||
|
|
|
@ -218,9 +218,7 @@ static int sgp40_set_power_state(const struct device *dev,
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int sgp40_pm_ctrl(const struct device *dev,
|
static int sgp40_pm_ctrl(const struct device *dev, enum pm_device_state *state)
|
||||||
uint32_t ctrl_command,
|
|
||||||
enum pm_device_state *state)
|
|
||||||
{
|
{
|
||||||
return sgp40_set_power_state(dev, *state);
|
return sgp40_set_power_state(dev, *state);
|
||||||
}
|
}
|
||||||
|
|
|
@ -219,7 +219,6 @@ static int vcnl4040_ambient_setup(const struct device *dev)
|
||||||
|
|
||||||
#ifdef CONFIG_PM_DEVICE
|
#ifdef CONFIG_PM_DEVICE
|
||||||
static int vcnl4040_device_ctrl(const struct device *dev,
|
static int vcnl4040_device_ctrl(const struct device *dev,
|
||||||
uint32_t ctrl_command,
|
|
||||||
enum pm_device_state *state)
|
enum pm_device_state *state)
|
||||||
{
|
{
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
|
|
|
@ -441,7 +441,6 @@ static int uart_cc13xx_cc26xx_set_power_state(const struct device *dev,
|
||||||
}
|
}
|
||||||
|
|
||||||
static int uart_cc13xx_cc26xx_pm_control(const struct device *dev,
|
static int uart_cc13xx_cc26xx_pm_control(const struct device *dev,
|
||||||
uint32_t ctrl_command,
|
|
||||||
enum pm_device_state *state)
|
enum pm_device_state *state)
|
||||||
{
|
{
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
|
|
|
@ -457,7 +457,7 @@ static inline int uart_npcx_set_power_state(const struct device *dev,
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Implements the device power management control functionality */
|
/* Implements the device power management control functionality */
|
||||||
static int uart_npcx_pm_control(const struct device *dev, uint32_t ctrl_command,
|
static int uart_npcx_pm_control(const struct device *dev,
|
||||||
enum pm_device_state *state)
|
enum pm_device_state *state)
|
||||||
{
|
{
|
||||||
return uart_npcx_set_power_state(dev, *state);
|
return uart_npcx_set_power_state(dev, *state);
|
||||||
|
|
|
@ -1159,7 +1159,6 @@ static void uart_nrfx_set_power_state(const struct device *dev,
|
||||||
}
|
}
|
||||||
|
|
||||||
static int uart_nrfx_pm_control(const struct device *dev,
|
static int uart_nrfx_pm_control(const struct device *dev,
|
||||||
uint32_t ctrl_command,
|
|
||||||
enum pm_device_state *state)
|
enum pm_device_state *state)
|
||||||
{
|
{
|
||||||
enum pm_device_state current_state;
|
enum pm_device_state current_state;
|
||||||
|
|
|
@ -1922,7 +1922,6 @@ static void uarte_nrfx_set_power_state(const struct device *dev,
|
||||||
}
|
}
|
||||||
|
|
||||||
static int uarte_nrfx_pm_control(const struct device *dev,
|
static int uarte_nrfx_pm_control(const struct device *dev,
|
||||||
uint32_t ctrl_command,
|
|
||||||
enum pm_device_state *state)
|
enum pm_device_state *state)
|
||||||
{
|
{
|
||||||
enum pm_device_state curr_state;
|
enum pm_device_state curr_state;
|
||||||
|
|
|
@ -1460,7 +1460,6 @@ static int uart_stm32_set_power_state(const struct device *dev,
|
||||||
* @return 0
|
* @return 0
|
||||||
*/
|
*/
|
||||||
static int uart_stm32_pm_control(const struct device *dev,
|
static int uart_stm32_pm_control(const struct device *dev,
|
||||||
uint32_t ctrl_command,
|
|
||||||
enum pm_device_state *state)
|
enum pm_device_state *state)
|
||||||
{
|
{
|
||||||
enum pm_device_state curr_state;
|
enum pm_device_state curr_state;
|
||||||
|
|
|
@ -248,7 +248,6 @@ static int spi_cc13xx_cc26xx_set_power_state(const struct device *dev,
|
||||||
}
|
}
|
||||||
|
|
||||||
static int spi_cc13xx_cc26xx_pm_control(const struct device *dev,
|
static int spi_cc13xx_cc26xx_pm_control(const struct device *dev,
|
||||||
uint32_t ctrl_command,
|
|
||||||
enum pm_device_state *state)
|
enum pm_device_state *state)
|
||||||
{
|
{
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
|
|
|
@ -278,7 +278,6 @@ static int init_spi(const struct device *dev)
|
||||||
|
|
||||||
#ifdef CONFIG_PM_DEVICE
|
#ifdef CONFIG_PM_DEVICE
|
||||||
static int spi_nrfx_pm_control(const struct device *dev,
|
static int spi_nrfx_pm_control(const struct device *dev,
|
||||||
uint32_t ctrl_command,
|
|
||||||
enum pm_device_state *state)
|
enum pm_device_state *state)
|
||||||
{
|
{
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
|
|
|
@ -325,7 +325,6 @@ static int init_spim(const struct device *dev)
|
||||||
|
|
||||||
#ifdef CONFIG_PM_DEVICE
|
#ifdef CONFIG_PM_DEVICE
|
||||||
static int spim_nrfx_pm_control(const struct device *dev,
|
static int spim_nrfx_pm_control(const struct device *dev,
|
||||||
uint32_t ctrl_command,
|
|
||||||
enum pm_device_state *state)
|
enum pm_device_state *state)
|
||||||
{
|
{
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
|
|
|
@ -31,7 +31,6 @@ int __weak sys_clock_driver_init(const struct device *dev)
|
||||||
}
|
}
|
||||||
|
|
||||||
int __weak sys_clock_device_ctrl(const struct device *dev,
|
int __weak sys_clock_device_ctrl(const struct device *dev,
|
||||||
uint32_t ctrl_command,
|
|
||||||
enum pm_device_state *state)
|
enum pm_device_state *state)
|
||||||
{
|
{
|
||||||
return -ENOSYS;
|
return -ENOSYS;
|
||||||
|
|
|
@ -384,7 +384,7 @@ struct device {
|
||||||
const device_handle_t *const handles;
|
const device_handle_t *const handles;
|
||||||
#ifdef CONFIG_PM_DEVICE
|
#ifdef CONFIG_PM_DEVICE
|
||||||
/** Power Management function */
|
/** Power Management function */
|
||||||
int (*pm_control)(const struct device *dev, uint32_t command,
|
int (*pm_control)(const struct device *dev,
|
||||||
enum pm_device_state *state);
|
enum pm_device_state *state);
|
||||||
/** Pointer to device instance power management data */
|
/** Pointer to device instance power management data */
|
||||||
struct pm_device * const pm;
|
struct pm_device * const pm;
|
||||||
|
|
|
@ -46,7 +46,7 @@ extern int sys_clock_driver_init(const struct device *dev);
|
||||||
* management. It is a weak symbol that will be implemented as a noop
|
* management. It is a weak symbol that will be implemented as a noop
|
||||||
* if undefined in the clock driver.
|
* if undefined in the clock driver.
|
||||||
*/
|
*/
|
||||||
extern int clock_device_ctrl(const struct device *dev, uint32_t ctrl_command,
|
extern int clock_device_ctrl(const struct device *dev,
|
||||||
enum pm_device_state *state);
|
enum pm_device_state *state);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -62,11 +62,6 @@ enum pm_device_state {
|
||||||
PM_DEVICE_STATE_SUSPENDING,
|
PM_DEVICE_STATE_SUSPENDING,
|
||||||
};
|
};
|
||||||
|
|
||||||
/** Device PM set state control command. */
|
|
||||||
#define PM_DEVICE_STATE_SET 0
|
|
||||||
/** Device PM get state control command. */
|
|
||||||
#define PM_DEVICE_STATE_GET 1
|
|
||||||
|
|
||||||
/** @brief Device PM flags. */
|
/** @brief Device PM flags. */
|
||||||
enum pm_device_flag {
|
enum pm_device_flag {
|
||||||
/** Indicate if the device is busy or not. */
|
/** Indicate if the device is busy or not. */
|
||||||
|
|
|
@ -87,7 +87,6 @@ static int dummy_close(const struct device *dev)
|
||||||
}
|
}
|
||||||
|
|
||||||
static int dummy_device_pm_ctrl(const struct device *dev,
|
static int dummy_device_pm_ctrl(const struct device *dev,
|
||||||
uint32_t ctrl_command,
|
|
||||||
enum pm_device_state *state)
|
enum pm_device_state *state)
|
||||||
{
|
{
|
||||||
if (*state == PM_DEVICE_STATE_ACTIVE) {
|
if (*state == PM_DEVICE_STATE_ACTIVE) {
|
||||||
|
|
|
@ -25,7 +25,6 @@ static int dummy_transfer(const struct device *dev, uint32_t cmd,
|
||||||
}
|
}
|
||||||
|
|
||||||
static int dummy_parent_pm_ctrl(const struct device *dev,
|
static int dummy_parent_pm_ctrl(const struct device *dev,
|
||||||
uint32_t ctrl_command,
|
|
||||||
enum pm_device_state *state)
|
enum pm_device_state *state)
|
||||||
{
|
{
|
||||||
if (*state == PM_DEVICE_STATE_ACTIVE) {
|
if (*state == PM_DEVICE_STATE_ACTIVE) {
|
||||||
|
|
|
@ -137,7 +137,7 @@ int pm_device_state_set(const struct device *dev,
|
||||||
return -ENOSYS;
|
return -ENOSYS;
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = dev->pm_control(dev, PM_DEVICE_STATE_SET, &device_power_state);
|
ret = dev->pm_control(dev, &device_power_state);
|
||||||
if (ret < 0) {
|
if (ret < 0) {
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,7 +21,7 @@ struct fake_dev_context {
|
||||||
struct net_if *iface;
|
struct net_if *iface;
|
||||||
};
|
};
|
||||||
|
|
||||||
static int fake_dev_pm_control(const struct device *dev, uint32_t command,
|
static int fake_dev_pm_control(const struct device *dev,
|
||||||
enum pm_device_state *state)
|
enum pm_device_state *state)
|
||||||
{
|
{
|
||||||
struct fake_dev_context *ctx = dev->data;
|
struct fake_dev_context *ctx = dev->data;
|
||||||
|
|
|
@ -35,7 +35,6 @@ static int dummy_close_sync(const struct device *dev)
|
||||||
}
|
}
|
||||||
|
|
||||||
static int dummy_device_pm_ctrl(const struct device *dev,
|
static int dummy_device_pm_ctrl(const struct device *dev,
|
||||||
uint32_t ctrl_command,
|
|
||||||
enum pm_device_state *state)
|
enum pm_device_state *state)
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
@ -20,7 +20,6 @@ static int dummy_close(const struct device *dev)
|
||||||
}
|
}
|
||||||
|
|
||||||
static int dummy_device_pm_ctrl(const struct device *dev,
|
static int dummy_device_pm_ctrl(const struct device *dev,
|
||||||
uint32_t ctrl_command,
|
|
||||||
enum pm_device_state *state)
|
enum pm_device_state *state)
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue