linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] iio: mxs-lradc: Do hardware initialization earlier
@ 2013-03-28 22:04 Alexandre Belloni
  2013-03-28 22:58 ` Marek Vasut
  0 siblings, 1 reply; 3+ messages in thread
From: Alexandre Belloni @ 2013-03-28 22:04 UTC (permalink / raw)
  To: linux-arm-kernel

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>
Cc: Fabio Estevam <fabio.estevam@freescale.com>
Cc: Jonathan Cameron <jic23@kernel.org>
Cc: Marek Vasut <marex@denx.de>
---

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(-)

diff --git a/drivers/staging/iio/adc/mxs-lradc.c b/drivers/staging/iio/adc/mxs-lradc.c
index 55a459b..f217f06 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:
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH v2] iio: mxs-lradc: Do hardware initialization earlier
  2013-03-28 22:04 [PATCH v2] iio: mxs-lradc: Do hardware initialization earlier Alexandre Belloni
@ 2013-03-28 22:58 ` Marek Vasut
  2013-03-29  9:30   ` Jonathan Cameron
  0 siblings, 1 reply; 3+ messages in thread
From: Marek Vasut @ 2013-03-28 22:58 UTC (permalink / raw)
  To: linux-arm-kernel

Dear Alexandre Belloni,

> 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>
> Cc: Fabio Estevam <fabio.estevam@freescale.com>
> Cc: Jonathan Cameron <jic23@kernel.org>
> Cc: Marek Vasut <marex@denx.de>

Acked-by: Marek Vasut <marex@denx.de>

Best regards,
Marek Vasut

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH v2] iio: mxs-lradc: Do hardware initialization earlier
  2013-03-28 22:58 ` Marek Vasut
@ 2013-03-29  9:30   ` Jonathan Cameron
  0 siblings, 0 replies; 3+ messages in thread
From: Jonathan Cameron @ 2013-03-29  9:30 UTC (permalink / raw)
  To: linux-arm-kernel

On 03/28/2013 10:58 PM, Marek Vasut wrote:
> Dear Alexandre Belloni,
> 
>> 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>
>> Cc: Fabio Estevam <fabio.estevam@freescale.com>
>> Cc: Jonathan Cameron <jic23@kernel.org>
>> Cc: Marek Vasut <marex@denx.de>
> 
> Acked-by: Marek Vasut <marex@denx.de>
Applied to togreg branch of iio.git. Thanks.
> 
> 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
> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-03-29  9:30 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-28 22:04 [PATCH v2] iio: mxs-lradc: Do hardware initialization earlier Alexandre Belloni
2013-03-28 22:58 ` Marek Vasut
2013-03-29  9:30   ` Jonathan Cameron

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).