From patchwork Wed Dec 21 06:10:48 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: 88671 Delivered-To: patch@linaro.org Received: by 10.140.20.101 with SMTP id 92csp2108198qgi; Tue, 20 Dec 2016 22:11:43 -0800 (PST) X-Received: by 10.99.19.65 with SMTP id 1mr5056783pgt.71.1482300703111; Tue, 20 Dec 2016 22:11:43 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a62si4617076pge.65.2016.12.20.22.11.42; Tue, 20 Dec 2016 22:11:43 -0800 (PST) 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; dkim=pass header.i=@linaro.org; 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; dmarc=pass (p=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757302AbcLUGLS (ORCPT + 25 others); Wed, 21 Dec 2016 01:11:18 -0500 Received: from mail-pg0-f53.google.com ([74.125.83.53]:36408 "EHLO mail-pg0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756488AbcLUGLO (ORCPT ); Wed, 21 Dec 2016 01:11:14 -0500 Received: by mail-pg0-f53.google.com with SMTP id f188so81673977pgc.3 for ; Tue, 20 Dec 2016 22:11:13 -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=C/ZacjFw8jm+x1dTJImhmfeTVyDfOn/Cu7Xg8qkbm4Y=; b=idsqh69wICGKIDunhKqT1bMhcq2S64x93zc3Wznp2PH4fe5GQO5vrYwfD/PlbIpvtG 0SdrmSJ7rrBIgR6g077nLG5behn1fYjMrOYFuig4LpNd8EqKBGStF4ilqryTMXxuWLWZ KRMeubAjw+NeYUnscV9utLAlVGJRPhOii4wzs= 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=C/ZacjFw8jm+x1dTJImhmfeTVyDfOn/Cu7Xg8qkbm4Y=; b=YCQpbWLvod1RVETr8vSwXWva33bI795dEhgTitZsYkkcQpsGPzIaYXAU7jBjh7esRe +CLJTmvvqPy+/ijx1qYE0QbSuvCVMMSRj6LDYoZfZH3nplObp1Vu64TtqfoxaEh+lcPE GZuWSkveSJFGaRlDPM1WEgzC2FRgthvRd6cZId5uuAjBIy9lr9+82DkfvjluRuAw20QV PjvHZ/uQeFVJpYl+sHuJiNGkVLfkPwpRjn53x+19MCqQDNigurChqWTton6cjdfOUa/N Vf+FZocqzrF71/dhAwZvbAPj2Z6wripX7hV55EboHSW2nWBNE2K9msfaWnrF92bx0/uY aSCQ== X-Gm-Message-State: AIkVDXLGtOgzPf6CSV+RSO+VIkC720J279c51/HW1uJtOlyrfqYQM2h0nrXSTpr2BgJ8vEHP X-Received: by 10.84.217.148 with SMTP id p20mr5838329pli.164.1482300673302; Tue, 20 Dec 2016 22:11:13 -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.08 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 20 Dec 2016 22:11:12 -0800 (PST) From: Baolin Wang To: myungjoo.ham@samsung.com, cw00.choi@samsung.com, wens@csie.org, kishon@ti.com, heiko@sntech.de Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linaro-kernel@lists.linaro.org, baolin.wang@linaro.org, broonie@kernel.org, neilb@suse.com Subject: [PATCH 2/3] extcon: axp288: Set EXTCON_USB when EXTCON_CHG_USB_SDP was set Date: Wed, 21 Dec 2016 14:10:48 +0800 Message-Id: <11fb7adc2982a9134faee9abb1de4dcfb253f2d2.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> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org According to the documentation, we should set the EXTCON_USB when one SDP charger connector was reported. Signed-off-by: Baolin Wang --- drivers/extcon/extcon-axp288.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) -- 1.7.9.5 diff --git a/drivers/extcon/extcon-axp288.c b/drivers/extcon/extcon-axp288.c index 42f41e8..4490726 100644 --- a/drivers/extcon/extcon-axp288.c +++ b/drivers/extcon/extcon-axp288.c @@ -102,6 +102,7 @@ enum axp288_extcon_irq { }; static const unsigned int axp288_extcon_cables[] = { + EXTCON_USB, EXTCON_CHG_USB_SDP, EXTCON_CHG_USB_CDP, EXTCON_CHG_USB_DCP, @@ -225,8 +226,12 @@ static int axp288_handle_chrg_det_event(struct axp288_extcon_info *info) vbus_attach ? USB_EVENT_VBUS : USB_EVENT_NONE, NULL); } - if (notify_charger) + if (notify_charger) { extcon_set_state_sync(info->edev, cable, vbus_attach); + if (cable == EXTCON_CHG_USB_SDP) + extcon_set_state_sync(info->edev, EXTCON_USB, + vbus_attach); + } /* Clear the flags on disconnect event */ if (!vbus_attach)