From patchwork Fri Mar 22 15:44:04 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 160927 Delivered-To: patch@linaro.org Received: by 2002:a02:c6d8:0:0:0:0:0 with SMTP id r24csp961745jan; Fri, 22 Mar 2019 08:47:33 -0700 (PDT) X-Google-Smtp-Source: APXvYqx2qpmtFwF9nuukvM1sVe2iY0Ob18mffCSyoaplQ+xRHK4vANc9SPL8+HEOyrKsF5Kc/wBZ X-Received: by 2002:a17:902:b201:: with SMTP id t1mr10375048plr.55.1553269653368; Fri, 22 Mar 2019 08:47:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553269653; cv=none; d=google.com; s=arc-20160816; b=D1S7yOJ09wBX0BVOeC2YPDGc5VQsEt0i5DSKxf7eSXTO1EVKv6ltmgsq61p7oBIzsz mFyKMb81RerUp2hSwJ5gmPFjhCEn2PnDp5TSlRTmWStPCPIgoKktiJQIbs5NuqAp4Bxc t14iwA5zcLCZvQOlTaNqQzMcAQbtrd2bxTuN0ejK23XepDIPs8UDmR3ekKLnt8fg0eIU 5LAMqAAlpYnrzHmy0sGMldD3rDfXR0t6DYnEKNJ+HB0+aPIKmQd8mQzbQ2YPUNfVW/Fn 3erleYQSes2mU6JU+hprck1m2A4P5O/EYSCmDwr7m6QYDT1HFqnpX80QO29YIs8K9AZx /Gqw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=thl0NvrNbK2zROahGJa34RyZhCcNN79tUModlb9gOQY=; b=YerHhcf0+Bw/3ALHk2pDMJXAM2IKHkhWt8WJwgqZ1o38I1gq9CijVLG8qpQPR1xGqE V5OHY4OMBbrrBGUYE9zOf/QQIu9sEjS15vHg+A4jyt9EG1S5+aCSXtYnNL+X4966RLsc LXzVd7Tygq2GdnxLZ/EAZR6jD6DqiWijYrHJ8ITxD3aCGYptaU5hrSm7NjuRwfflGD2T MNVPOLbw7Xp4Ao2D7HhXNtovjJMYVhJMlrIPx9HsGnFc2K8LGaiWDDXHrB6BipoXkYyZ QUyNIfuaJ+ldRtoBBDsZLX2UQqVAXFpLFLxsdwcZHwTT8qKRH4GYLH5ARKdredsP8OXM Wnmg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id cb2si7759875plb.201.2019.03.22.08.47.33; Fri, 22 Mar 2019 08:47:33 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728075AbfCVPrc (ORCPT + 31 others); Fri, 22 Mar 2019 11:47:32 -0400 Received: from mout.kundenserver.de ([217.72.192.75]:48467 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727252AbfCVPrb (ORCPT ); Fri, 22 Mar 2019 11:47:31 -0400 Received: from wuerfel.lan ([149.172.19.189]) by mrelayeu.kundenserver.de (mreue108 [212.227.15.145]) with ESMTPA (Nemesis) id 1MvJwN-1gpguc31aT-00rIeJ; Fri, 22 Mar 2019 16:47:19 +0100 From: Arnd Bergmann To: stable@vger.kernel.org, MyungJoo Ham , Chanwoo Choi Cc: Roger Quadros , Arnd Bergmann , linux-kernel@vger.kernel.org Subject: [BACKPORT 4.4.y 13/25] extcon: usb-gpio: Don't miss event during suspend/resume Date: Fri, 22 Mar 2019 16:44:04 +0100 Message-Id: <20190322154425.3852517-14-arnd@arndb.de> X-Mailer: git-send-email 2.20.0 In-Reply-To: <20190322154425.3852517-1-arnd@arndb.de> References: <20190322154425.3852517-1-arnd@arndb.de> MIME-Version: 1.0 X-Provags-ID: V03:K1:DTY19u7ixviVkwcIrPn8cBZZRnu8fU/loRhzQrdCkzn+qRXeCdU GmNu3KUD74TsqT53s5yUyjULtO8m0P9eqUICwpICc4tTzMIBU/SaRAYF41fYozL5wVHIRpm xKjot+/B9QoZCtaaGrxZMCjUBH186LDVwdPg5CSuL9DFhX8X2SPSvko5uAx5gV0P9YIrNl6 xF3e4BhB7jBXoaUh6B/jA== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1; V03:K0:MYBvXZ7PdYM=:NffINcQs07xaEGqDq5dHHD 1rR676+OBVxd3M43p4jdluDJ1eNb2C6ORVxrK3BHuAkusTGK1uzjZjyoD2v/OLWAtTaFWT0y+ /sfbTuOLpe8aXuQI6cqZ0wWmdqzMFxu+yTsqgXdYpYlwLq6sFHkIhuGp/7wJe9ZiOk3LiXQSP rsul4fah9j/EaxbGRzNItcfu2I8RwmGsTTKeKCgo6dOJ/U4W+oLjeoAyGeUA/0kiTRS7iXS06 4lutrXHknx57+b7+KtxmF2C3GBQP0RO89klRSAdapLK9ZzpjcSBBzkiITJSTVzhRI2v12g+FX prfGUWAVzxlvHqRv27Y5mLWdRwVCbevU3EcH4speV5sEZ04RUzy66AE0zhxKx4TPZmetx4m6D CBnhkq2Qh08FMBrAGs0LylfDHC3U/x0qGydKTc2mcIquFQFZm9y1e5Kj+RGKW6lUyjURL/TKE mg2wMJhZBtCQzHNjydT5onG6OFM2KCdSc+zMIA0d81/aFapZHpX5tMdX+/VXJJhtGLrcfHwom TNR2XB2SAR64CZ6WIUt29O/+X0lhiKJp2m1XHVv0h47FyaKJD/1rybLK2LHoLnf+q32aVwnvg FAcaQ6MGX5XriN43//M/WaMcuFaEi3QkEyQtIZcjyklU7NmTi2EoCVKn1f/v1Y1rvRC3Lq00R oUSeoUl4yuMLKiQ+caynE4v6ym4JVseFIhEf1Rc8FHwOB+DszBLGlHUrmbIt8oYYxKw19NDaa dW/H/sE77Fq5Vb3ZVvN3SgDxTffTf+KMqWoNMg== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Roger Quadros 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 Signed-off-by: Chanwoo Choi (cherry picked from commit 04c080080855ce84dcd490a2e04805608a21085d) Signed-off-by: Arnd Bergmann --- drivers/extcon/extcon-usb-gpio.c | 3 +++ 1 file changed, 3 insertions(+) -- 2.20.0 diff --git a/drivers/extcon/extcon-usb-gpio.c b/drivers/extcon/extcon-usb-gpio.c index 2b2fecffb1ad..c6a7c9ddf0ac 100644 --- a/drivers/extcon/extcon-usb-gpio.c +++ b/drivers/extcon/extcon-usb-gpio.c @@ -192,6 +192,9 @@ static int usb_extcon_resume(struct device *dev) } enable_irq(info->id_irq); + if (!device_may_wakeup(dev)) + queue_delayed_work(system_power_efficient_wq, + &info->wq_detcable, 0); return ret; }