Thread (77 messages) 77 messages, 4 authors, 2021-09-19
STALE1711d
Revisions (5)
  1. v1 [diff vs current]
  2. v2 current
  3. v3 [diff vs current]
  4. v4 [diff vs current]
  5. v6 [diff vs current]

[PATCH v2 33/46] mfd: ti_am335x_tscadc: Move control register configuration

From: Miquel Raynal <miquel.raynal@bootlin.com>
Date: 2021-09-02 21:53:03
Also in: linux-iio, linux-input, linux-omap
Subsystem: multifunction devices (mfd), the rest · Maintainers: Lee Jones, Linus Torvalds

The datasheet states that most of the configuration should be set in the
control register in the first place, before actually enabling the
hardware. So far only half of the configuration was made in the first
step, which does not make really sense and would complicating the code
when introducing support for the am437x hardware.

Let's move that register write a bit below to enclose more configuration.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
---
 drivers/mfd/ti_am335x_tscadc.c | 2 ++
 1 file changed, 2 insertions(+)
diff --git a/drivers/mfd/ti_am335x_tscadc.c b/drivers/mfd/ti_am335x_tscadc.c
index 29ada9da8826..a0db3e4ff265 100644
--- a/drivers/mfd/ti_am335x_tscadc.c
+++ b/drivers/mfd/ti_am335x_tscadc.c
@@ -239,6 +239,8 @@ static	int ti_tscadc_probe(struct platform_device *pdev)
 	}
 	regmap_write(tscadc->regmap, REG_CTRL, tscadc->ctrl);
 
+	regmap_write(tscadc->regmap, REG_CTRL, tscadc->ctrl);
+
 	tscadc_idle_config(tscadc);
 
 	/* Enable the TSC module enable bit */
-- 
2.27.0
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help