summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexandre Belloni <alexandre.belloni@free-electrons.com>2013-03-28 22:04:00 +0000
committerJonathan Cameron <jic23@kernel.org>2013-03-29 09:29:11 +0000
commitf6e8a9687b785b4c75d71370681f7a6e9fd89685 (patch)
treede7759598e9b319012bba36ddafb37af972b3151
parentdf4b404b35e3e125b7e6d82f9affc6c704502cb3 (diff)
iio: mxs-lradc: Do hardware initialization earlier
We need to initialize hardware before registering the touchscreen. Else, we end up setting registers in mxs_lradc_ts_open(), getting called just after registering the touchscreen with input_register_device() and by the end of mxs_lradc_probe(), we reset the LRADC block hence losing the correct configuration. Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com> Acked-by: Marek Vasut <marex@denx.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org> Cc: Fabio Estevam <fabio.estevam@freescale.com>
-rw-r--r--drivers/staging/iio/adc/mxs-lradc.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/staging/iio/adc/mxs-lradc.c b/drivers/staging/iio/adc/mxs-lradc.c
index eab975d11bb2..6044e1717b20 100644
--- a/drivers/staging/iio/adc/mxs-lradc.c
+++ b/drivers/staging/iio/adc/mxs-lradc.c
@@ -983,6 +983,9 @@ static int mxs_lradc_probe(struct platform_device *pdev)
if (ret)
goto err_trig;
+ /* Configure the hardware. */
+ mxs_lradc_hw_init(lradc);
+
/* Register the touchscreen input device. */
ret = mxs_lradc_ts_register(lradc);
if (ret)
@@ -995,9 +998,6 @@ static int mxs_lradc_probe(struct platform_device *pdev)
goto err_ts;
}
- /* Configure the hardware. */
- mxs_lradc_hw_init(lradc);
-
return 0;
err_ts: