Skip to contentSkip to conversation

iio: mxs-lradc: Do hardware initialization earlier

PATCH New Alexandre Belloni 3 participants 3 messages Mar 28, 2013 – Mar 29, 2013

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

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.

Cc Fabio Estevam <[email protected]>
Cc Jonathan Cameron <[email protected]>
Cc Marek Vasut <[email protected]>

---

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
index 55a459b..f217f06 100644
@@ -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
#1 lore raw

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 with input_register_device() and by the end of mxs_lradc_probe(), we reset the LRADC block hence losing the correct configuration.

Cc Fabio Estevam <[email protected]>
Cc Jonathan Cameron <[email protected]>
Cc Marek Vasut <[email protected]>

Best regards,
Marek Vasut

maintainer Applied
#2 lore raw

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 with input_register_device() and by the end of mxs_lradc_probe(), we reset the LRADC block hence losing the correct configuration.

Quoted 6 lines
Quoted 4 lines
Cc Fabio Estevam <[email protected]>
Cc Jonathan Cameron <[email protected]>
Cc 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