summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDudley Du <dudl@cypress.com>2015-07-30 20:26:39 +0200
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2015-07-30 20:34:00 +0200
commit0642ffd6a864629c12a4cd7528782ed5b68ac69c (patch)
tree915083f54c05e55ae88fe01edebbe9c5f2a5e165
parentInput: cyapa - introduce device tree binding (diff)
downloadlinux-0642ffd6a864629c12a4cd7528782ed5b68ac69c.tar.xz
linux-0642ffd6a864629c12a4cd7528782ed5b68ac69c.zip
Input: cyapa - do not try to enable proximity reporting on older devices
Avoid the driver generate warning message when the cyapa driver working with the old Gen5 trackpad device which does not support the proximity function. Those old Gen5 trackpad device all have the platform version less than 2. Signed-off-by: Dudley Du <dudl@cypress.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
-rw-r--r--drivers/input/mouse/cyapa_gen5.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/drivers/input/mouse/cyapa_gen5.c b/drivers/input/mouse/cyapa_gen5.c
index 6d7abbed67e4..118ba977181e 100644
--- a/drivers/input/mouse/cyapa_gen5.c
+++ b/drivers/input/mouse/cyapa_gen5.c
@@ -2519,10 +2519,13 @@ static int cyapa_gen5_do_operational_check(struct cyapa *cyapa)
__func__);
/* By default, the trackpad proximity function is enabled. */
- error = cyapa_pip_set_proximity(cyapa, true);
- if (error)
- dev_warn(dev, "%s: failed to enable proximity.\n",
- __func__);
+ if (cyapa->platform_ver >= 2) {
+ error = cyapa_pip_set_proximity(cyapa, true);
+ if (error)
+ dev_warn(dev,
+ "%s: failed to enable proximity.\n",
+ __func__);
+ }
/* Get trackpad product information. */
error = cyapa_gen5_get_query_data(cyapa);