input: touchscreen: mainstone: fix pxa2xx+pxa3xx configuration
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@gmail.com> Acked-by: Robert Jarzmik <robert.jarzmik@free.fr> Cc: linux-input@vger.kernel.org Signed-off-by: Arnd Bergmann <arnd@arndb.de>
This commit is contained in:
@@ -98,25 +98,20 @@ MODULE_PARM_DESC(ac97_touch_slot, "Touch screen data slot AC97 number");
|
|||||||
|
|
||||||
|
|
||||||
/* flush AC97 slot 5 FIFO on pxa machines */
|
/* 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)
|
static void wm97xx_acc_pen_up(struct wm97xx *wm)
|
||||||
{
|
{
|
||||||
unsigned int count;
|
unsigned int count;
|
||||||
|
|
||||||
schedule_timeout_uninterruptible(1);
|
schedule_timeout_uninterruptible(1);
|
||||||
|
|
||||||
|
if (cpu_is_pxa27x()) {
|
||||||
|
while (MISR & (1 << 2))
|
||||||
|
MODR;
|
||||||
|
} else if (cpu_is_pxa3xx()) {
|
||||||
for (count = 0; count < 16; count++)
|
for (count = 0; count < 16; count++)
|
||||||
MODR;
|
MODR;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
static int wm97xx_acc_pen_down(struct wm97xx *wm)
|
static int wm97xx_acc_pen_down(struct wm97xx *wm)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user