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: 9482517 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 4932860821 for ; Wed, 21 Dec 2016 06:12:14 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 39AA927FBE for ; Wed, 21 Dec 2016 06:12:14 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2E36C28118; Wed, 21 Dec 2016 06:12:14 +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 EC6A027FBE for ; Wed, 21 Dec 2016 06:12:13 +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 1cJa8L-0002s1-B9; Wed, 21 Dec 2016 06:12:13 +0000 Received: from mail-pg0-x22b.google.com ([2607:f8b0:400e:c05::22b]) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1cJa7p-0002Me-77 for linux-rockchip@lists.infradead.org; Wed, 21 Dec 2016 06:11:42 +0000 Received: by mail-pg0-x22b.google.com with SMTP id f188so81675119pgc.3 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=I9KUx3NwUtHNzV2l2ILOFowP3ZHIrQcpq195cmocsIXV060YBreY+Fsxyz3y69/eDJ ygqlQ2XG+qS0kHws8INrE6R4Cevfpwd5ZmsV8NFxFgBk3qQvDRyiD7x+nqEzXvTF3jdA uDmvbceGLoxCB4IVw/FAtJ5XgDeHWKdH7wC3albs63o3BTh7g32wF+KT5i8/wB6b2fND 3U3pK/ouN5L4YoN4ewXk5jZcqs9T44jd/xYOnLxpFjtaIZYl98CnVQaJVbqd2saUdXp0 oFCDp1Cq6ooXc6oroVxJatvpKVsc65xjnjDk+Y6W2vtzuzVFG9uADJFyHSFNke7lPTVG et9w== X-Gm-Message-State: AIkVDXKNXk2KJYem2iHjONJEcAgwGsZEX2DsUlcpRJhCIFOZQynE+I17f98D4h+fPC5tE9Ez 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_372323_F0565944 X-CRM114-Status: UNSURE ( 9.38 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Upstream kernel work for Rockchip platforms 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-rockchip" Errors-To: linux-rockchip-bounces+patchwork-linux-rockchip=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: