From patchwork Mon Apr 23 06:32:37 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 10356213 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 3A9FD601BE for ; Mon, 23 Apr 2018 06:33:21 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2A5AB289B5 for ; Mon, 23 Apr 2018 06:33:21 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1EC62289BC; Mon, 23 Apr 2018 06:33:21 +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=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.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 524CD289B5 for ; Mon, 23 Apr 2018 06:33:20 +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=gcy7ntbVoFjDUtGP3KES848/t2CJmlakhnpdKtViBQc=; b=n3r 2Mjtrd3RJBJz1nIxcgWUHMaFbrwJ3xmHoj1QRNY8fD56CuzSs7xAcBpm3+qhbNKN80Qew2WltBFgM ZjuhEOs5QBOTJZlxjnkfbLJhNEY+nyKPoODWNssOF7iF2Rke6VnzX0Zi8vuF2YLwVJXlkd22k//TY B2YO6DfHNSKZ1XnvVsC6qOa+K9rEgYs/si/OFgWm7/SiXulV+FnP7ThB/CmGZNK9k15qEtacdyoNQ ArNwy/VQSafI/ROkVqEVyULeaJXj2qgjiWPToEKk0MeozlU+1sBuUP18rHh5rESRgF4OEn9Oo1tKe p5nT3S9VNhFm8YxUt0+m/IMjQof9cQg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fAV2I-0000g5-HW; Mon, 23 Apr 2018 06:33:14 +0000 Received: from mail-pf0-x242.google.com ([2607:f8b0:400e:c00::242]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fAV2E-0000W0-Fa for linux-arm-kernel@lists.infradead.org; Mon, 23 Apr 2018 06:33:12 +0000 Received: by mail-pf0-x242.google.com with SMTP id a26so3350471pfi.7 for ; Sun, 22 Apr 2018 23:33:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=from:to:cc:subject:date:message-id; bh=Z1fXdvvsVu9A/Zr+RBvvfQTWJOq71516nfb6guuPMq4=; b=gecePmScsyoPdmmHghaxb95cRHp67oTDw/1ibsqIMLP6vXHtqMOGCfgrV1X00ESdAd ggWbGjOVfwDsGM3+vhBo4OwtUaNXGTBBV90zVjNVnYFCeeCaINTs3ZBI2g1jE1HAApgs DsmHD6oRffsP5DN4vjECWv42Oxl46C4AB/NaM= 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=Z1fXdvvsVu9A/Zr+RBvvfQTWJOq71516nfb6guuPMq4=; b=swM8d0UUQJSV9ojDQY9IkaTDBKPzOh4QkRpI0W6z6TcPkZNoRj1I753vAjRMuDCjdz j0jnufzSvK/dsL/ZCokoMvrh92NhN/S82JNSlVgcpcwl5EsGnNi4QFbOFrOzHz/pLiNH aQ7GhKoyAiPb/TUQkLsqppTJxwvEfvV/Ckf0aPfKXwbWw9XGb/HZytlrqSMVX1472xg6 FPoCbAR9Z8uIUqtfTct9jSeufvlvbPmu31NTHmx9atVfSsIjftE9ecU25tOc908/qyiU cltD6ZYmzUx/BKPKGwqe/Lm4w4KKRs45YiRBYGFU/BpREOKvNzvqZqMOoN7/nLh9OAh3 E7Jg== X-Gm-Message-State: ALQs6tDTFTsTPjKiuw9aUVwGi6eUbydpQDt182oSaXInQSAW7EZnh+d/ fYrGc90v0g7/4xaX0ZPggEk2Yg== X-Google-Smtp-Source: AIpwx4/e7ORUHNeBBe268mGR+9pskozfP1x5+mvMTzUyGxIVjrkWXYAGwrCJljvLS3s4njFINaGcJw== X-Received: by 2002:a17:902:be06:: with SMTP id r6-v6mr13889491pls.158.1524465179286; Sun, 22 Apr 2018 23:32:59 -0700 (PDT) Received: from localhost.localdomain ([115.97.190.51]) by smtp.gmail.com with ESMTPSA id t9sm23988196pgr.37.2018.04.22.23.32.54 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 22 Apr 2018 23:32:58 -0700 (PDT) From: Jagan Teki To: Maxime Ripard Subject: [PATCH v6 1/3] regulator: axp20x: add drivevbus support for axp803 Date: Mon, 23 Apr 2018 12:02:37 +0530 Message-Id: <20180423063239.3988-1-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.14.3 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180422_233310_558455_F22E67DB X-CRM114-Status: GOOD ( 15.11 ) 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 , Will Deacon , linux-kernel@vger.kernel.org, Rob Herring , Chen-Yu Tsai , Mark Brown , 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 v6: - Rebase on master Changes for v5: - Collect Chen-Yu reviewed-by tag Changes for v4: - rebase on master 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 9455503b0299..d1762f3b30af 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 181622b2813d..91b8ff8bac15 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;