mfd: ti_am335x_tscadc: Mimic the probe from resume()

Use the number of touchscreen wires (tsc_wires) instead of the flag
indicating a touchscreen cell (tsc_cell) to mimic the logic from the
probe.

Besides keeping a certain harmony in the driver, the main benefit is
that we are going to simplify the number of entries in the main MFD
structure and tsc_cell can now be removed more easily.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Acked-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Link: https://lore.kernel.org/r/20211015081506.933180-19-miquel.raynal@bootlin.com
This commit is contained in:
Miquel Raynal 2021-10-15 10:14:36 +02:00 committed by Lee Jones
parent f783484381
commit 2bb9e6a3d4
1 changed files with 1 additions and 1 deletions

View File

@ -323,7 +323,7 @@ static int __maybe_unused tscadc_resume(struct device *dev)
ctrl = CNTRLREG_STEPCONFIGWRT | CNTRLREG_STEPID; ctrl = CNTRLREG_STEPCONFIGWRT | CNTRLREG_STEPID;
regmap_write(tscadc->regmap, REG_CTRL, ctrl); regmap_write(tscadc->regmap, REG_CTRL, ctrl);
if (tscadc->tsc_cell != -1) { if (tscadc->tsc_wires > 0) {
if (tscadc->tsc_wires == 5) if (tscadc->tsc_wires == 5)
ctrl |= CNTRLREG_5WIRE | CNTRLREG_TSCENB; ctrl |= CNTRLREG_5WIRE | CNTRLREG_TSCENB;
else else