Skip to content

Commit

Permalink
extcon: palmas: Don't miss GPIO events during suspend/resume
Browse files Browse the repository at this point in the history
The USB cable state can change during suspend/resume
so be sure to check and update the extcon state.

Signed-off-by: Roger Quadros <[email protected]>
Signed-off-by: Chanwoo Choi <[email protected]>
  • Loading branch information
Roger Quadros authored and chanwoochoi committed Apr 6, 2017
1 parent 8680b4d commit 0194432
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions drivers/extcon/extcon-palmas.c
Original file line number Diff line number Diff line change
Expand Up @@ -413,6 +413,12 @@ static int palmas_usb_resume(struct device *dev)
if (palmas_usb->enable_gpio_id_detection)
disable_irq_wake(palmas_usb->gpio_id_irq);
}

/* check if GPIO states changed while suspend/resume */
if (palmas_usb->enable_gpio_vbus_detection)
palmas_vbus_irq_handler(palmas_usb->gpio_vbus_irq, palmas_usb);
palmas_gpio_id_detect(&palmas_usb->wq_detectid.work);

return 0;
};
#endif
Expand Down

0 comments on commit 0194432

Please sign in to comment.