From patchwork Wed Dec 21 06:10:49 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "(Exiting) Baolin Wang" X-Patchwork-Id: 9482523 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 97BD060821 for ; Wed, 21 Dec 2016 06:13:30 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 868BF27FBE for ; Wed, 21 Dec 2016 06:13:30 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 79D4C28118; Wed, 21 Dec 2016 06:13:30 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 1ABF227FBE for ; Wed, 21 Dec 2016 06:13:30 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1cJa8N-0002sc-1Y; Wed, 21 Dec 2016 06:12:15 +0000 Received: from mail-pg0-x22e.google.com ([2607:f8b0:400e:c05::22e]) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1cJa7p-0002Mf-6X for linux-arm-kernel@lists.infradead.org; Wed, 21 Dec 2016 06:11:42 +0000 Received: by mail-pg0-x22e.google.com with SMTP id y62so29524967pgy.1 for ; Tue, 20 Dec 2016 22:11:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :in-reply-to:references; bh=p6/GbQZRb+JNVzPbJm7sWrhvL3BcU9zKYCyGeGiGyaE=; b=IUILrep3RXtzIoULrMXSPfhASV7mOJI9avM8nCIk0gPBULDJ7vRZq0Tcb28GAav4cQ Etsq60tVgbdj8XAg3AihgRGLALSSkcHOiXEAnqgtOYehpUmcUK4mnKLsMyae+SrOZQqv SeGempF7PT3F/LtAsyfYWFOx5oYJr4SfD0TLg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:in-reply-to:references; bh=p6/GbQZRb+JNVzPbJm7sWrhvL3BcU9zKYCyGeGiGyaE=; b=GdIQSwBOJ9m0ohmLfYMPYlD/GLV0CZtdD2lj9ablOo2j/O3/IvDY0WOGbXRmBo9Zak g5NFACGnNpAAPuMzi+43QJhDr0SahRrMGpl7uyZNXEvn5NBonrqWegl+V6FkECpEqu7z W3qNXxZtZLSwPJ90GjJWDMUqwiJ6ZP9cX2TsPeLTTJAkUOX5Dc7boX08DzjJiNeJbP50 Aoh9sz0LcTxSff+/aFbqU/opceOvO9FRGCmD/dJPSiCnGzYuigWnyQGSEgnu5wBuSG9a tzbPxuJDXZhadKcv4RAUaxYM4VTvSJcu+Se6CtFzlP7twlR8FxpqE8zIRrxEY6HKmEtG eqXw== X-Gm-Message-State: AIkVDXKKIuqPyg3XeGGqZkNUW+kxwqYsZ80PuH82VuqGjqMmtzCo7JkuCmbUNv6G8rlSCq84 X-Received: by 10.84.225.133 with SMTP id u5mr3411757plj.76.1482300680144; Tue, 20 Dec 2016 22:11:20 -0800 (PST) Received: from baolinwangubtpc.spreadtrum.com ([175.111.195.49]) by smtp.gmail.com with ESMTPSA id y89sm43302095pfk.83.2016.12.20.22.11.14 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 20 Dec 2016 22:11:19 -0800 (PST) From: Baolin Wang To: myungjoo.ham@samsung.com, cw00.choi@samsung.com, wens@csie.org, kishon@ti.com, heiko@sntech.de Subject: [PATCH 3/3] phy: rockchip-inno-usb2: Set EXTCON_USB when EXTCON_CHG_USB_SDP was set Date: Wed, 21 Dec 2016 14:10:49 +0800 Message-Id: <767c3dfccde4807e3645951d4aeebca0ab5cc5e4.1482300213.git.baolin.wang@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <7b9836ce2ca34118a2acd1ea113605a5f13b4439.1482300213.git.baolin.wang@linaro.org> References: <7b9836ce2ca34118a2acd1ea113605a5f13b4439.1482300213.git.baolin.wang@linaro.org> In-Reply-To: <7b9836ce2ca34118a2acd1ea113605a5f13b4439.1482300213.git.baolin.wang@linaro.org> References: <7b9836ce2ca34118a2acd1ea113605a5f13b4439.1482300213.git.baolin.wang@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20161220_221141_354049_A3955583 X-CRM114-Status: GOOD ( 10.91 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linaro-kernel@lists.linaro.org, baolin.wang@linaro.org, linux-kernel@vger.kernel.org, neilb@suse.com, linux-rockchip@lists.infradead.org, broonie@kernel.org, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP According to the documentation, we should set the EXTCON_USB when one SDP charger connector was reported. Signed-off-by: Baolin Wang Reviewed-by: Chanwoo Choi --- drivers/phy/phy-rockchip-inno-usb2.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/phy/phy-rockchip-inno-usb2.c b/drivers/phy/phy-rockchip-inno-usb2.c index 2f99ec9..71fbe0f 100644 --- a/drivers/phy/phy-rockchip-inno-usb2.c +++ b/drivers/phy/phy-rockchip-inno-usb2.c @@ -595,9 +595,14 @@ static void rockchip_usb2phy_otg_sm_work(struct work_struct *work) if (rport->vbus_attached != vbus_attach) { rport->vbus_attached = vbus_attach; - if (notify_charger && rphy->edev) + if (notify_charger && rphy->edev) { extcon_set_cable_state_(rphy->edev, cable, vbus_attach); + if (cable == EXTCON_CHG_USB_SDP) + extcon_set_cable_state_(rphy->edev, + EXTCON_USB, + vbus_attach); + } } break; case OTG_STATE_B_PERIPHERAL: