iio: mxs-lradc: Do hardware initialization earlier
Subsystems (4)
PATCH v2 1/1 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.
---
Changes since v1:
- do initialization later to avoid breaking 5wires touchscreens
drivers/staging/iio/adc/mxs-lradc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/staging/iio/adc/mxs-lradc.c +3 -3
@@ -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:
Signature · 1 line
1.7.10.4
PATCH v2 1/1 iio: mxs-lradc: Do hardware initialization earlier
Dear Alexandre Belloni,
Quoted 10 lines
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 withinput_register_device()and by the end ofmxs_lradc_probe(), we reset the LRADC block hence losing the correct configuration.Signed-off-by Alexandre Belloni <[email protected]>Cc Fabio Estevam <[email protected]>Cc Jonathan Cameron <[email protected]>Cc Marek Vasut <[email protected]>
Best regards,
Marek Vasut
PATCH v2 1/1 iio: mxs-lradc: Do hardware initialization earlier
Quoted 8 lines · Marek Vasut
Dear Alexandre Belloni,
Quoted 6 lines
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 withinput_register_device()and by the end ofmxs_lradc_probe(), we reset the LRADC block hence losing the correct configuration.
Quoted 6 lines
Quoted 4 lines
Signed-off-by Alexandre Belloni <[email protected]>Cc Fabio Estevam <[email protected]>Cc Jonathan Cameron <[email protected]>Cc Marek Vasut <[email protected]>Acked-by Marek Vasut <[email protected]>
Applied to togreg branch of iio.git. Thanks.
Quoted 8 lines
Best regards,
Marek Vasut
--
To unsubscribe from this list: send the line "unsubscribe linux-iio" in the body of a message to majordomo at vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html