From: Marek Vasut <marex@denx.de>
To: "Kristina Martšenko" <kristina.martsenko@gmail.com>
Cc: Jonathan Cameron <jic23@kernel.org>,
Hartmut Knaack <knaack.h@gmx.de>,
"Lars-Peter Clausen" <lars@metafoo.de>,
Peter Meerwald <pmeerw@pmeerw.net>,
Juergen Beisert <jbe@pengutronix.de>,
Alexandre Belloni <alexandre.belloni@free-electrons.com>,
Fabio Estevam <fabio.estevam@freescale.com>,
Stefan Wahren <stefan.wahren@i2se.com>,
"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
linux-iio@vger.kernel.org, devel@driverdev.osuosl.org
Subject: Re: [PATCH 3/4] iio: mxs-lradc: make ADC reads not unschedule touchscreen conversions
Date: Sun, 18 Jan 2015 01:22:09 +0100 [thread overview]
Message-ID: <201501180122.09232.marex@denx.de> (raw)
In-Reply-To: <1421454131-3501-4-git-send-email-kristina.martsenko@gmail.com>
On Saturday, January 17, 2015 at 01:22:10 AM, Kristina Mart=C5=A1enko wrote:
> Reading a channel through sysfs, or starting a buffered capture, can
> occasionally turn off the touchscreen.
>=20
> This is because the read_raw() and buffer preenable()/postdisable()
> callbacks unschedule current conversions on all channels. If a delay
> channel happens to schedule a touchscreen conversion at the same time,
> the conversion gets cancelled and the touchscreen sequence stops.
>=20
> This is probably related to this note from the reference manual:
>=20
> "If a delay group schedules channels to be sampled and a manual
> write to the schedule field in CTRL0 occurs while the block is
> discarding samples, the LRADC will switch to the new schedule
> and will not sample the channels that were previously scheduled.
> The time window for this to happen is very small and lasts only
> while the LRADC is discarding samples."
>=20
> So make the callbacks only unschedule conversions for the channels they
> use. This means channel 0 for read_raw() and channels 0-5 for the buffer
> (if the touchscreen is enabled). Since the touchscreen uses different
> channels (6 and 7), it no longer gets turned off.
>=20
> This is tested and fixes the issue on i.MX28, but hasn't been tested on
> i.MX23.
>=20
> Signed-off-by: Kristina Mart=C5=A1enko <kristina.martsenko@gmail.com>
Reviewed-by: Marek Vasut <marex@denx.de>
Best regards,
Marek Vasut
next prev parent reply other threads:[~2015-01-18 0:22 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-17 0:22 [PATCH 0/4] iio: mxs-lradc: fix interactions between the touchscreen and the ADC Kristina Martšenko
2015-01-17 0:22 ` [PATCH 1/4] iio: mxs-lradc: separate touchscreen and buffer virtual channels Kristina Martšenko
2015-01-18 0:19 ` Marek Vasut
2015-01-19 19:02 ` Kristina Martšenko
2015-01-20 1:29 ` Marek Vasut
2015-01-17 0:22 ` [PATCH 2/4] iio: mxs-lradc: make ADC reads not disable touchscreen interrupts Kristina Martšenko
2015-01-18 0:21 ` Marek Vasut
2015-01-19 19:03 ` Kristina Martšenko
2015-01-17 0:22 ` [PATCH 3/4] iio: mxs-lradc: make ADC reads not unschedule touchscreen conversions Kristina Martšenko
2015-01-18 0:22 ` Marek Vasut [this message]
2015-01-19 7:20 ` Juergen Borleis
2015-01-19 7:57 ` Marek Vasut
2015-01-19 20:03 ` Kristina Martšenko
2015-01-17 0:22 ` [PATCH 4/4] iio: mxs-lradc: only update the buffer when its conversions have finished Kristina Martšenko
2015-01-18 0:23 ` Marek Vasut
2015-01-18 11:21 ` [PATCH 0/4] iio: mxs-lradc: fix interactions between the touchscreen and the ADC Stefan Wahren
2015-01-19 20:30 ` Kristina Martšenko
2015-01-20 1:32 ` Marek Vasut
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=201501180122.09232.marex@denx.de \
--to=marex@denx.de \
--cc=alexandre.belloni@free-electrons.com \
--cc=devel@driverdev.osuosl.org \
--cc=fabio.estevam@freescale.com \
--cc=gregkh@linuxfoundation.org \
--cc=jbe@pengutronix.de \
--cc=jic23@kernel.org \
--cc=knaack.h@gmx.de \
--cc=kristina.martsenko@gmail.com \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--cc=pmeerw@pmeerw.net \
--cc=stefan.wahren@i2se.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).