diff mbox series

[4/4] Input: da9063 - fix capability and drop KEY_SLEEP

Message ID 20190916140358.30036-5-m.felsch@pengutronix.de (mailing list archive)
State Superseded
Commit afce285b859cea91c182015fc9858ea58c26cd0e
Headers show
Series DA9063 Onkey Improvements and Fixes | expand

Commit Message

Marco Felsch Sept. 16, 2019, 2:03 p.m. UTC
Since commit f889beaaab1c ("Input: da9063 - report KEY_POWER instead of
KEY_SLEEP during power key-press") KEY_SLEEP isn't supported anymore.
So the input device don't report a key event if "dlg,disable-key-power"
is set.

Fixes: f889beaaab1c ("Input: da9063 - report KEY_POWER instead of KEY_SLEEP during power key-press")
Signed-off-by: Marco Felsch <m.felsch@pengutronix.de>
---
 drivers/input/misc/da9063_onkey.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

Comments

Dmitry Torokhov Sept. 16, 2019, 7:51 p.m. UTC | #1
On Mon, Sep 16, 2019 at 04:03:58PM +0200, Marco Felsch wrote:
> Since commit f889beaaab1c ("Input: da9063 - report KEY_POWER instead of
> KEY_SLEEP during power key-press") KEY_SLEEP isn't supported anymore.
> So the input device don't report a key event if "dlg,disable-key-power"
> is set.
> 
> Fixes: f889beaaab1c ("Input: da9063 - report KEY_POWER instead of KEY_SLEEP during power key-press")
> Signed-off-by: Marco Felsch <m.felsch@pengutronix.de>

Applied, thank you.

> ---
>  drivers/input/misc/da9063_onkey.c | 5 +----
>  1 file changed, 1 insertion(+), 4 deletions(-)
> 
> diff --git a/drivers/input/misc/da9063_onkey.c b/drivers/input/misc/da9063_onkey.c
> index bc982fcc87eb..2362b1360a41 100644
> --- a/drivers/input/misc/da9063_onkey.c
> +++ b/drivers/input/misc/da9063_onkey.c
> @@ -242,10 +242,7 @@ static int da9063_onkey_probe(struct platform_device *pdev)
>  	onkey->input->phys = onkey->phys;
>  	onkey->input->dev.parent = &pdev->dev;
>  
> -	if (onkey->key_power)
> -		input_set_capability(onkey->input, EV_KEY, KEY_POWER);
> -
> -	input_set_capability(onkey->input, EV_KEY, KEY_SLEEP);
> +	input_set_capability(onkey->input, EV_KEY, KEY_POWER);
>  
>  	INIT_DELAYED_WORK(&onkey->work, da9063_poll_on);
>  
> -- 
> 2.20.1
>
diff mbox series

Patch

diff --git a/drivers/input/misc/da9063_onkey.c b/drivers/input/misc/da9063_onkey.c
index bc982fcc87eb..2362b1360a41 100644
--- a/drivers/input/misc/da9063_onkey.c
+++ b/drivers/input/misc/da9063_onkey.c
@@ -242,10 +242,7 @@  static int da9063_onkey_probe(struct platform_device *pdev)
 	onkey->input->phys = onkey->phys;
 	onkey->input->dev.parent = &pdev->dev;
 
-	if (onkey->key_power)
-		input_set_capability(onkey->input, EV_KEY, KEY_POWER);
-
-	input_set_capability(onkey->input, EV_KEY, KEY_SLEEP);
+	input_set_capability(onkey->input, EV_KEY, KEY_POWER);
 
 	INIT_DELAYED_WORK(&onkey->work, da9063_poll_on);