From patchwork Thu Dec 7 19:04:18 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 10100887 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 0C3086056F for ; Thu, 7 Dec 2017 19:05:05 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id F33ED1FE8A for ; Thu, 7 Dec 2017 19:05:04 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E7B3728555; Thu, 7 Dec 2017 19:05:04 +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_ADSP_CUSTOM_MED, DKIM_SIGNED, DKIM_VALID, FREEMAIL_FROM, 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 9AA551FE8A for ; Thu, 7 Dec 2017 19:05:04 +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=IJYV9j288OS3pavT1DL/kdaem14vatYFzguJ1D4eEsw=; b=YDS 06X685ZI2zpA9uhN+taggRVqhxlKFnZk+Ofa4w6P/NLHzUoYAefNEZXS4F3Yw/ZturUBH0dAhc0Uf ws/PIYHStA+UC4G2KDGv2S945LfuRZz+i26LqRY4+aGMHJjG6TRD8Sd3Ekm6RlVGUlsqyUvGgKdKm aXON2DGd8H/CYspLMFNrc6D5bVrD7EzFDC0KfxxICWJyHlKTYlUeSfQgyDpcii7kRf6Gc7jg8aJwL ZsGkhD+aP9IQyeObKqDLi2trEmoQLRXz3unyG7afPd4RKuUo08gAU+C9OaTzdcQu7B78gdj3PXBkE nFe2aFSLv1qN0XlnIX5AtggLxSD0u/w==; 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 1eN1Tj-00083l-W7; Thu, 07 Dec 2017 19:05:04 +0000 Received: from mail-pg0-x243.google.com ([2607:f8b0:400e:c05::243]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1eN1Tf-0007bP-Lw for linux-arm-kernel@lists.infradead.org; Thu, 07 Dec 2017 19:05:01 +0000 Received: by mail-pg0-x243.google.com with SMTP id j4so5106880pgp.1 for ; Thu, 07 Dec 2017 11:04:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=WC23uogw+DKV2DL+C2SQGySJc25keCzMLz+Vm+xoC/I=; b=BS+JcmdZSNLCFQljOQ8znxMHFX1BQcfnjylJO+RkrlKo43gZT2k5eVdM5yxKXGbiPw JOi+RvR+ZoH5JpCDWrSPzZ60fa5rETNH4vga/DLc9BdlFkeE9nyhi6Lo+CPDxSzJrSJT d70RFxK4lrg9gAv4AZ9jvWr3wWgtE7vFf5o2Rc3N03Bi/Z5UBu7G7XRQv46d2GsvTwvx P8Dm5t93+l65ME+9ceKoWWU3UEI8Ih/fZRzj+dri5q+1ZJQUc8LjH1hL7/e2Gb5IFE50 26tmJgan11WZN9iIQ8yay3amPqGotgU4QZD+xK/mYr/hagSz1pnmaWWnheRQVaGwHrL5 zF5Q== 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=WC23uogw+DKV2DL+C2SQGySJc25keCzMLz+Vm+xoC/I=; b=T4lcFdMtaAPZbwkNMFe3yr3PtHyNgjuBjWCdsRlSTX+fWWPgWLMykxcZj27r5OxmUr 3EZkBd9EBehm1Z06vTXVOfuHOArl1HDr6QI/qRXZFAGSnXq1oMcukHWNvOCB0oxc2yXq mXJlmb0QP9DTYaYsPzwncG+t5nqN6GsFaz+mY7aeyggzSRLIEdpweLRbM7RoOLVC/ZT/ utjqevDE928Xh7YzKJfrVpjHPiGuiCxZ/5TAqakw4NtH4AhLY+oZl22knlrxKhs5Ghol 6tHDVvgWrmmB2/8/q1nNHCDUF85Hwn91JJli1Nk/iEJrn2lVkElw8VYLGfsfSj7vums6 5mwg== X-Gm-Message-State: AJaThX4ZDomKx0XKZ8pT4skYDx14fwHm2a8Xs+mU85HjhiOnzvx+s3qp tqe76Fh9+RBjc2zoiX6YC/U= X-Google-Smtp-Source: AGs4zMZXkR3RDeUh+1ePZqdN9/zZc7Lm+EDQLXe1DaG820OEHKwMWrN8E94PYFQYIosWw468O+Rl/Q== X-Received: by 10.99.144.68 with SMTP id a65mr27320455pge.429.1512673473643; Thu, 07 Dec 2017 11:04:33 -0800 (PST) Received: from localhost.localdomain ([115.97.180.212]) by smtp.gmail.com with ESMTPSA id j62sm10550867pfc.18.2017.12.07.11.04.27 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 07 Dec 2017 11:04:32 -0800 (PST) From: Jagan Teki X-Google-Original-From: Jagan Teki To: Maxime Ripard Subject: [PATCH v2 1/3] regulator: axp20x: add drivevbus support for axp803 Date: Fri, 8 Dec 2017 00:34:18 +0530 Message-Id: <1512673460-7865-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-20171207_110459_785862_5EDBA784 X-CRM114-Status: GOOD ( 11.96 ) 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 --- Changes for v2: - New patch Documentation/devicetree/bindings/mfd/axp20x.txt | 2 +- drivers/regulator/axp20x-regulator.c | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/mfd/axp20x.txt b/Documentation/devicetree/bindings/mfd/axp20x.txt index 9455503..34f24a2 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. 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;