[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220419163810.2118169-27-arnd@kernel.org>
Date: Tue, 19 Apr 2022 18:37:48 +0200
From: Arnd Bergmann <arnd@...nel.org>
To: robert.jarzmik@...e.fr, linux-arm-kernel@...ts.infradead.org
Cc: Arnd Bergmann <arnd@...db.de>, Daniel Mack <daniel@...que.org>,
Haojian Zhuang <haojian.zhuang@...il.com>,
Marek Vasut <marek.vasut@...il.com>,
Philipp Zabel <philipp.zabel@...il.com>,
Lubomir Rintel <lkundrak@...sk>,
Paul Parsons <lost.distance@...oo.com>,
Tomas Cech <sleep_walker@...e.com>,
Sergey Lapin <slapin@...fans.org>,
Thomas Bogendoerfer <tsbogend@...ha.franken.de>,
Michael Turquette <mturquette@...libre.com>,
Stephen Boyd <sboyd@...nel.org>,
"Rafael J. Wysocki" <rafael@...nel.org>,
Viresh Kumar <viresh.kumar@...aro.org>,
Dmitry Torokhov <dmitry.torokhov@...il.com>,
Ulf Hansson <ulf.hansson@...aro.org>,
Dominik Brodowski <linux@...inikbrodowski.net>,
Helge Deller <deller@....de>, Mark Brown <broonie@...nel.org>,
Linus Walleij <linus.walleij@...aro.org>,
linux-kernel@...r.kernel.org, linux-mips@...r.kernel.org,
linux-ide@...r.kernel.org, linux-clk@...r.kernel.org,
linux-pm@...r.kernel.org, linux-input@...r.kernel.org,
patches@...nsource.cirrus.com, linux-leds@...r.kernel.org,
linux-mmc@...r.kernel.org, linux-mtd@...ts.infradead.org,
linux-rtc@...r.kernel.org, linux-usb@...r.kernel.org,
linux-fbdev@...r.kernel.org, dri-devel@...ts.freedesktop.org,
alsa-devel@...a-project.org
Subject: [PATCH 26/48] input: touchscreen: mainstone: fix pxa2xx+pxa3xx configuration
From: Arnd Bergmann <arnd@...db.de>
There are two different ways of flushing the ac97 queue
in this driver, selected by a compile time option.
Change this to a runtime selection to make it work when both
are enabled.
Acked-by: Dmitry Torokhov <dmitry.torokhov@...il.com>
Acked-by: Robert Jarzmik <robert.jarzmik@...e.fr>
Cc: linux-input@...r.kernel.org
Signed-off-by: Arnd Bergmann <arnd@...db.de>
---
drivers/input/touchscreen/mainstone-wm97xx.c | 19 +++++++------------
1 file changed, 7 insertions(+), 12 deletions(-)
diff --git a/drivers/input/touchscreen/mainstone-wm97xx.c b/drivers/input/touchscreen/mainstone-wm97xx.c
index 87655105ef3a..618c80847d9f 100644
--- a/drivers/input/touchscreen/mainstone-wm97xx.c
+++ b/drivers/input/touchscreen/mainstone-wm97xx.c
@@ -98,25 +98,20 @@ MODULE_PARM_DESC(ac97_touch_slot, "Touch screen data slot AC97 number");
/* flush AC97 slot 5 FIFO on pxa machines */
-#ifdef CONFIG_PXA27x
-static void wm97xx_acc_pen_up(struct wm97xx *wm)
-{
- schedule_timeout_uninterruptible(1);
-
- while (MISR & (1 << 2))
- MODR;
-}
-#else
static void wm97xx_acc_pen_up(struct wm97xx *wm)
{
unsigned int count;
schedule_timeout_uninterruptible(1);
- for (count = 0; count < 16; count++)
- MODR;
+ if (cpu_is_pxa27x()) {
+ while (MISR & (1 << 2))
+ MODR;
+ } else if (cpu_is_pxa3xx()) {
+ for (count = 0; count < 16; count++)
+ MODR;
+ }
}
-#endif
static int wm97xx_acc_pen_down(struct wm97xx *wm)
{
--
2.29.2
Powered by blists - more mailing lists