From patchwork Tue Oct 18 00:16:02 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Boyd X-Patchwork-Id: 77874 Delivered-To: patch@linaro.org Received: by 10.140.97.247 with SMTP id m110csp630711qge; Mon, 17 Oct 2016 17:16:08 -0700 (PDT) X-Received: by 10.99.62.199 with SMTP id l190mr193962pga.156.1476749767935; Mon, 17 Oct 2016 17:16:07 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 1si5264265pgr.30.2016.10.17.17.16.06; Mon, 17 Oct 2016 17:16:07 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-arm-msm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org; spf=pass (google.com: best guess record for domain of linux-arm-msm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org; dmarc=fail (p=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932539AbcJRAQF (ORCPT + 10 others); Mon, 17 Oct 2016 20:16:05 -0400 Received: from mail-pf0-f179.google.com ([209.85.192.179]:35334 "EHLO mail-pf0-f179.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932901AbcJRAQF (ORCPT ); Mon, 17 Oct 2016 20:16:05 -0400 Received: by mail-pf0-f179.google.com with SMTP id s8so84990946pfj.2 for ; Mon, 17 Oct 2016 17:16:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=YW8uS6SQyRQebYO0Uq+RZPKlmJxu/qRvKVaNGajwEPY=; b=eBC+ZclK7iKzqkTkDBfMTf+oAD/O7OFrW73N2mUrXwNHF/x9WH35BWveqjI67Y8qWi tZxJS352O4UgJ1f9i07SK7GUkMzvmIHnzW7CvWGEEBTlaeNX5JihZXULHioDmIbEpgOG omRE2H/CXpZbAaZfHazhXPYGo7X4flxlF4YCg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=YW8uS6SQyRQebYO0Uq+RZPKlmJxu/qRvKVaNGajwEPY=; b=RF1LJHbSI9J2buClsg7451ybcdpmJOQgPnKeUCeMOq4HjCh6N/UBu/Tc4i5e4Knm8E QGcoiKhaS1APmtZyc+jy6oB3aalpNrynf58YI1COPOkGyZ01YUUxsW9gUgooGUSz49WJ 0bQKIFxTQpYoQAWd4hT1CmWzqaCHrgrUdOKOCDKwagYjGfMX7MzImHtNwG96vim3BWqk uAVWmk1R/aKBfhgzlEnsUet/l/X1pvVx5ODYpuBcZ+c6Am1+zaUYH0j+Jm+lyzsDY2ZF 7ZB9pHdh8uQ791dlxVG7Yjeygcqc7Yn14iM/kPHYqMRBggu75n/Mud5OE0ObEM3eqPRh B9/A== X-Gm-Message-State: AA6/9Rle4sL1HgNyKjgYu+vw0tvVJdpFxGoWes8qO4eRTGeQ5R4sXd8sJiH7dqsivz7m4+YN X-Received: by 10.98.211.147 with SMTP id z19mr188936pfk.149.1476749764362; Mon, 17 Oct 2016 17:16:04 -0700 (PDT) Received: from localhost.localdomain (i-global254.qualcomm.com. [199.106.103.254]) by smtp.gmail.com with ESMTPSA id d89sm28399965pfe.32.2016.10.17.17.16.03 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 17 Oct 2016 17:16:03 -0700 (PDT) From: Stephen Boyd To: Chanwoo Choi Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org Subject: [PATCH] extcon: qcom-spmi-misc: Sync the extcon state on interrupt Date: Mon, 17 Oct 2016 17:16:02 -0700 Message-Id: <20161018001602.18617-1-stephen.boyd@linaro.org> X-Mailer: git-send-email 2.10.0.297.gf6727b0 Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org 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(-) -- 2.10.0.297.gf6727b0 -- To unsubscribe from this list: send the line "unsubscribe linux-arm-msm" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html 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)