提交 0642ffd6 编写于 作者: D Dudley Du 提交者: 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: NDudley Du <dudl@cypress.com>
Signed-off-by: NDmitry Torokhov <dmitry.torokhov@gmail.com>
上级 ddbb299d
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册