From patchwork Fri Nov 18 12:02:06 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Brown X-Patchwork-Id: 9436331 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 A9BF460469 for ; Fri, 18 Nov 2016 12:03:14 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 952A7287DE for ; Fri, 18 Nov 2016 12:03:14 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8A47D29899; Fri, 18 Nov 2016 12:03:14 +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=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 34E4E287DE for ; Fri, 18 Nov 2016 12:03:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753767AbcKRMDC (ORCPT ); Fri, 18 Nov 2016 07:03:02 -0500 Received: from mezzanine.sirena.org.uk ([106.187.55.193]:54946 "EHLO mezzanine.sirena.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753616AbcKRMCP (ORCPT ); Fri, 18 Nov 2016 07:02:15 -0500 Received: from [2001:470:1f1d:6b5::3] (helo=debutante) by mezzanine.sirena.org.uk with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1c7hrs-0003h1-S8; Fri, 18 Nov 2016 12:02:11 +0000 Received: from broonie by debutante with local (Exim 4.87) (envelope-from ) id 1c7hrq-0005N8-5P; Fri, 18 Nov 2016 12:02:06 +0000 From: Mark Brown To: Nicolae Rosia Cc: Mark Brown , Tony Lindgren , Liam Girdwood , Mark Brown , linux-omap@vger.kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <1478954535-17325-4-git-send-email-Nicolae_Rosia@mentor.com> Message-Id: Date: Fri, 18 Nov 2016 12:02:06 +0000 X-SA-Exim-Connect-IP: 2001:470:1f1d:6b5::3 X-SA-Exim-Mail-From: broonie@sirena.org.uk Subject: Applied "regulator: twl-regulator: rework fixed regulator definition" to the regulator tree X-SA-Exim-Version: 4.2.1 (built Mon, 26 Dec 2011 16:24:06 +0000) X-SA-Exim-Scanned: No (on mezzanine.sirena.org.uk); Unknown failure Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The patch regulator: twl-regulator: rework fixed regulator definition has been applied to the regulator tree at git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator.git All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted. You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed. If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced. Please add any relevant lists and maintainers to the CCs when replying to this mail. Thanks, Mark From dab780a3b489b038a47d8fbbc49c33aae1e7a682 Mon Sep 17 00:00:00 2001 From: Nicolae Rosia Date: Sat, 12 Nov 2016 14:42:14 +0200 Subject: [PATCH] regulator: twl-regulator: rework fixed regulator definition TWL603X and TWL4030 are different and have different code logic. Rework the regulator definition method so we can split the file easily in twl4030 and twl6030. Signed-off-by: Nicolae Rosia Signed-off-by: Mark Brown --- drivers/regulator/twl-regulator.c | 38 ++++++++++++++++++++++++-------------- 1 file changed, 24 insertions(+), 14 deletions(-) diff --git a/drivers/regulator/twl-regulator.c b/drivers/regulator/twl-regulator.c index 210681d6b743..23f7b31f6355 100644 --- a/drivers/regulator/twl-regulator.c +++ b/drivers/regulator/twl-regulator.c @@ -898,15 +898,6 @@ static struct regulator_ops twlsmps_ops = { /*----------------------------------------------------------------------*/ -#define TWL4030_FIXED_LDO(label, offset, mVolts, num, turnon_delay, \ - remap_conf) \ - TWL_FIXED_LDO(label, offset, mVolts, num, turnon_delay, \ - remap_conf, TWL4030, twl4030fixed_ops, \ - twl4030reg_map_mode) -#define TWL6030_FIXED_LDO(label, offset, mVolts, turnon_delay) \ - TWL_FIXED_LDO(label, offset, mVolts, 0x0, turnon_delay, \ - 0x0, TWL6030, twl6030fixed_ops, NULL) - #define TWL4030_ADJUSTABLE_LDO(label, offset, num, turnon_delay, remap_conf) \ static const struct twlreg_info TWL4030_INFO_##label = { \ .base = offset, \ @@ -983,8 +974,27 @@ static const struct twlreg_info TWL6032_INFO_##label = { \ }, \ } -#define TWL_FIXED_LDO(label, offset, mVolts, num, turnon_delay, remap_conf, \ - family, operations, map_mode) \ +#define TWL6030_FIXED_LDO(label, offset, mVolts, turnon_delay) \ +static const struct twlreg_info TWLFIXED_INFO_##label = { \ + .base = offset, \ + .id = 0, \ + .min_mV = mVolts, \ + .remap = 0, \ + .desc = { \ + .name = #label, \ + .id = TWL6030##_REG_##label, \ + .n_voltages = 1, \ + .ops = &twl6030fixed_ops, \ + .type = REGULATOR_VOLTAGE, \ + .owner = THIS_MODULE, \ + .min_uV = mVolts * 1000, \ + .enable_time = turnon_delay, \ + .of_map_mode = NULL, \ + }, \ + } + +#define TWL4030_FIXED_LDO(label, offset, mVolts, num, turnon_delay, \ + remap_conf) \ static const struct twlreg_info TWLFIXED_INFO_##label = { \ .base = offset, \ .id = num, \ @@ -992,14 +1002,14 @@ static const struct twlreg_info TWLFIXED_INFO_##label = { \ .remap = remap_conf, \ .desc = { \ .name = #label, \ - .id = family##_REG_##label, \ + .id = TWL4030##_REG_##label, \ .n_voltages = 1, \ - .ops = &operations, \ + .ops = &twl4030fixed_ops, \ .type = REGULATOR_VOLTAGE, \ .owner = THIS_MODULE, \ .min_uV = mVolts * 1000, \ .enable_time = turnon_delay, \ - .of_map_mode = map_mode, \ + .of_map_mode = twl4030reg_map_mode, \ }, \ }