From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753911AbdAZVSP (ORCPT ); Thu, 26 Jan 2017 16:18:15 -0500 Received: from customer-85-204-195-167.ip4.gigabit.dk ([85.204.195.167]:60736 "EHLO customer-2a00-7660-0ca7-0000-0000-0000-0000-0b1b.ip6.gigabit.dk" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753879AbdAZVSO (ORCPT ); Thu, 26 Jan 2017 16:18:14 -0500 Message-Id: <8c2849be991beef08db2b6560938d16e9cd7758d.1485456006.git.rask@formelder.dk> In-Reply-To: References: From: Rask Ingemann Lambertsen To: Chen-Yu Tsai , Lee Jones , Mark Brown , Rob Herring , Mark Rutland , Liam Girdwood Cc: linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 4/5] regulator: axp20x: Add support for the AXP808 PMIC Date: Thu, 26 Jan 2017 22:18:11 +0100 (CET) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The regulators are the same as on the AXP806. Signed-off-by: Rask Ingemann Lambertsen --- 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; -- 2.10.2