Commit 0642ffd6 authored by Dudley Du's avatar Dudley Du Committed by Dmitry Torokhov

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: default avatarDudley Du <dudl@cypress.com>
Signed-off-by: default avatarDmitry Torokhov <dmitry.torokhov@gmail.com>
parent ddbb299d
...@@ -2519,10 +2519,13 @@ static int cyapa_gen5_do_operational_check(struct cyapa *cyapa) ...@@ -2519,10 +2519,13 @@ static int cyapa_gen5_do_operational_check(struct cyapa *cyapa)
__func__); __func__);
/* By default, the trackpad proximity function is enabled. */ /* By default, the trackpad proximity function is enabled. */
error = cyapa_pip_set_proximity(cyapa, true); if (cyapa->platform_ver >= 2) {
if (error) error = cyapa_pip_set_proximity(cyapa, true);
dev_warn(dev, "%s: failed to enable proximity.\n", if (error)
__func__); dev_warn(dev,
"%s: failed to enable proximity.\n",
__func__);
}
/* Get trackpad product information. */ /* Get trackpad product information. */
error = cyapa_gen5_get_query_data(cyapa); error = cyapa_gen5_get_query_data(cyapa);
......
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