drivers: serial: fix console hang when waken up from PM3
The console can't input when waken up from PM3, as get the wrong usart_intenset when process PM_DEVICE_ACTION_TURN_ON and the USART interrupt is not enabled. Only saving usart_intenset after PM action of PM_DEVICE_ACTION_TURN_OFF can fix this issue. Signed-off-by: Maochen Wang <maochen.wang@nxp.com>
This commit is contained in:
parent
db4344b06b
commit
90cd350c5a
1 changed files with 1 additions and 2 deletions
|
@ -1123,14 +1123,13 @@ static int mcux_flexcomm_pm_action(const struct device *dev, enum pm_device_acti
|
|||
const struct mcux_flexcomm_config *config = dev->config;
|
||||
int ret;
|
||||
|
||||
usart_intenset = USART_GetEnabledInterrupts(config->base);
|
||||
|
||||
switch (action) {
|
||||
case PM_DEVICE_ACTION_RESUME:
|
||||
break;
|
||||
case PM_DEVICE_ACTION_SUSPEND:
|
||||
break;
|
||||
case PM_DEVICE_ACTION_TURN_OFF:
|
||||
usart_intenset = USART_GetEnabledInterrupts(config->base);
|
||||
break;
|
||||
case PM_DEVICE_ACTION_TURN_ON:
|
||||
ret = mcux_flexcomm_init_common(dev);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue