From patchwork Fri Jan 12 06:30:16 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 10159669 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 8B95B6029B for ; Fri, 12 Jan 2018 06:36:16 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7776B288DB for ; Fri, 12 Jan 2018 06:36:16 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6B27228943; Fri, 12 Jan 2018 06:36:16 +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 E1DDA288DB for ; Fri, 12 Jan 2018 06:36:15 +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=tanMjuG/SmHx+hP1G6aZ4/L0EtRbnzsO92bRoe2ht3o=; b=OdM j9EHmhuCuRAT8Z+dsoPSw8KGyoNxX5skr9jmSa/tX12DvKW1DP9kCY7D0zgPCCCTe4yzR0VNAK7z2 epKVOFOi4kxOIBwEQ/xqyvZ7NNc4MkgIuS79QrJM9ITSxfDzfFKxPYROB6jUcp97c7v5ZFOWRawuR Hh2c/GkT71RzSFhSVmYKhmyMXOcbZ6drN973PSdmOMTEuvan/njI8CEPO9JjZDLw75qEaApgSqs4F 6+kXwSohzJ2YMtSpsvk2yV5FgWDB9y4YpuIullE6y2jU2Y7RlD5vEYxtduOwYl3P/ghy297oNjhKe VX5ydw/dyBqF/jX2KDVMsO7CR07kz1w==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.89 #1 (Red Hat Linux)) id 1eZswn-0005b2-Uw; Fri, 12 Jan 2018 06:36:13 +0000 Received: from mail-pg0-x243.google.com ([2607:f8b0:400e:c05::243]) by bombadil.infradead.org with esmtps (Exim 4.89 #1 (Red Hat Linux)) id 1eZswk-0005Dm-R4 for linux-arm-kernel@lists.infradead.org; Fri, 12 Jan 2018 06:36:12 +0000 Received: by mail-pg0-x243.google.com with SMTP id j4so4013719pgp.1 for ; Thu, 11 Jan 2018 22:36:00 -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=7AyDLjQRKnVF0yH3JbkP0WmNsgHELcMrvXb0pJZbvIA=; b=HJMj5aVpYkbuvXTgT9pKrFpqlzHcz+U7ufUyLjWdDzXm14AIg6FhKB/j0dHRM8Bl0R eKQjp4yrs668eHNuzSmsRhgJrG0jI2Qjdg6wXO5rXvqn/DBdVbNzlWj/BPyUwOhEn2zP TOOozQMbv4VAK36ZRN9oiEVD5S+2A1qz9dkZZGG/9gL4j+heONEXsw2PO0XnBirG48mO nmUKqhrXO/gfgZhiBqWD5QtX28IwzjnYZ8xy/T78awNBsrvVPSfKIlBeCn+dewJu4DWK y/53UH9DU/7SduQMBX3n2zfc5/wd1kPmQRhPRQOSnumyDfeDrcpBsC39KTTpxtMRLPhU BQNQ== 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=7AyDLjQRKnVF0yH3JbkP0WmNsgHELcMrvXb0pJZbvIA=; b=RBvgXpZq48GBQMuN5W9AVfloVno63pBTAs6j72iLB+a1pRBwo45BIaoLRj64YhWY76 3etSihD4Im0p6knNijyx4EH/tMkhz2DFT8zSEtu3SQs1AFqDtCNkwfBjvf6iRs4qIO/2 tX24Is2NPI95b2ypZaCPIlA2X3no1g2yKbxxkY+A42BPDzgJqbs/5AGjNyH0jjR6W//M xfVuUPQwTLs6FeL90aAX2ZhVcz7Bt7UU2punm+ymsDNUubZncQmCI0pmGQF8suFA5tFU l0252kSbcKHH4oO/9gbm1Rg05IxLqW/+MlqV6L7cd27NQIoUcjhpmxEUb3OxIuBhYYa/ 58XA== X-Gm-Message-State: AKGB3mJNct03EZgNqXCmuJghVqRyQEKQ2+30OZoLT7vPj1P7M1uHCdc8 lKObeiJ/mzVqhdQ6bhW2g3Pz4w== X-Google-Smtp-Source: ACJfBotazPOqdGeSNzTz+6+5UsBy6Mt/eNd+3XjyiAQMcqGy+KnbVclh6EbRe9xXWzc/FwgskoYiyg== X-Received: by 10.98.57.27 with SMTP id g27mr17726112pfa.128.1515738959380; Thu, 11 Jan 2018 22:35:59 -0800 (PST) Received: from localhost.localdomain ([115.97.180.212]) by smtp.gmail.com with ESMTPSA id k10sm28139910pgq.89.2018.01.11.22.35.53 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 11 Jan 2018 22:35:58 -0800 (PST) From: Jagan Teki To: Maxime Ripard Subject: [PATCH v4 1/3] regulator: axp20x: add drivevbus support for axp803 Date: Fri, 12 Jan 2018 12:00:16 +0530 Message-Id: <1515738618-3617-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-20180111_223610_890202_FD03EF5F X-CRM114-Status: GOOD ( 11.42 ) 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 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 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;