aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input/touchscreen/wm97xx-core.c
diff options
context:
space:
mode:
authorMarek Vasut <marek.vasut@gmail.com>2009-07-20 22:28:50 -0700
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2009-07-20 22:30:33 -0700
commit99fde513f57db2c8e1b202ade4be7d47033ff09b (patch)
tree85e5bacd05e1f634f80667d3ab4135b219c10741 /drivers/input/touchscreen/wm97xx-core.c
parentInput: wm97xx - add Palm support to Mainstone accelerated touch (diff)
downloadlinux-dev-99fde513f57db2c8e1b202ade4be7d47033ff09b.tar.xz
linux-dev-99fde513f57db2c8e1b202ade4be7d47033ff09b.zip
Input: wm97xx - add possibility to control the GPIO_STATUS shift
This patch allows tweaking the behaviour of GPIO_STATUS register shift quirk that's in wm97xx-core. The problem with GPIO_STATUS register being shifted by one doesn't appear on all hardware it seems and causes problems with accelerated touchscreen drivers on Palm hardware. Therefore an accelerated touchscreen driver can select if the shift is/isn't happening on the hardware. Signed-off-by: Marek Vasut <marek.vasut@gmail.com> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Diffstat (limited to 'drivers/input/touchscreen/wm97xx-core.c')
-rw-r--r--drivers/input/touchscreen/wm97xx-core.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/input/touchscreen/wm97xx-core.c b/drivers/input/touchscreen/wm97xx-core.c
index 2957d48e0045..252eb11fe9db 100644
--- a/drivers/input/touchscreen/wm97xx-core.c
+++ b/drivers/input/touchscreen/wm97xx-core.c
@@ -204,7 +204,7 @@ void wm97xx_set_gpio(struct wm97xx *wm, u32 gpio,
else
reg &= ~gpio;
- if (wm->id == WM9712_ID2)
+ if (wm->id == WM9712_ID2 && wm->variant != WM97xx_WM1613)
wm97xx_reg_write(wm, AC97_GPIO_STATUS, reg << 1);
else
wm97xx_reg_write(wm, AC97_GPIO_STATUS, reg);
@@ -307,7 +307,7 @@ static void wm97xx_pen_irq_worker(struct work_struct *work)
WM97XX_GPIO_13);
}
- if (wm->id == WM9712_ID2)
+ if (wm->id == WM9712_ID2 && wm->variant != WM97xx_WM1613)
wm97xx_reg_write(wm, AC97_GPIO_STATUS, (status &
~WM97XX_GPIO_13) << 1);
else
@@ -582,6 +582,8 @@ static int wm97xx_probe(struct device *dev)
wm->id = wm97xx_reg_read(wm, AC97_VENDOR_ID2);
+ wm->variant = WM97xx_GENERIC;
+
dev_info(wm->dev, "detected a wm97%02x codec\n", wm->id & 0xff);
switch (wm->id & 0xff) {