On 2016년 04월 06일 23:01, Roger Quadros wrote:
> Pin state might have changed during suspend/resume while
> our interrupts were disabled. Scan for change during resume.
> 
> Signed-off-by: Roger Quadros <rog...@ti.com>
> ---
>  drivers/extcon/extcon-usb-gpio.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/extcon/extcon-usb-gpio.c 
> b/drivers/extcon/extcon-usb-gpio.c
> index 2b2fecf..20175ec 100644
> --- a/drivers/extcon/extcon-usb-gpio.c
> +++ b/drivers/extcon/extcon-usb-gpio.c
> @@ -192,6 +192,7 @@ static int usb_extcon_resume(struct device *dev)
>       }
>  
>       enable_irq(info->id_irq);
> +     usb_extcon_detect_cable(&info->wq_detcable.work);

If interrupt is using as wakeup source/irq,
after wake-up from suspend state, the interrupt handler will be handled.

But, if interrupt is not used for wakeup source/irq,
As your patch, we need to check the state on resume().

So, I think you need more condition to check the interrupt is whether wakeup 
source or not.

Thanks,
Chanwoo CHoi

Reply via email to