From patchwork Mon Dec 11 16:56:38 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 10105545 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 2A0D160360 for ; Mon, 11 Dec 2017 16:57:39 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 15C912976F for ; Mon, 11 Dec 2017 16:57:39 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 08FE6297C6; Mon, 11 Dec 2017 16:57:39 +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.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id AD7A12976F for ; Mon, 11 Dec 2017 16:57:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Owner; bh=emhA47lyrQa8XyO9/SNWF/8+WtppXnlQiXPgIwHxc7I=; b=XP+ bHHGMp7MrNeSMzhnvT2h+0nnEssmu3zYp9bRA3jJnPtMCVQo+VpviMFuRP2aIH9IcI92CrWtUn5OI BCT+NC8dLoHl0jbMkdU9KYWUMiVVjLAnwi8CN65/FQt+7dJ8GRqfre0jJV/St44oJhNAzGMjzVOh+ F3Wv8Iv6uxBL1tbDdcznirPLrofdd7r22qrA+5t6602JRA3kyqaSesheMQkm0HU+wQwaVXuIMbFOa 6HEYMXCs9KbqYRavKomVTQNQN2jU0Ml4jgpi/K/Z/qigyJhZ2UEBtzW3wPXdyVWwJriVQvVrmMENi WXMgBwVphkq2FDjjSZziaew0ctNWDMg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1eOROc-00066k-Bp; Mon, 11 Dec 2017 16:57:38 +0000 Received: from mail-pg0-x242.google.com ([2607:f8b0:400e:c05::242]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1eOROR-0005o6-UP for linux-arm-kernel@lists.infradead.org; Mon, 11 Dec 2017 16:57:36 +0000 Received: by mail-pg0-x242.google.com with SMTP id q20so11324481pgv.2 for ; Mon, 11 Dec 2017 08:57:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id; bh=HMgB4Ao8uoNM+iQOhNTE+5ctZhgx/aK4YL7/cUnh+bg=; b=J60++olWOe5Nny7oBam8pq5dZuD/h/gyjVsXG60CuSGCK1aqAEKuUr1tZ0D6OxSJcZ dukSHXC6EM/A26beeUr/JyTNwrzl17WxYrcAWIKC9ZhB2MxzBZfJHRvK8prrhT9NQZjQ CgxRAopoGOQSZhqCJolSGfLDKnwc/ug5lyvyzqGjzQEuQaUlKqOZS5n2Fr26foAzs0p/ +b9QSTAEvLvIbp/ciGSaL/rwkwkIBQ4Ald17mLGuyvDXNqzT3RGVIa+xK8HpRzgRNL8C EX/9FFDvAWZj6m+7q9WxIraVI+pNFpVdOEISOosjo8bPoh1O1RxFkvdqUz14gtCO02Aa M2ag== 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; bh=HMgB4Ao8uoNM+iQOhNTE+5ctZhgx/aK4YL7/cUnh+bg=; b=WvvnIymhO9CvzD0HhUQjc5goANfdXOMVEK7fJ5O5t8m6Za7WLsJ7I1btAXA1fzDB4x hcDicE0CPYDaTm84mBVl2ubw+kCHeQFUtfIDPTOG+cWcv/nd18AEUKPwMFmI6QppAG1E nms8LDSNtwvB5n1WJWNIXOy47MPaa7GXXG6hATtrf2ylT6bYg3YofFcon/RmqFWmgT2+ f4o2lExK2V9BVHdm/7mAHQHKu6WAjrimsOEdp7aV64aCgWSduVFO2Z+AT66z9q/7kqy6 irVveA/a9Ajd7z25ywiUAI3YQINNQx8QNoY/OtHFxse8+CamacRjdvbPh3p0MHs50JHC e5Zw== X-Gm-Message-State: AKGB3mJfXqWNFJf3VuclpgwKTV5GytyhoxyQsiAq8hLdfFOszUBgsjiN rYAaTxfllYxJrBX1b3czq+Cf7g== X-Google-Smtp-Source: ACJfBotPA94+00In0QRQGhMIJpI6PC2x8P5W5gcYXdaoBzCF1nT2HojzGgSAxfesJjwjFYvgLLi6EQ== X-Received: by 10.98.211.73 with SMTP id q70mr948549pfg.107.1513011426674; Mon, 11 Dec 2017 08:57:06 -0800 (PST) Received: from localhost.localdomain ([115.97.180.212]) by smtp.gmail.com with ESMTPSA id d9sm34848093pfk.117.2017.12.11.08.57.01 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 11 Dec 2017 08:57:06 -0800 (PST) From: Jagan Teki To: Maxime Ripard Subject: [PATCH v3 1/3] regulator: axp20x: add drivevbus support for axp803 Date: Mon, 11 Dec 2017 22:26:38 +0530 Message-Id: <1513011400-4120-1-git-send-email-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.7.4 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20171211_085728_902443_18AE9228 X-CRM114-Status: GOOD ( 11.15 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , devicetree@vger.kernel.org, Catalin Marinas , linux-sunxi@googlegroups.com, Will Deacon , linux-kernel@vger.kernel.org, Chen-Yu Tsai , Rob Herring , Jagan Teki , Michael Trimarchi , linux-arm-kernel@lists.infradead.org, Icenowy Zheng 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 Like axp221, axp223, axp813 the axp803 is also supporting external regulator to drive the OTG VBus through N_VBUSEN PMIC pin. Add support for it. Signed-off-by: Jagan Teki Reviewed-by: Rob Herring Reviewed-by: Chen-Yu Tsai --- Changes for v3: - Update drivevbus in table of regulators Documentation/devicetree/bindings/mfd/axp20x.txt | 3 ++- drivers/regulator/axp20x-regulator.c | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/mfd/axp20x.txt b/Documentation/devicetree/bindings/mfd/axp20x.txt index 9455503..d1762f3 100644 --- a/Documentation/devicetree/bindings/mfd/axp20x.txt +++ b/Documentation/devicetree/bindings/mfd/axp20x.txt @@ -43,7 +43,7 @@ Optional properties: regulator to drive the OTG VBus, rather then as an input pin which signals whether the board is driving OTG VBus or not. - (axp221 / axp223 / axp813 only) + (axp221 / axp223 / axp803/ axp813 only) - x-powers,master-mode: Boolean (axp806 only). Set this when the PMIC is wired for master mode. The default is slave mode. @@ -132,6 +132,7 @@ FLDO2 : LDO : fldoin-supply : shared supply LDO_IO0 : LDO : ips-supply : GPIO 0 LDO_IO1 : LDO : ips-supply : GPIO 1 RTC_LDO : LDO : ips-supply : always on +DRIVEVBUS : Enable output : drivevbus-supply : external regulator AXP806 regulators, type, and corresponding input supply names: diff --git a/drivers/regulator/axp20x-regulator.c b/drivers/regulator/axp20x-regulator.c index 181622b..91b8ff8 100644 --- a/drivers/regulator/axp20x-regulator.c +++ b/drivers/regulator/axp20x-regulator.c @@ -721,6 +721,8 @@ static int axp20x_regulator_probe(struct platform_device *pdev) case AXP803_ID: regulators = axp803_regulators; nregulators = AXP803_REG_ID_MAX; + drivevbus = of_property_read_bool(pdev->dev.parent->of_node, + "x-powers,drive-vbus-en"); break; case AXP806_ID: regulators = axp806_regulators;