From patchwork Tue May 31 17:00:10 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Davis X-Patchwork-Id: 9145271 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 EE12360761 for ; Tue, 31 May 2016 17:04:29 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DBED320855 for ; Tue, 31 May 2016 17:04:29 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D085425D97; Tue, 31 May 2016 17:04:29 +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 2643F20855 for ; Tue, 31 May 2016 17:04:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932113AbcEaREL (ORCPT ); Tue, 31 May 2016 13:04:11 -0400 Received: from comal.ext.ti.com ([198.47.26.152]:60089 "EHLO comal.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755430AbcEaRAg (ORCPT ); Tue, 31 May 2016 13:00:36 -0400 Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by comal.ext.ti.com (8.13.7/8.13.7) with ESMTP id u4VH0BYi024078; Tue, 31 May 2016 12:00:11 -0500 Received: from DFLE72.ent.ti.com (dfle72.ent.ti.com [128.247.5.109]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id u4VH0FHG000693; Tue, 31 May 2016 12:00:15 -0500 Received: from dlep33.itg.ti.com (157.170.170.75) by DFLE72.ent.ti.com (128.247.5.109) with Microsoft SMTP Server id 14.3.294.0; Tue, 31 May 2016 12:00:14 -0500 Received: from legion.dal.design.ti.com (legion.dal.design.ti.com [128.247.22.53]) by dlep33.itg.ti.com (8.14.3/8.13.8) with ESMTP id u4VH0EFp005419; Tue, 31 May 2016 12:00:14 -0500 Received: from localhost (uda0226330.am.dhcp.ti.com [128.247.83.127]) by legion.dal.design.ti.com (8.11.7p1+Sun/8.11.7) with ESMTP id u4VH0E317737; Tue, 31 May 2016 12:00:14 -0500 (CDT) From: "Andrew F. Davis" To: Jonathan Cameron , Hartmut Knaack , Lars-Peter Clausen , Peter Meerwald-Stadler , Dmitry Torokhov , Lee Jones , Dave Gerlach CC: , , , "Andrew F . Davis" Subject: [PATCH 5/8] mfd: ti_am335x_tscadc: Rename regmap_tscadc to regmap Date: Tue, 31 May 2016 12:00:10 -0500 Message-ID: <20160531170013.2649-6-afd@ti.com> X-Mailer: git-send-email 2.8.3 In-Reply-To: <20160531170013.2649-1-afd@ti.com> References: <20160531170013.2649-1-afd@ti.com> MIME-Version: 1.0 Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The regmap structuer pointer is named regmap_tscadc, this is not consistent with other drivers and is redundant, it also contributes to several checkpatch warnings involving long lines. Rename this. Signed-off-by: Andrew F. Davis --- drivers/mfd/ti_am335x_tscadc.c | 36 ++++++++++++++++++------------------ include/linux/mfd/ti_am335x_tscadc.h | 2 +- 2 files changed, 19 insertions(+), 19 deletions(-) diff --git a/drivers/mfd/ti_am335x_tscadc.c b/drivers/mfd/ti_am335x_tscadc.c index 9b293b1..d30bea5 100644 --- a/drivers/mfd/ti_am335x_tscadc.c +++ b/drivers/mfd/ti_am335x_tscadc.c @@ -43,7 +43,7 @@ void am335x_tsc_se_set_cache(struct ti_tscadc_dev *tscadc, u32 val) if (tscadc->adc_waiting) wake_up(&tscadc->reg_se_wait); else if (!tscadc->adc_in_use) - regmap_write(tscadc->regmap_tscadc, REG_SE, tscadc->reg_se_cache); + regmap_write(tscadc->regmap, REG_SE, tscadc->reg_se_cache); spin_unlock_irqrestore(&tscadc->reg_lock, flags); } @@ -54,7 +54,7 @@ static void am335x_tscadc_need_adc(struct ti_tscadc_dev *tscadc) DEFINE_WAIT(wait); u32 reg; - regmap_read(tscadc->regmap_tscadc, REG_ADCFSM, ®); + regmap_read(tscadc->regmap, REG_ADCFSM, ®); if (reg & SEQ_STATUS) { tscadc->adc_waiting = true; prepare_to_wait(&tscadc->reg_se_wait, &wait, @@ -70,7 +70,7 @@ static void am335x_tscadc_need_adc(struct ti_tscadc_dev *tscadc) * Sequencer should either be idle or * busy applying the charge step. */ - regmap_read(tscadc->regmap_tscadc, REG_ADCFSM, ®); + regmap_read(tscadc->regmap, REG_ADCFSM, ®); WARN_ON((reg & SEQ_STATUS) && !(reg & CHARGE_STEP)); tscadc->adc_waiting = false; } @@ -82,7 +82,7 @@ void am335x_tsc_se_set_once(struct ti_tscadc_dev *tscadc, u32 val) spin_lock_irq(&tscadc->reg_lock); am335x_tscadc_need_adc(tscadc); - regmap_write(tscadc->regmap_tscadc, REG_SE, val); + regmap_write(tscadc->regmap, REG_SE, val); spin_unlock_irq(&tscadc->reg_lock); } EXPORT_SYMBOL_GPL(am335x_tsc_se_set_once); @@ -93,7 +93,7 @@ void am335x_tsc_se_adc_done(struct ti_tscadc_dev *tscadc) spin_lock_irqsave(&tscadc->reg_lock, flags); tscadc->adc_in_use = false; - regmap_write(tscadc->regmap_tscadc, REG_SE, tscadc->reg_se_cache); + regmap_write(tscadc->regmap, REG_SE, tscadc->reg_se_cache); spin_unlock_irqrestore(&tscadc->reg_lock, flags); } EXPORT_SYMBOL_GPL(am335x_tsc_se_adc_done); @@ -104,7 +104,7 @@ void am335x_tsc_se_clr(struct ti_tscadc_dev *tscadc, u32 val) spin_lock_irqsave(&tscadc->reg_lock, flags); tscadc->reg_se_cache &= ~val; - regmap_write(tscadc->regmap_tscadc, REG_SE, tscadc->reg_se_cache); + regmap_write(tscadc->regmap, REG_SE, tscadc->reg_se_cache); spin_unlock_irqrestore(&tscadc->reg_lock, flags); } EXPORT_SYMBOL_GPL(am335x_tsc_se_clr); @@ -116,7 +116,7 @@ static void tscadc_idle_config(struct ti_tscadc_dev *tscadc) idleconfig = STEPCONFIG_YNN | STEPCONFIG_INM_ADCREFM | STEPCONFIG_INP_ADCREFM | STEPCONFIG_YPN; - regmap_write(tscadc->regmap_tscadc, REG_IDLECONFIG, idleconfig); + regmap_write(tscadc->regmap, REG_IDLECONFIG, idleconfig); } static int ti_tscadc_probe(struct platform_device *pdev) @@ -188,11 +188,11 @@ static int ti_tscadc_probe(struct platform_device *pdev) if (IS_ERR(tscadc->tscadc_base)) return PTR_ERR(tscadc->tscadc_base); - tscadc->regmap_tscadc = devm_regmap_init_mmio(&pdev->dev, + tscadc->regmap = devm_regmap_init_mmio(&pdev->dev, tscadc->tscadc_base, &tscadc_regmap_config); - if (IS_ERR(tscadc->regmap_tscadc)) { + if (IS_ERR(tscadc->regmap)) { dev_err(&pdev->dev, "regmap init failed\n"); - err = PTR_ERR(tscadc->regmap_tscadc); + err = PTR_ERR(tscadc->regmap); goto ret; } @@ -222,11 +222,11 @@ static int ti_tscadc_probe(struct platform_device *pdev) /* TSCADC_CLKDIV needs to be configured to the value minus 1 */ tscadc->clk_div--; - regmap_write(tscadc->regmap_tscadc, REG_CLKDIV, tscadc->clk_div); + regmap_write(tscadc->regmap, REG_CLKDIV, tscadc->clk_div); /* Set the control register bits */ ctrl = CNTRLREG_STEPCONFIGWRT | CNTRLREG_STEPID; - regmap_write(tscadc->regmap_tscadc, REG_CTRL, ctrl); + regmap_write(tscadc->regmap, REG_CTRL, ctrl); /* Set register bits for Idle Config Mode */ if (tsc_wires > 0) { @@ -240,7 +240,7 @@ static int ti_tscadc_probe(struct platform_device *pdev) /* Enable the TSC module enable bit */ ctrl |= CNTRLREG_TSCSSENB; - regmap_write(tscadc->regmap_tscadc, REG_CTRL, ctrl); + regmap_write(tscadc->regmap, REG_CTRL, ctrl); tscadc->used_cells = 0; tscadc->tsc_cell = -1; @@ -286,7 +286,7 @@ static int ti_tscadc_remove(struct platform_device *pdev) { struct ti_tscadc_dev *tscadc = platform_get_drvdata(pdev); - regmap_write(tscadc->regmap_tscadc, REG_SE, 0x00); + regmap_write(tscadc->regmap, REG_SE, 0x00); pm_runtime_put_sync(&pdev->dev); pm_runtime_disable(&pdev->dev); @@ -300,7 +300,7 @@ static int __maybe_unused tscadc_suspend(struct device *dev) { struct ti_tscadc_dev *tscadc = dev_get_drvdata(dev); - regmap_write(tscadc->regmap_tscadc, REG_SE, 0x00); + regmap_write(tscadc->regmap, REG_SE, 0x00); pm_runtime_put_sync(dev); return 0; @@ -315,7 +315,7 @@ static int __maybe_unused tscadc_resume(struct device *dev) /* context restore */ ctrl = CNTRLREG_STEPCONFIGWRT | CNTRLREG_STEPID; - regmap_write(tscadc->regmap_tscadc, REG_CTRL, ctrl); + regmap_write(tscadc->regmap, REG_CTRL, ctrl); if (tscadc->tsc_cell != -1) { if (tscadc->tsc_wires == 5) @@ -325,9 +325,9 @@ static int __maybe_unused tscadc_resume(struct device *dev) tscadc_idle_config(tscadc); } ctrl |= CNTRLREG_TSCSSENB; - regmap_write(tscadc->regmap_tscadc, REG_CTRL, ctrl); + regmap_write(tscadc->regmap, REG_CTRL, ctrl); - regmap_write(tscadc->regmap_tscadc, REG_CLKDIV, tscadc->clk_div); + regmap_write(tscadc->regmap, REG_CLKDIV, tscadc->clk_div); return 0; } diff --git a/include/linux/mfd/ti_am335x_tscadc.h b/include/linux/mfd/ti_am335x_tscadc.h index 1fd50dc..2567a87 100644 --- a/include/linux/mfd/ti_am335x_tscadc.h +++ b/include/linux/mfd/ti_am335x_tscadc.h @@ -153,7 +153,7 @@ struct ti_tscadc_dev { struct device *dev; - struct regmap *regmap_tscadc; + struct regmap *regmap; void __iomem *tscadc_base; int irq; int used_cells; /* 1-2 */