diff options
author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2008-05-27 01:37:26 -0400 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2008-05-27 01:37:26 -0400 |
commit | 43f83a8f9963a11a9c3f41beecc363da21ae3602 (patch) | |
tree | a9c53e4c7a491437698945d1a3ac2229e89a4846 /drivers/input | |
parent | 5de4cd431db749bdca58ec88862462729f6159b2 (diff) | |
download | kernel-crypto-43f83a8f9963a11a9c3f41beecc363da21ae3602.tar.gz kernel-crypto-43f83a8f9963a11a9c3f41beecc363da21ae3602.tar.xz kernel-crypto-43f83a8f9963a11a9c3f41beecc363da21ae3602.zip |
Input: wm9713 - support five wire panels
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Diffstat (limited to 'drivers/input')
-rw-r--r-- | drivers/input/touchscreen/wm9713.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/drivers/input/touchscreen/wm9713.c b/drivers/input/touchscreen/wm9713.c index 01278bd7e65..838458792ea 100644 --- a/drivers/input/touchscreen/wm9713.c +++ b/drivers/input/touchscreen/wm9713.c @@ -85,6 +85,15 @@ module_param(delay, int, 0); MODULE_PARM_DESC(delay, "Set adc sample delay."); /* + * Set five_wire = 1 to use a 5 wire touchscreen. + * + * NOTE: Five wire mode does not allow for readback of pressure. + */ +static int five_wire; +module_param(five_wire, int, 0); +MODULE_PARM_DESC(five_wire, "Set to '1' to use 5-wire touchscreen."); + +/* * Set adc mask function. * * Sources of glitch noise, such as signals driving an LCD display, may feed @@ -162,6 +171,19 @@ static void wm9713_phy_init(struct wm97xx *wm) 64000 / rpu); } + /* Five wire panel? */ + if (five_wire) { + dig3 |= WM9713_45W; + dev_info(wm->dev, "setting 5-wire touchscreen mode."); + + if (pil) { + dev_warn(wm->dev, + "Pressure measurement not supported in 5 " + "wire mode, disabling\n"); + pil = 0; + } + } + /* touchpanel pressure */ if (pil == 2) { dig3 |= WM9712_PIL; |