linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH V1] input: da9063: report KEY_POWER instead of KEY_SLEEP during power key-press
@ 2015-12-08 17:55 Steve Twiss
  2015-12-09 17:17 ` Dmitry Torokhov
  0 siblings, 1 reply; 2+ messages in thread
From: Steve Twiss @ 2015-12-08 17:55 UTC (permalink / raw)
  To: Dmitry Torokhov, LINUX-INPUT, LINUXKERNEL
  Cc: David Dajun Chen, Support Opensource

From: Steve Twiss <stwiss.opensource@diasemi.com>

Stop reporting KEY_SLEEP for a short key-press and report KEY_POWER instead
This change applied to both DA9063 and DA9062 ONKEY drivers.

Signed-off-by: Steve Twiss <stwiss.opensource@diasemi.com>

---

This patch applies against linux-next and v4.4-rc4

Regards,
Steve


 drivers/input/misc/da9063_onkey.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/input/misc/da9063_onkey.c b/drivers/input/misc/da9063_onkey.c
index 8eb697d..bb863e0 100644
--- a/drivers/input/misc/da9063_onkey.c
+++ b/drivers/input/misc/da9063_onkey.c
@@ -179,13 +179,13 @@ static irqreturn_t da9063_onkey_irq_handler(int irq, void *data)
 		input_report_key(onkey->input, KEY_POWER, 1);
 		input_sync(onkey->input);
 		schedule_delayed_work(&onkey->work, 0);
-		dev_dbg(onkey->dev, "KEY_POWER pressed.\n");
+		dev_dbg(onkey->dev, "KEY_POWER long press.\n");
 	} else {
-		input_report_key(onkey->input, KEY_SLEEP, 1);
+		input_report_key(onkey->input, KEY_POWER, 1);
 		input_sync(onkey->input);
-		input_report_key(onkey->input, KEY_SLEEP, 0);
+		input_report_key(onkey->input, KEY_POWER, 0);
 		input_sync(onkey->input);
-		dev_dbg(onkey->dev, "KEY_SLEEP pressed.\n");
+		dev_dbg(onkey->dev, "KEY_POWER short press.\n");
 	}
 
 	return IRQ_HANDLED;
-- 
end-of-patch for PATCH V1

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH V1] input: da9063: report KEY_POWER instead of KEY_SLEEP during power key-press
  2015-12-08 17:55 [PATCH V1] input: da9063: report KEY_POWER instead of KEY_SLEEP during power key-press Steve Twiss
@ 2015-12-09 17:17 ` Dmitry Torokhov
  0 siblings, 0 replies; 2+ messages in thread
From: Dmitry Torokhov @ 2015-12-09 17:17 UTC (permalink / raw)
  To: Steve Twiss
  Cc: LINUX-INPUT, LINUXKERNEL, David Dajun Chen, Support Opensource

On Tue, Dec 08, 2015 at 05:55:05PM +0000, Steve Twiss wrote:
> From: Steve Twiss <stwiss.opensource@diasemi.com>
> 
> Stop reporting KEY_SLEEP for a short key-press and report KEY_POWER instead
> This change applied to both DA9063 and DA9062 ONKEY drivers.

You need to explain why this change is needed.

> 
> Signed-off-by: Steve Twiss <stwiss.opensource@diasemi.com>
> 
> ---
> 
> This patch applies against linux-next and v4.4-rc4
> 
> Regards,
> Steve
> 
> 
>  drivers/input/misc/da9063_onkey.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/input/misc/da9063_onkey.c b/drivers/input/misc/da9063_onkey.c
> index 8eb697d..bb863e0 100644
> --- a/drivers/input/misc/da9063_onkey.c
> +++ b/drivers/input/misc/da9063_onkey.c
> @@ -179,13 +179,13 @@ static irqreturn_t da9063_onkey_irq_handler(int irq, void *data)
>  		input_report_key(onkey->input, KEY_POWER, 1);
>  		input_sync(onkey->input);
>  		schedule_delayed_work(&onkey->work, 0);
> -		dev_dbg(onkey->dev, "KEY_POWER pressed.\n");
> +		dev_dbg(onkey->dev, "KEY_POWER long press.\n");
>  	} else {
> -		input_report_key(onkey->input, KEY_SLEEP, 1);
> +		input_report_key(onkey->input, KEY_POWER, 1);
>  		input_sync(onkey->input);
> -		input_report_key(onkey->input, KEY_SLEEP, 0);
> +		input_report_key(onkey->input, KEY_POWER, 0);
>  		input_sync(onkey->input);
> -		dev_dbg(onkey->dev, "KEY_SLEEP pressed.\n");
> +		dev_dbg(onkey->dev, "KEY_POWER short press.\n");
>  	}
>  
>  	return IRQ_HANDLED;
> -- 
> end-of-patch for PATCH V1
> 

-- 
Dmitry

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-12-09 17:17 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-12-08 17:55 [PATCH V1] input: da9063: report KEY_POWER instead of KEY_SLEEP during power key-press Steve Twiss
2015-12-09 17:17 ` Dmitry Torokhov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).