From 2bb9e6a3d4e86453cba0631ab603bf54bb28f6da Mon Sep 17 00:00:00 2001 From: Miquel Raynal Date: Fri, 15 Oct 2021 10:14:36 +0200 Subject: 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 Acked-by: Jonathan Cameron Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20211015081506.933180-19-miquel.raynal@bootlin.com --- drivers/mfd/ti_am335x_tscadc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/mfd/ti_am335x_tscadc.c') diff --git a/drivers/mfd/ti_am335x_tscadc.c b/drivers/mfd/ti_am335x_tscadc.c index 69b0eff1a55e..d9c0b16d8d0d 100644 --- a/drivers/mfd/ti_am335x_tscadc.c +++ b/drivers/mfd/ti_am335x_tscadc.c @@ -323,7 +323,7 @@ static int __maybe_unused tscadc_resume(struct device *dev) ctrl = CNTRLREG_STEPCONFIGWRT | CNTRLREG_STEPID; regmap_write(tscadc->regmap, REG_CTRL, ctrl); - if (tscadc->tsc_cell != -1) { + if (tscadc->tsc_wires > 0) { if (tscadc->tsc_wires == 5) ctrl |= CNTRLREG_5WIRE | CNTRLREG_TSCENB; else -- cgit v1.2.3