Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 161256
b: refs/heads/master
c: 99fde51
h: refs/heads/master
v: v3
  • Loading branch information
Marek Vasut authored and Dmitry Torokhov committed Jul 21, 2009
1 parent 3846285 commit b01aacd
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b833306febc7d9b805a89aff29f1e410a64981c4
refs/heads/master: 99fde513f57db2c8e1b202ade4be7d47033ff09b
3 changes: 3 additions & 0 deletions trunk/drivers/input/touchscreen/mainstone-wm97xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,9 @@ static int wm97xx_acc_startup(struct wm97xx *wm)
if (machine_is_palmt5() || machine_is_palmtx() || machine_is_palmld()) {
pen_int = 1;
irq = 27;
/* There is some obscure mutant of WM9712 interbred with WM9713
* used on Palm HW */
wm->variant = WM97xx_WM1613;
} else if (machine_is_mainstone() && pen_int)
irq = 4;

Expand Down
6 changes: 4 additions & 2 deletions trunk/drivers/input/touchscreen/wm97xx-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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) {
Expand Down
7 changes: 7 additions & 0 deletions trunk/include/linux/wm97xx.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,12 @@
#include <linux/input.h> /* Input device layer */
#include <linux/platform_device.h>

/*
* WM97xx variants
*/
#define WM97xx_GENERIC 0x0000
#define WM97xx_WM1613 0x1613

/*
* WM97xx AC97 Touchscreen registers
*/
Expand Down Expand Up @@ -283,6 +289,7 @@ struct wm97xx {
unsigned pen_is_down:1; /* Pen is down */
unsigned aux_waiting:1; /* aux measurement waiting */
unsigned pen_probably_down:1; /* used in polling mode */
u16 variant; /* WM97xx chip variant */
u16 suspend_mode; /* PRP in suspend mode */
};

Expand Down

0 comments on commit b01aacd

Please sign in to comment.