Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Input: da9063 - fix capability and drop KEY_SLEEP

Since commit f889beaaab1c ("Input: da9063 - report KEY_POWER instead of
KEY_SLEEP during power key-press") KEY_SLEEP isn't supported anymore. This
caused input device to not generate any events if "dlg,disable-key-power"
is set.

Fix this by unconditionally setting KEY_POWER capability, and not
declaring KEY_SLEEP.

Fixes: f889beaaab1c ("Input: da9063 - report KEY_POWER instead of KEY_SLEEP during power key-press")
Signed-off-by: Marco Felsch <m.felsch@pengutronix.de>
Cc: stable@vger.kernel.org
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>

authored by

Marco Felsch and committed by
Dmitry Torokhov
afce285b 08987822

+1 -4
+1 -4
drivers/input/misc/da9063_onkey.c
··· 232 232 onkey->input->phys = onkey->phys; 233 233 onkey->input->dev.parent = &pdev->dev; 234 234 235 - if (onkey->key_power) 236 - input_set_capability(onkey->input, EV_KEY, KEY_POWER); 237 - 238 - input_set_capability(onkey->input, EV_KEY, KEY_SLEEP); 235 + input_set_capability(onkey->input, EV_KEY, KEY_POWER); 239 236 240 237 INIT_DELAYED_WORK(&onkey->work, da9063_poll_on); 241 238