summaryrefslogtreecommitdiffstats
path: root/drivers/mfd/ti_am335x_tscadc.c
diff options
context:
space:
mode:
authorAndrew F. Davis <afd@ti.com>2016-06-08 10:54:35 -0500
committerLee Jones <lee.jones@linaro.org>2016-06-29 10:14:39 +0100
commit0d3a7cce3e8bc5c060b1f038984c10cb70289e1d (patch)
treeb5c635c1381113573eaaa367468efda7b00b3d38 /drivers/mfd/ti_am335x_tscadc.c
parenta318b7d0fa9c28df057747d584caaac52115f026 (diff)
downloadblackbird-op-linux-0d3a7cce3e8bc5c060b1f038984c10cb70289e1d.tar.gz
blackbird-op-linux-0d3a7cce3e8bc5c060b1f038984c10cb70289e1d.zip
mfd: ti_am335x_tscadc: Rename regmap_tscadc to regmap
The regmap structure 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 <afd@ti.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
Diffstat (limited to 'drivers/mfd/ti_am335x_tscadc.c')
-rw-r--r--drivers/mfd/ti_am335x_tscadc.c36
1 files changed, 18 insertions, 18 deletions
diff --git a/drivers/mfd/ti_am335x_tscadc.c b/drivers/mfd/ti_am335x_tscadc.c
index e71f6092be61..c8f027b4ea4c 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, &reg);
+ regmap_read(tscadc->regmap, REG_ADCFSM, &reg);
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, &reg);
+ regmap_read(tscadc->regmap, REG_ADCFSM, &reg);
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)
@@ -187,11 +187,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;
}
@@ -221,11 +221,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) {
@@ -239,7 +239,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;
@@ -285,7 +285,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);
@@ -299,7 +299,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;
@@ -314,7 +314,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)
@@ -324,9 +324,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;
}
OpenPOWER on IntegriCloud