pm: replace DEVICE_PM_* states with PM_DEVICE_*
Prefix device PM states with PM. Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
This commit is contained in:
parent
2d39c01592
commit
2c7b763e47
52 changed files with 331 additions and 331 deletions
|
@ -1410,7 +1410,7 @@ static int uart_stm32_init(const struct device *dev)
|
|||
config->uconf.irq_config_func(dev);
|
||||
#endif
|
||||
#ifdef CONFIG_PM_DEVICE
|
||||
data->pm_state = DEVICE_PM_ACTIVE_STATE;
|
||||
data->pm_state = PM_DEVICE_ACTIVE_STATE;
|
||||
#endif /* CONFIG_PM_DEVICE */
|
||||
|
||||
#ifdef CONFIG_UART_ASYNC_API
|
||||
|
@ -1428,7 +1428,7 @@ static int uart_stm32_set_power_state(const struct device *dev,
|
|||
struct uart_stm32_data *data = DEV_DATA(dev);
|
||||
|
||||
/* setting a low power mode */
|
||||
if (new_state != DEVICE_PM_ACTIVE_STATE) {
|
||||
if (new_state != PM_DEVICE_ACTIVE_STATE) {
|
||||
#ifdef USART_ISR_BUSY
|
||||
/* Make sure that no USART transfer is on-going */
|
||||
while (LL_USART_IsActiveFlag_BUSY(UartInstance) == 1) {
|
||||
|
@ -1466,14 +1466,14 @@ static int uart_stm32_pm_control(const struct device *dev,
|
|||
{
|
||||
struct uart_stm32_data *data = DEV_DATA(dev);
|
||||
|
||||
if (ctrl_command == DEVICE_PM_SET_POWER_STATE) {
|
||||
if (ctrl_command == PM_DEVICE_SET_POWER_STATE) {
|
||||
uint32_t new_state = *((const uint32_t *)context);
|
||||
|
||||
if (new_state != data->pm_state) {
|
||||
uart_stm32_set_power_state(dev, new_state);
|
||||
}
|
||||
} else {
|
||||
__ASSERT_NO_MSG(ctrl_command == DEVICE_PM_GET_POWER_STATE);
|
||||
__ASSERT_NO_MSG(ctrl_command == PM_DEVICE_GET_POWER_STATE);
|
||||
*((uint32_t *)context) = data->pm_state;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue