From patchwork Sun Jan 22 17:33:10 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rask Ingemann Lambertsen X-Patchwork-Id: 9563789 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 BDF8A60216 for ; Wed, 8 Feb 2017 23:34:10 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6A5DD28536 for ; Wed, 8 Feb 2017 23:34:10 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5F13628538; Wed, 8 Feb 2017 23:34:10 +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=1.5 required=2.0 tests=BAYES_00, DATE_IN_PAST_96_XX autolearn=no 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 02A8128536 for ; Wed, 8 Feb 2017 23:34:10 +0000 (UTC) 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 1cbbkU-0005Tp-Os; Wed, 08 Feb 2017 23:34:06 +0000 Received: from customer-85-204-195-167.ip4.gigabit.dk ([85.204.195.167] helo=customer-2a00-7660-0ca7-0000-0000-0000-0000-0b1b.ip6.gigabit.dk) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1cbbkL-0005Pa-NU for linux-arm-kernel@lists.infradead.org; Wed, 08 Feb 2017 23:34:04 +0000 Received: by customer-2a00-7660-0ca7-0000-0000-0000-0000-0b1b.ip6.gigabit.dk (Postfix, from userid 1000) id 2F2683302A8; Thu, 9 Feb 2017 00:33:06 +0100 (CET) Message-Id: <81de3f2f2d5d9552092d1a8f59dfb0be944d4446.1486592471.git.rask@formelder.dk> In-Reply-To: References: From: Rask Ingemann Lambertsen Date: Sun, 22 Jan 2017 18:33:10 +0100 Subject: [PATCH v2 4/5] regulator: axp20x: Add support for the AXP808 PMIC To: Chen-Yu Tsai , Maxime Ripard , Lee Jones , Mark Brown , Rob Herring , Mark Rutland , Liam Girdwood X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170208_153358_102436_06EC8934 X-CRM114-Status: UNSURE ( 9.58 ) X-CRM114-Notice: Please train this message. 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: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org 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 The regulators are the same as on the AXP806. Signed-off-by: Rask Ingemann Lambertsen Acked-by: Mark Brown Acked-by: Chen-Yu Tsai --- No changes in v2. drivers/regulator/axp20x-regulator.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/regulator/axp20x-regulator.c b/drivers/regulator/axp20x-regulator.c index a3ade9e..034dce8 100644 --- a/drivers/regulator/axp20x-regulator.c +++ b/drivers/regulator/axp20x-regulator.c @@ -370,6 +370,7 @@ static int axp20x_set_dcdc_freq(struct platform_device *pdev, u32 dcdcfreq) step = 75; break; case AXP806_ID: + case AXP808_ID: /* * AXP806 DCDC work frequency setting has the same range and * step as AXP22X, but at a different register. @@ -459,6 +460,7 @@ static int axp20x_set_dcdc_workmode(struct regulator_dev *rdev, int id, u32 work break; case AXP806_ID: + case AXP808_ID: reg = AXP806_DCDC_MODE_CTRL2; /* * AXP806 DCDC regulator IDs have the same range as AXP22X. @@ -492,8 +494,8 @@ static bool axp20x_is_polyphase_slave(struct axp20x_dev *axp20x, int id) { u32 reg = 0; - /* Only AXP806 has poly-phase outputs */ - if (axp20x->variant != AXP806_ID) + /* Only AXP806 and AXP808 have poly-phase outputs */ + if (axp20x->variant != AXP806_ID && axp20x->variant != AXP808_ID) return false; regmap_read(axp20x->regmap, AXP806_DCDC_MODE_CTRL2, ®); @@ -541,6 +543,7 @@ static int axp20x_regulator_probe(struct platform_device *pdev) "x-powers,drive-vbus-en"); break; case AXP806_ID: + case AXP808_ID: regulators = axp806_regulators; nregulators = AXP806_REG_ID_MAX; break;