Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp799213img; Fri, 22 Mar 2019 08:48:53 -0700 (PDT) X-Google-Smtp-Source: APXvYqxfm6Zk6WtIyaaDA4ElY7a4tkCXJGaxa/9BU7Va7DA/tWTmBYcKKuOH3X8mv13bA5TSRsI5 X-Received: by 2002:a63:cf11:: with SMTP id j17mr8934003pgg.252.1553269733411; Fri, 22 Mar 2019 08:48:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553269733; cv=none; d=google.com; s=arc-20160816; b=PVNExktA9Dd54GKIBUeczbZMR/9gVC6Oh1Rba46xyqgaoJ1WSvRHI1ZCQv/+yf9Knt 0JaBnoP0KcoFxLGNCwy1zjEieCbpc+cfgBJ0mnUUP84E3c88ZhStkGR3jm4MWEv7fTTb Q3qrRUVZ6Xc6ztPlk9aRYQSo4DleqSMUi/Y6qKACRTYFvUPMKdmmj20isPm7nfxdXz1i muiraasotgfv3S2vxq9iVSbVkj72GqInV8cMFWq78fHf8uv0bwBGp6+ekb3sO58y7RE/ hgZv258UgQYbrKmfn0OLE5bn/odt0XMeoF6+C2loRGt7/Hdj0SG0uBGgU/WPIHeUhB3c eC8g== 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 z1si4170601plb.199.2019.03.22.08.48.38; Fri, 22 Mar 2019 08:48:53 -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 S1728054AbfCVPrc (ORCPT + 99 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 Content-Transfer-Encoding: 8bit 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(+) 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; } -- 2.20.0