From: Lee Jones <lee.jones@linaro.org>
To: "Andrew F. Davis" <afd@ti.com>
Cc: Jonathan Cameron <jic23@kernel.org>,
Hartmut Knaack <knaack.h@gmx.de>,
Lars-Peter Clausen <lars@metafoo.de>,
Peter Meerwald-Stadler <pmeerw@pmeerw.net>,
Dmitry Torokhov <dmitry.torokhov@gmail.com>,
Dave Gerlach <d-gerlach@ti.com>,
linux-iio@vger.kernel.org, linux-input@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 5/8] mfd: ti_am335x_tscadc: Rename regmap_tscadc to regmap
Date: Wed, 8 Jun 2016 16:33:53 +0100 [thread overview]
Message-ID: <20160608153353.GR14888@dell> (raw)
In-Reply-To: <20160531170013.2649-6-afd@ti.com>
On Tue, 31 May 2016, Andrew F. Davis wrote:
> 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.
Please spell check all of your subject lines and commit logs *before*
sending.
> Signed-off-by: Andrew F. Davis <afd@ti.com>
> ---
> drivers/mfd/ti_am335x_tscadc.c | 36 ++++++++++++++++++------------------
> include/linux/mfd/ti_am335x_tscadc.h | 2 +-
> 2 files changed, 19 insertions(+), 19 deletions(-)
For the patch:
Acked-by: Lee Jones <lee.jones@linaro.org>
> 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 */
--
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
next prev parent reply other threads:[~2016-06-08 15:33 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-31 17:00 [PATCH 0/8] TI AM335x TSC/ADC cleanup Andrew F. Davis
2016-05-31 17:00 ` [PATCH 1/8] mfd: ti_am335x_tscadc: Use SIMPLE_DEV_PM_OPS helper macro Andrew F. Davis
2016-06-08 15:35 ` Lee Jones
2016-05-31 17:00 ` [PATCH 4/8] mfd: ti_am335x_tscadc: Unify variable naming when refrencing ti_tscadc_dev Andrew F. Davis
2016-05-31 17:53 ` Dave Gerlach
2016-06-08 15:34 ` Lee Jones
[not found] ` <20160531170013.2649-1-afd-l0cyMroinI0@public.gmane.org>
2016-05-31 17:00 ` [PATCH 2/8] iio: adc: ti_am335x_adc: use SIMPLE_DEV_PM_OPS helper macro Andrew F. Davis
[not found] ` <20160531170013.2649-3-afd-l0cyMroinI0@public.gmane.org>
2016-06-03 12:16 ` Jonathan Cameron
2016-05-31 17:00 ` [PATCH 3/8] mfd: ti_am335x_tscadc: Remove use of single line functions Andrew F. Davis
2016-06-08 15:35 ` Lee Jones
2016-05-31 17:00 ` [PATCH 5/8] mfd: ti_am335x_tscadc: Rename regmap_tscadc to regmap Andrew F. Davis
2016-06-08 15:33 ` Lee Jones [this message]
2016-05-31 17:00 ` [PATCH 6/8] mfd: ti_am335x_tscadc: use variable name for sizeof() operator Andrew F. Davis
2016-06-08 15:35 ` Lee Jones
2016-05-31 17:00 ` [PATCH 7/8] iio: adc: ti_am335x_adc: use variable names " Andrew F. Davis
2016-06-03 12:15 ` Jonathan Cameron
2016-05-31 17:00 ` [PATCH 8/8] Input: ti_am335x_tsc - use variable name " Andrew F. Davis
[not found] ` <20160531170013.2649-9-afd-l0cyMroinI0@public.gmane.org>
2016-06-01 18:35 ` Dmitry Torokhov
2016-06-08 15:36 ` [PATCH 0/8] TI AM335x TSC/ADC cleanup Lee Jones
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160608153353.GR14888@dell \
--to=lee.jones@linaro.org \
--cc=afd@ti.com \
--cc=d-gerlach@ti.com \
--cc=dmitry.torokhov@gmail.com \
--cc=jic23@kernel.org \
--cc=knaack.h@gmx.de \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pmeerw@pmeerw.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).