pm: remove redundant callback usage

the device PM callback is not used anymore by the device PM subsystem,
so remove it from all drivers/tests using it.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
This commit is contained in:
Gerard Marull-Paretas 2021-06-04 11:15:54 +02:00 committed by Christopher Friedt
commit 217e610d8f
35 changed files with 0 additions and 128 deletions

View file

@ -553,10 +553,6 @@ static int st7735r_pm_control(const struct device *dev, uint32_t ctrl_command,
ret = -EINVAL; ret = -EINVAL;
} }
if (cb != NULL) {
cb(dev, ret, state, arg);
}
return ret; return ret;
} }
#endif /* CONFIG_PM_DEVICE */ #endif /* CONFIG_PM_DEVICE */

View file

@ -433,9 +433,6 @@ static int st7789v_pm_control(const struct device *dev, uint32_t ctrl_command,
ret = -EINVAL; ret = -EINVAL;
} }
if (cb != NULL) {
cb(dev, ret, state, arg);
}
return ret; return ret;
} }
#endif /* CONFIG_PM_DEVICE */ #endif /* CONFIG_PM_DEVICE */

View file

@ -312,10 +312,6 @@ static int entropy_cc13xx_cc26xx_pm_control(const struct device *dev,
*state = data->pm_state; *state = data->pm_state;
} }
if (cb) {
cb(dev, ret, state, arg);
}
return ret; return ret;
} }
#endif /* CONFIG_PM_DEVICE */ #endif /* CONFIG_PM_DEVICE */

View file

@ -228,9 +228,6 @@ static int eth_mcux_device_pm_control(const struct device *dev,
} }
out: out:
if (cb) {
cb(dev, ret, state, arg);
}
return ret; return ret;
} }

View file

@ -670,10 +670,6 @@ static int spi_flash_at45_pm_control(const struct device *dev,
*state = dev_data->pm_state; *state = dev_data->pm_state;
} }
if (cb) {
cb(dev, err, state, arg);
}
return err; return err;
} }
#endif /* IS_ENABLED(CONFIG_PM_DEVICE) */ #endif /* IS_ENABLED(CONFIG_PM_DEVICE) */

View file

@ -475,9 +475,6 @@ static int gpio_dw_device_ctrl(const struct device *port,
*state = gpio_dw_get_power_state(port); *state = gpio_dw_get_power_state(port);
} }
if (cb) {
cb(port, ret, state, arg);
}
return ret; return ret;
} }

View file

@ -626,10 +626,6 @@ static int gpio_stm32_pm_device_ctrl(const struct device *dev,
} }
if (cb) {
cb(dev, ret, state, arg);
}
return ret; return ret;
} }
#endif /* CONFIG_PM_DEVICE */ #endif /* CONFIG_PM_DEVICE */

View file

@ -386,10 +386,6 @@ static int i2c_cc13xx_cc26xx_pm_control(const struct device *dev,
*state = get_dev_data(dev)->pm_state; *state = get_dev_data(dev)->pm_state;
} }
if (cb) {
cb(dev, ret, state, arg);
}
return ret; return ret;
} }
#endif /* CONFIG_PM_DEVICE */ #endif /* CONFIG_PM_DEVICE */

View file

@ -263,10 +263,6 @@ static int twi_nrfx_pm_control(const struct device *dev,
*state = get_dev_data(dev)->pm_state; *state = get_dev_data(dev)->pm_state;
} }
if (cb) {
cb(dev, ret, state, arg);
}
return ret; return ret;
} }
#endif /* CONFIG_PM_DEVICE */ #endif /* CONFIG_PM_DEVICE */

View file

@ -303,10 +303,6 @@ static int twim_nrfx_pm_control(const struct device *dev,
*state = get_dev_data(dev)->pm_state; *state = get_dev_data(dev)->pm_state;
} }
if (cb) {
cb(dev, ret, state, arg);
}
return ret; return ret;
} }
#endif /* CONFIG_PM_DEVICE */ #endif /* CONFIG_PM_DEVICE */

View file

@ -212,10 +212,6 @@ static int arc_v2_irq_unit_device_ctrl(const struct device *dev,
arch_irq_unlock(key); arch_irq_unlock(key);
if (cb) {
cb(dev, ret, state, arg);
}
return ret; return ret;
} }

View file

@ -346,10 +346,6 @@ static int ioapic_device_ctrl(const struct device *dev,
*state = ioapic_device_power_state; *state = ioapic_device_power_state;
} }
if (cb) {
cb(dev, ret, state, arg);
}
return ret; return ret;
} }

View file

@ -429,10 +429,6 @@ static int loapic_device_ctrl(const struct device *port,
*state = loapic_device_power_state; *state = loapic_device_power_state;
} }
if (cb) {
cb(port, ret, state, arg);
}
return ret; return ret;
} }

View file

@ -196,10 +196,6 @@ static int led_pwm_pm_control(const struct device *dev, uint32_t ctrl_command,
break; break;
} }
if (cb) {
cb(dev, err, state, arg);
}
return err; return err;
} }

View file

@ -354,9 +354,6 @@ static int pwm_nrfx_pm_control(const struct device *dev,
int ret = 0; \ int ret = 0; \
ret = pwm_nrfx_pm_control(dev, ctrl_command, state, \ ret = pwm_nrfx_pm_control(dev, ctrl_command, state, \
&current_state); \ &current_state); \
if (cb) { \
cb(dev, ret, state, arg); \
} \
return ret; \ return ret; \
} }
#else #else

View file

@ -444,10 +444,6 @@ static int apds9960_device_ctrl(const struct device *dev,
*state = PM_DEVICE_STATE_ACTIVE; *state = PM_DEVICE_STATE_ACTIVE;
} }
if (cb) {
cb(dev, ret, state, arg);
}
return ret; return ret;
} }
#endif #endif

View file

@ -431,10 +431,6 @@ int bme280_pm_ctrl(const struct device *dev, uint32_t ctrl_command,
*state = data->pm_state; *state = data->pm_state;
} }
/* Invoke callback if any */
if (cb)
cb(dev, ret, state, arg);
return ret; return ret;
} }
#endif /* CONFIG_PM_DEVICE */ #endif /* CONFIG_PM_DEVICE */

View file

@ -600,9 +600,6 @@ static int bmp388_device_ctrl(
*state = bmp388_get_power_state(dev); *state = bmp388_get_power_state(dev);
} }
if (cb) {
cb(dev, ret, state, arg);
}
return ret; return ret;
} }
#endif /* CONFIG_PM_DEVICE */ #endif /* CONFIG_PM_DEVICE */

View file

@ -566,10 +566,6 @@ static int fdc2x1x_device_pm_ctrl(const struct device *dev,
*state = data->pm_state; *state = data->pm_state;
} }
if (cb) {
cb(dev, ret, state, arg);
}
return ret; return ret;
} }
#endif #endif

View file

@ -507,10 +507,6 @@ static int lis2mdl_pm_control(const struct device *dev, uint32_t ctrl_command,
status = -EINVAL; status = -EINVAL;
} }
if (cb) {
cb(dev, status, state, arg);
}
return status; return status;
} }
#endif /* CONFIG_PM_DEVICE */ #endif /* CONFIG_PM_DEVICE */

View file

@ -289,10 +289,6 @@ static int qdec_nrfx_pm_control(const struct device *dev,
break; break;
} }
if (cb) {
cb(dev, err, state, arg);
}
return err; return err;
} }

View file

@ -278,10 +278,6 @@ static int vcnl4040_device_ctrl(const struct device *dev,
*state = PM_DEVICE_STATE_ACTIVE; *state = PM_DEVICE_STATE_ACTIVE;
} }
if (cb) {
cb(dev, ret, state, arg);
}
return ret; return ret;
} }
#endif #endif

View file

@ -464,10 +464,6 @@ static int uart_cc13xx_cc26xx_pm_control(const struct device *dev,
*state = get_dev_data(dev)->pm_state; *state = get_dev_data(dev)->pm_state;
} }
if (cb) {
cb(dev, ret, state, arg);
}
return ret; return ret;
} }
#endif /* CONFIG_PM_DEVICE */ #endif /* CONFIG_PM_DEVICE */

View file

@ -488,9 +488,6 @@ static int uart_npcx_pm_control(const struct device *dev, uint32_t ctrl_command,
ret = -EINVAL; ret = -EINVAL;
} }
if (cb != NULL) {
cb(dev, ret, state, arg);
}
return ret; return ret;
} }
#endif /* CONFIG_PM_DEVICE */ #endif /* CONFIG_PM_DEVICE */

View file

@ -1176,10 +1176,6 @@ static int uart_nrfx_pm_control(const struct device *dev,
*state = current_state; *state = current_state;
} }
if (cb) {
cb(dev, 0, state, arg);
}
return 0; return 0;
} }
#endif /* CONFIG_PM_DEVICE */ #endif /* CONFIG_PM_DEVICE */

View file

@ -1933,10 +1933,6 @@ static int uarte_nrfx_pm_control(const struct device *dev,
*state = data->pm_state; *state = data->pm_state;
} }
if (cb) {
cb(dev, 0, state, arg);
}
return 0; return 0;
} }
#endif /* CONFIG_PM_DEVICE */ #endif /* CONFIG_PM_DEVICE */

View file

@ -1481,10 +1481,6 @@ static int uart_stm32_pm_control(const struct device *dev,
*state = data->pm_state; *state = data->pm_state;
} }
if (cb) {
cb(dev, 0, state, arg);
}
return 0; return 0;
} }
#endif /* CONFIG_PM_DEVICE */ #endif /* CONFIG_PM_DEVICE */

View file

@ -269,10 +269,6 @@ static int spi_cc13xx_cc26xx_pm_control(const struct device *dev,
*state = get_dev_data(dev)->pm_state; *state = get_dev_data(dev)->pm_state;
} }
if (cb) {
cb(dev, ret, state, arg);
}
return ret; return ret;
} }
#endif /* CONFIG_PM_DEVICE */ #endif /* CONFIG_PM_DEVICE */

View file

@ -323,10 +323,6 @@ static int spi_nrfx_pm_control(const struct device *dev,
*state = data->pm_state; *state = data->pm_state;
} }
if (cb) {
cb(dev, ret, state, arg);
}
return ret; return ret;
} }
#endif /* CONFIG_PM_DEVICE */ #endif /* CONFIG_PM_DEVICE */

View file

@ -371,10 +371,6 @@ static int spim_nrfx_pm_control(const struct device *dev,
*state = data->pm_state; *state = data->pm_state;
} }
if (cb) {
cb(dev, ret, state, arg);
}
return ret; return ret;
} }
#endif /* CONFIG_PM_DEVICE */ #endif /* CONFIG_PM_DEVICE */

View file

@ -129,8 +129,6 @@ static int dummy_device_pm_ctrl(const struct device *dev,
} }
cb(dev, ret, state, arg);
return ret; return ret;
} }

View file

@ -69,7 +69,6 @@ static int dummy_parent_pm_ctrl(const struct device *dev,
} }
cb(dev, ret, state, arg);
return ret; return ret;
} }

View file

@ -42,9 +42,6 @@ static int fake_dev_pm_control(const struct device *dev, uint32_t command,
} }
out: out:
if (cb) {
cb(dev, ret, state, arg);
}
return ret; return ret;
} }

View file

@ -75,10 +75,6 @@ static int dummy_device_pm_ctrl(const struct device *dev,
} }
if (cb) {
cb(dev, ret, state, arg);
}
return ret; return ret;
} }

View file

@ -61,10 +61,6 @@ static int dummy_device_pm_ctrl(const struct device *dev,
} }
if (cb) {
cb(dev, ret, state, arg);
}
return ret; return ret;
} }