Commit 8a65c02f authored by Mark Brown's avatar Mark Brown Committed by Dmitry Torokhov

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: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: default avatarDmitry Torokhov <dtor@mail.ru>
parent f2278f31
...@@ -168,6 +168,18 @@ static void wm9712_phy_init(struct wm97xx *wm) ...@@ -168,6 +168,18 @@ static void wm9712_phy_init(struct wm97xx *wm)
64000 / rpu); 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*/ /* touchpanel pressure current*/
if (pil == 2) { if (pil == 2) {
dig2 |= WM9712_PIL; dig2 |= WM9712_PIL;
...@@ -179,12 +191,6 @@ static void wm9712_phy_init(struct wm97xx *wm) ...@@ -179,12 +191,6 @@ static void wm9712_phy_init(struct wm97xx *wm)
if (!pil) if (!pil)
pressure = 0; 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 */ /* polling mode sample settling delay */
if (delay < 0 || delay > 15) { if (delay < 0 || delay > 15) {
dev_dbg(wm->dev, "supplied delay out of range."); dev_dbg(wm->dev, "supplied delay out of range.");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment