From patchwork Sat Nov 12 12:42:13 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicolae Rosia X-Patchwork-Id: 9424091 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 001F06047D for ; Sat, 12 Nov 2016 12:43:23 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E933A296D5 for ; Sat, 12 Nov 2016 12:43:22 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DE246296F4; Sat, 12 Nov 2016 12:43:22 +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 888E5296D5 for ; Sat, 12 Nov 2016 12:43:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S938838AbcKLMmk (ORCPT ); Sat, 12 Nov 2016 07:42:40 -0500 Received: from relay1.mentorg.com ([192.94.38.131]:46719 "EHLO relay1.mentorg.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S938833AbcKLMmj (ORCPT ); Sat, 12 Nov 2016 07:42:39 -0500 Received: from nat-ies.mentorg.com ([192.94.31.2] helo=SVR-IES-FEM-01.mgc.mentorg.com) by relay1.mentorg.com with esmtp id 1c5Xdl-0006UQ-Ad from Nicolae_Rosia@mentor.com ; Sat, 12 Nov 2016 04:42:37 -0800 Received: from rosia.mgc (137.202.0.76) by SVR-IES-FEM-01.mgc.mentorg.com (137.202.0.104) with Microsoft SMTP Server id 14.3.224.2; Sat, 12 Nov 2016 12:42:36 +0000 From: Nicolae Rosia To: Tony Lindgren CC: Liam Girdwood , Mark Brown , , , Nicolae Rosia Subject: [PATCH 2/4] regulator: twl: kill unused functions Date: Sat, 12 Nov 2016 14:42:13 +0200 Message-ID: <1478954535-17325-3-git-send-email-Nicolae_Rosia@mentor.com> X-Mailer: git-send-email 2.5.5 In-Reply-To: <1478954535-17325-1-git-send-email-Nicolae_Rosia@mentor.com> References: <1478954535-17325-1-git-send-email-Nicolae_Rosia@mentor.com> MIME-Version: 1.0 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 This code was used by OMAP platform based boards which are now DT only. Proper support for SMPS is missing in this driver. Signed-off-by: Nicolae Rosia --- drivers/regulator/twl-regulator.c | 29 ++--------------------------- 1 file changed, 2 insertions(+), 27 deletions(-) diff --git a/drivers/regulator/twl-regulator.c b/drivers/regulator/twl-regulator.c index f92b13a..e0d81f8 100644 --- a/drivers/regulator/twl-regulator.c +++ b/drivers/regulator/twl-regulator.c @@ -60,13 +60,6 @@ struct twlreg_info { /* chip specific features */ unsigned long features; - /* - * optional override functions for voltage set/get - * these are currently only used for SMPS regulators - */ - int (*get_voltage)(void *data); - int (*set_voltage)(void *data, int target_uV); - /* data passed from board for external get/set voltage */ void *data; }; @@ -565,12 +558,7 @@ twl4030smps_set_voltage(struct regulator_dev *rdev, int min_uV, int max_uV, struct twlreg_info *info = rdev_get_drvdata(rdev); int vsel = DIV_ROUND_UP(min_uV - 600000, 12500); - if (info->set_voltage) { - return info->set_voltage(info->data, min_uV); - } else { - twlreg_write(info, TWL_MODULE_PM_RECEIVER, - VREG_VOLTAGE_SMPS_4030, vsel); - } + twlreg_write(info, TWL_MODULE_PM_RECEIVER, VREG_VOLTAGE_SMPS_4030, vsel); return 0; } @@ -580,9 +568,6 @@ static int twl4030smps_get_voltage(struct regulator_dev *rdev) struct twlreg_info *info = rdev_get_drvdata(rdev); int vsel; - if (info->get_voltage) - return info->get_voltage(info->data); - vsel = twlreg_read(info, TWL_MODULE_PM_RECEIVER, VREG_VOLTAGE_SMPS_4030); @@ -597,21 +582,11 @@ static struct regulator_ops twl4030smps_ops = { static int twl6030coresmps_set_voltage(struct regulator_dev *rdev, int min_uV, int max_uV, unsigned *selector) { - struct twlreg_info *info = rdev_get_drvdata(rdev); - - if (info->set_voltage) - return info->set_voltage(info->data, min_uV); - return -ENODEV; } static int twl6030coresmps_get_voltage(struct regulator_dev *rdev) { - struct twlreg_info *info = rdev_get_drvdata(rdev); - - if (info->get_voltage) - return info->get_voltage(info->data); - return -ENODEV; } @@ -1159,7 +1134,7 @@ MODULE_DEVICE_TABLE(of, twl_of_match); static int twlreg_probe(struct platform_device *pdev) { - int i, id; + int id; struct twlreg_info *info; const struct twlreg_info *template; struct regulator_init_data *initdata;