From: Andrew Morton <akpm@linux-foundation.org>
To: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: Dmitry Torokhov <dtor@mail.ru>,
linux-input@vger.kernel.org, linux-kernel@vger.kernel.org,
Liam Girdwood <liam.girdwood@wolfsonmicro.com>,
Graeme Gregory <gg@opensource.wolfsonmicro.com>,
Mike Arthur <mike.arthur@wolfsonmicro.com>,
Dmitry Baryshkov <dbaryshkov@gmail.com>,
Stanley Cai <stanley.cai@intel.com>,
Rodolfo Giometti <giometti@enneenne.com>,
Russell King <rmk@arm.linux.org.uk>,
Marc Kleine-Budde <mkl@pengutronix.de>,
Pete MacKay <linux01@architechnical.net>,
Ian Molton <spyro@f2s.com>, Vince Sanders <vince@kyllikki.org>,
Andrew Zabolotny <zap@homelink.ru>
Subject: Re: [PATCH 5/6] Driver for WM97xx touchscreens in streaming mode on Mainstone
Date: Wed, 27 Feb 2008 23:09:41 -0800 [thread overview]
Message-ID: <20080227230941.f0885763.akpm@linux-foundation.org> (raw)
In-Reply-To: <12040332181746-git-send-email-broonie@opensource.wolfsonmicro.com>
On Tue, 26 Feb 2008 13:40:17 +0000 Mark Brown <broonie@opensource.wolfsonmicro.com> wrote:
> +#ifdef CONFIG_PXA27x
> +static void wm97xx_acc_pen_up(struct wm97xx *wm)
> +{
> + set_current_state(TASK_INTERRUPTIBLE);
> + schedule_timeout(1);
> +
> + while (MISR & (1 << 2))
> + MODR;
> +}
> +#else
> +static void wm97xx_acc_pen_up(struct wm97xx *wm)
> +{
> + int count = 16;
> + set_current_state(TASK_INTERRUPTIBLE);
> + schedule_timeout(1);
> +
> + while (count < 16) {
> + MODR;
> + count--;
> + }
> +}
> +#endif
Can use schedule_timeout_interruptible() here.
If the calling process happens to have a signal pending then the
schedule_timeout() becomes a no-op. Will the driver still function
correctly?
> +static int wm97xx_acc_pen_down(struct wm97xx *wm)
> +{
> + u16 x, y, p = 0x100 | WM97XX_ADCSEL_PRES;
> + int reads = 0;
> +
> + /* data is never immediately available after pen down irq */
> + set_current_state(TASK_INTERRUPTIBLE);
> + schedule_timeout(1);
dittoes.
> + if (tries > 5) {
> + tries = 0;
> + return RC_PENUP;
> + }
> +
> + x = MODR;
> + if (x == last) {
> + tries++;
> + return RC_AGAIN;
> + }
> + last = x;
> + do {
> + if (reads)
> + x = MODR;
> + y = MODR;
> + if (pressure)
> + p = MODR;
> +
> + /* are samples valid */
> + if ((x & 0x7000) != WM97XX_ADCSEL_X ||
> + (y & 0x7000) != WM97XX_ADCSEL_Y ||
> + (p & 0x7000) != WM97XX_ADCSEL_PRES)
> + goto up;
> +
> + /* coordinate is good */
> + tries = 0;
> + input_report_abs(wm->input_dev, ABS_X, x & 0xfff);
> + input_report_abs(wm->input_dev, ABS_Y, y & 0xfff);
> + input_report_abs(wm->input_dev, ABS_PRESSURE, p & 0xfff);
> + input_sync(wm->input_dev);
> + reads++;
> + } while (reads < cinfo[sp_idx].reads);
> +up:
> + return RC_PENDOWN | RC_AGAIN;
> +}
> +
next prev parent reply other threads:[~2008-02-28 7:12 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-26 13:40 [PATCH 1/6] Core driver for WM97xx touchscreens Mark Brown
2008-02-26 13:40 ` Mark Brown
2008-02-28 7:09 ` Andrew Morton
2008-02-28 15:30 ` Mark Brown
2008-02-26 13:40 ` [PATCH 2/6] Add chip driver for WM9705 touchscreen Mark Brown
2008-02-26 13:40 ` Mark Brown
2008-02-28 7:09 ` Andrew Morton
2008-02-28 11:46 ` Mark Brown
2008-02-26 13:40 ` [PATCH 3/6] Add chip driver for WM9712 touchscreen Mark Brown
2008-02-26 13:40 ` Mark Brown
2008-02-28 7:09 ` Andrew Morton
2008-02-28 13:07 ` Mark Brown
2008-02-26 13:40 ` [PATCH 4/6] Add chip driver for WM9713 touchscreen Mark Brown
2008-02-26 13:40 ` Mark Brown
2008-02-26 13:40 ` [PATCH 5/6] Driver for WM97xx touchscreens in streaming mode on Mainstone Mark Brown
2008-02-26 13:40 ` Mark Brown
2008-02-28 7:09 ` Andrew Morton [this message]
2008-02-29 16:18 ` Mark Brown
2008-02-26 13:40 ` [PATCH 6/6] Build system and MAINTAINERS entry for WM97xx touchscreen drivers Mark Brown
2008-02-26 13:40 ` Mark Brown
-- strict thread matches above, loose matches on Subject: below --
2008-04-01 10:28 Mark Brown
2008-04-01 10:36 ` [PATCH 1/6] Core driver for WM97xx touchscreens Mark Brown
2008-04-01 10:36 ` [PATCH 2/6] Add chip driver for WM9705 touchscreen Mark Brown
2008-04-01 10:36 ` [PATCH 3/6] Add chip driver for WM9712 touchscreen Mark Brown
2008-04-01 10:36 ` [PATCH 4/6] Add chip driver for WM9713 touchscreen Mark Brown
2008-04-01 10:36 ` [PATCH 5/6] Driver for WM97xx touchscreens in streaming mode on Mainstone Mark Brown
2008-03-20 9:39 WM97xx touchscreen drivers Mark Brown
2008-03-20 9:42 ` [PATCH 1/6] Core driver for WM97xx touchscreens Mark Brown
2008-03-20 9:42 ` [PATCH 2/6] Add chip driver for WM9705 touchscreen Mark Brown
2008-03-20 9:42 ` [PATCH 3/6] Add chip driver for WM9712 touchscreen Mark Brown
2008-03-20 9:42 ` [PATCH 4/6] Add chip driver for WM9713 touchscreen Mark Brown
2008-03-20 9:42 ` [PATCH 5/6] Driver for WM97xx touchscreens in streaming mode on Mainstone Mark Brown
2008-03-04 14:02 WM97xx touchscreen drivers Mark Brown
2008-03-04 14:04 ` [PATCH 1/6] Core driver for WM97xx touchscreens Mark Brown
2008-03-04 14:04 ` [PATCH 2/6] Add chip driver for WM9705 touchscreen Mark Brown
2008-03-04 14:04 ` [PATCH 3/6] Add chip driver for WM9712 touchscreen Mark Brown
2008-03-04 14:04 ` [PATCH 4/6] Add chip driver for WM9713 touchscreen Mark Brown
2008-03-04 14:04 ` [PATCH 5/6] Driver for WM97xx touchscreens in streaming mode on Mainstone Mark Brown
2008-02-29 16:50 WM97xx touchscreen drivers Mark Brown
2008-02-29 16:52 ` [PATCH 1/6] Core driver for WM97xx touchscreens Mark Brown
2008-02-29 16:52 ` [PATCH 2/6] Add chip driver for WM9705 touchscreen Mark Brown
2008-02-29 16:52 ` [PATCH 3/6] Add chip driver for WM9712 touchscreen Mark Brown
2008-02-29 16:52 ` [PATCH 4/6] Add chip driver for WM9713 touchscreen Mark Brown
2008-02-29 16:52 ` [PATCH 5/6] Driver for WM97xx touchscreens in streaming mode on Mainstone Mark Brown
2008-02-13 14:06 [UPDATED v7] WM97xx touchscreen drivers Mark Brown
2008-02-13 14:13 ` [PATCH 1/6] Core driver for WM97xx touchscreens Mark Brown
2008-02-13 14:13 ` [PATCH 2/6] Add chip driver for WM9705 touchscreen Mark Brown
2008-02-13 14:13 ` [PATCH 3/6] Add chip driver for WM9712 touchscreen Mark Brown
2008-02-13 14:14 ` [PATCH 4/6] Add chip driver for WM9713 touchscreen Mark Brown
2008-02-13 14:14 ` [PATCH 5/6] Driver for WM97xx touchscreens in streaming mode on Mainstone Mark Brown
2008-02-12 10:17 [UPDATED v6] WM97xx touchscreen drivers Mark Brown
2008-02-12 10:21 ` [PATCH 1/6] Core driver for WM97xx touchscreens Mark Brown
2008-02-12 10:21 ` [PATCH 2/6] Add chip driver for WM9705 touchscreen Mark Brown
2008-02-12 10:21 ` [PATCH 3/6] Add chip driver for WM9712 touchscreen Mark Brown
2008-02-12 10:21 ` [PATCH 4/6] Add chip driver for WM9713 touchscreen Mark Brown
2008-02-12 10:21 ` [PATCH 5/6] Driver for WM97xx touchscreens in streaming mode on Mainstone Mark Brown
2008-01-26 15:18 [UPDATED v4] WM97xx touchscreen drivers Mark Brown
2008-01-26 17:28 ` [PATCH 1/6] Core driver for WM97xx touchscreens Mark Brown
2008-01-26 17:28 ` [PATCH 2/6] Add chip driver for WM9705 touchscreen Mark Brown
2008-01-26 17:28 ` [PATCH 3/6] Add chip driver for WM9712 touchscreen Mark Brown
2008-01-26 17:28 ` [PATCH 4/6] Add chip driver for WM9713 touchscreen Mark Brown
2008-01-26 17:28 ` [PATCH 5/6] Driver for WM97xx touchscreens in streaming mode on Mainstone Mark Brown
2008-01-21 15:24 [UPDATED v3] WM97xx touchscreen drivers Mark Brown
2008-01-21 15:24 ` [PATCH 1/6] Core driver for WM97xx touchscreens Mark Brown
2008-01-21 15:24 ` [PATCH 2/6] Add chip driver for WM9705 touchscreen Mark Brown
2008-01-21 15:24 ` [PATCH 3/6] Add chip driver for WM9712 touchscreen Mark Brown
2008-01-21 15:24 ` [PATCH 4/6] Add chip driver for WM9713 touchscreen Mark Brown
2008-01-21 15:24 ` [PATCH 5/6] Driver for WM97xx touchscreens in streaming mode on Mainstone Mark Brown
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=20080227230941.f0885763.akpm@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=broonie@opensource.wolfsonmicro.com \
--cc=dbaryshkov@gmail.com \
--cc=dtor@mail.ru \
--cc=gg@opensource.wolfsonmicro.com \
--cc=giometti@enneenne.com \
--cc=liam.girdwood@wolfsonmicro.com \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux01@architechnical.net \
--cc=mike.arthur@wolfsonmicro.com \
--cc=mkl@pengutronix.de \
--cc=rmk@arm.linux.org.uk \
--cc=spyro@f2s.com \
--cc=stanley.cai@intel.com \
--cc=vince@kyllikki.org \
--cc=zap@homelink.ru \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.