summaryrefslogtreecommitdiffstats
path: root/drivers/input/touchscreen/wm9712.c
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2008-06-26 15:56:27 +0200
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2008-06-30 15:37:21 +0200
commit8a65c02f1dfda13ac2172f88f90f087330db82de (patch)
treef4b47cf8f5a9918b8159ad56265e090de5138712 /drivers/input/touchscreen/wm9712.c
parentInput: fix force feedback upload issue in compat mode (diff)
downloadlinux-8a65c02f1dfda13ac2172f88f90f087330db82de.tar.xz
linux-8a65c02f1dfda13ac2172f88f90f087330db82de.zip
Input: wm9712 - no pressure measurement with 5-wire mode
The hardware does not support pressure measurement is 5-wire mode so warn the user if he tries to request it. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Diffstat (limited to 'drivers/input/touchscreen/wm9712.c')
-rw-r--r--drivers/input/touchscreen/wm9712.c18
1 files changed, 12 insertions, 6 deletions
diff --git a/drivers/input/touchscreen/wm9712.c b/drivers/input/touchscreen/wm9712.c
index 0b6e4cfa6a21..4c5d85a249ae 100644
--- a/drivers/input/touchscreen/wm9712.c
+++ b/drivers/input/touchscreen/wm9712.c
@@ -168,6 +168,18 @@ static void wm9712_phy_init(struct wm97xx *wm)
64000 / rpu);
}
+ /* WM9712 five wire */
+ if (five_wire) {
+ dig2 |= WM9712_45W;
+ dev_dbg(wm->dev, "setting 5-wire touchscreen mode.");
+
+ if (pil) {
+ dev_warn(wm->dev, "pressure measurement is not "
+ "supported in 5-wire mode\n");
+ pil = 0;
+ }
+ }
+
/* touchpanel pressure current*/
if (pil == 2) {
dig2 |= WM9712_PIL;
@@ -179,12 +191,6 @@ static void wm9712_phy_init(struct wm97xx *wm)
if (!pil)
pressure = 0;
- /* WM9712 five wire */
- if (five_wire) {
- dig2 |= WM9712_45W;
- dev_dbg(wm->dev, "setting 5-wire touchscreen mode.");
- }
-
/* polling mode sample settling delay */
if (delay < 0 || delay > 15) {
dev_dbg(wm->dev, "supplied delay out of range.");