Skip to contentSkip to conversation

WM9712: Warn if user attempts to use pressure measurement with 5 wire mode

PATCH Applied Mark Brown 2 participants 2 messages Jun 30, 2008

Subsystems (3)
lore
Share & tools
lore

Mark Brown

author
#0 lore raw

PATCH 1/1 WM9712: Warn if user attempts to use pressure measurement with 5 wire mode

This is not supported by the hardware.

---
 drivers/input/touchscreen/wm9712.c |   18 ++++++++++++------
 1 files changed, 12 insertions(+), 6 deletions(-)
drivers/input/touchscreen/wm9712.c +12 -6
index 0b6e4cf..4c5d85a 100644
@@ -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.");
Signature · 1 line
1.5.6
maintainer Applied
#1 lore raw

Hi Mark,

Quoted 2 lines · Mark Brown

This is not supported by the hardware.

Applied to the 'next' tree, thank you.

Signature · 1 line
Dmitry