From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757159AbcDHHfI (ORCPT ); Fri, 8 Apr 2016 03:35:08 -0400 Received: from arroyo.ext.ti.com ([192.94.94.40]:38852 "EHLO arroyo.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751957AbcDHHfG (ORCPT ); Fri, 8 Apr 2016 03:35:06 -0400 Subject: [PATCH v2] extcon: usb-gpio: Don't miss event during suspend/resume To: , References: <1459951299-20578-1-git-send-email-rogerq@ti.com> CC: , Grygorii Strashko , From: Roger Quadros Message-ID: <57075F23.8080703@ti.com> Date: Fri, 8 Apr 2016 10:34:59 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0 MIME-Version: 1.0 In-Reply-To: <1459951299-20578-1-git-send-email-rogerq@ti.com> Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Pin state might have changed during suspend/resume while our interrupts were disabled and if device doesn't support wakeup. Scan for change during resume for such case. Signed-off-by: Roger Quadros --- v2: - only check for state change during resume if device wakeup is not supported drivers/extcon/extcon-usb-gpio.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/extcon/extcon-usb-gpio.c b/drivers/extcon/extcon-usb-gpio.c index bc61d11..118f8ab 100644 --- a/drivers/extcon/extcon-usb-gpio.c +++ b/drivers/extcon/extcon-usb-gpio.c @@ -185,6 +185,8 @@ static int usb_extcon_resume(struct device *dev) int ret = 0; enable_irq(info->id_irq); + if (!device_may_wakeup(dev)) + usb_extcon_detect_cable(&info->wq_detcable.work); return ret; } -- 2.5.0