Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S941337AbcJSOWy (ORCPT ); Wed, 19 Oct 2016 10:22:54 -0400 Received: from mailout4.samsung.com ([203.254.224.34]:54668 "EHLO mailout4.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S941919AbcJSOWs (ORCPT ); Wed, 19 Oct 2016 10:22:48 -0400 MIME-version: 1.0 Content-type: text/plain; charset=UTF-8 X-AuditID: cbfee61a-f79786d000004c78-c4-580746e28408 Content-transfer-encoding: 8BIT Message-id: <580746E2.5080800@samsung.com> Date: Wed, 19 Oct 2016 19:11:46 +0900 From: Chanwoo Choi Organization: Samsung Electronics User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 To: Stephen Boyd Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org Subject: Re: [PATCH] extcon: qcom-spmi-misc: Sync the extcon state on interrupt References: <20161018001602.18617-1-stephen.boyd@linaro.org> In-reply-to: <20161018001602.18617-1-stephen.boyd@linaro.org> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrMIsWRmVeSWpSXmKPExsVy+t9jAd1HbuwRBvtuyltsenyN1WLi/rPs Fpd3zWGzmHv1AJMDi8eda3vYPDYvqff4vEkugDnKzSYjNTEltUghNS85PyUzL91WKTTETddC SSEvMTfVVilC1zckSEmhLDGnFMgzMkADDs4B7sFK+nYJbhmdtx6xFyzgqvi16zJLA+NRji5G Tg4JAROJF9tnskHYYhIX7q0Hsrk4hASWMkpsPDyTFSTBKyAo8WPyPZYuRg4OZgF5iSOXskHC zALqEpPmLWKGqH/AKDHh82F2kBpeAS2Jn7dkQGpYBFQlWh+/YQex2YDC+1/cANvFL6AocfXH Y0aQclGBCInuE5UgYRGgkil3/kBtSpe4/dsNJCws4C/xYdMcRohNkxglpjRvA7uMU8BW4szE l+wTGAVnITl0FsKhs5AcuoCReRWjRGpBckFxUnquYV5quV5xYm5xaV66XnJ+7iZGcAQ9k9rB eHCX+yFGAQ5GJR5eD2u2CCHWxLLiytxDjBIczEoivP4u7BFCvCmJlVWpRfnxRaU5qcWHGE2B Xp3ILCWanA+M7rySeEMTcxNzYwMLc0tLEyMlcd7G2c/ChQTSE0tSs1NTC1KLYPqYODilGhjl P0Yb7WnZeONOzxzRaVz/5c9NPblfPlmxdEPkVFG5Wc1mTAEhggxxW2cWnsr413Tlrfb9P7fW BHnXWW8VOqCglW57rOiujLRfuk2g8DqWnSumJVhNyXaPObtkQ0Hz/qP9UsX7Gj9daOLk+qjB JvHzzlpPISYb//5euWW122XnX/uuFLrB8JUSS3FGoqEWc1FxIgBzExf0tgIAAA== X-MTR: 20000000000000000@CPGS Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1277 Lines: 35 Hi Stephen, On 2016년 10월 18일 09:16, Stephen Boyd wrote: > The driver was changed after submission to use the new style APIs > like extcon_set_state(). Unfortunately, that only sets the state, > and doesn't notify any consumers that the cable state has > changed. Use extcon_set_state_sync() here instead so that we > notify cable consumers of the state change. This fixes USB > host-device role switching on the db8074 platform. > > Fixes: 38085c987f52 ("extcon: Add support for qcom SPMI PMIC USB id detection hardware") > Signed-off-by: Stephen Boyd > --- > drivers/extcon/extcon-qcom-spmi-misc.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/extcon/extcon-qcom-spmi-misc.c b/drivers/extcon/extcon-qcom-spmi-misc.c > index ca957a5f4291..b8cde096a808 100644 > --- a/drivers/extcon/extcon-qcom-spmi-misc.c > +++ b/drivers/extcon/extcon-qcom-spmi-misc.c > @@ -51,7 +51,7 @@ static void qcom_usb_extcon_detect_cable(struct work_struct *work) > if (ret) > return; > > - extcon_set_state(info->edev, EXTCON_USB_HOST, !id); > + extcon_set_state_sync(info->edev, EXTCON_USB_HOST, !id); > } > > static irqreturn_t qcom_usb_irq_handler(int irq, void *dev_id) > Applied it. Best Regards, Chanwoo Choi