linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Barry Song <21cnbao@gmail.com>
To: dmitry.torokhov@gmail.com, linux-input@vger.kernel.org
Cc: workgroup.linux@csr.com, Xianglong Du <Xianglong.Du@csr.com>,
	Barry Song <Baohua.Song@csr.com>
Subject: [PATCH] input: sirfsoc-onkey - set the capability of reporting KEY_POWER
Date: Tue, 25 Feb 2014 21:36:14 +0800	[thread overview]
Message-ID: <1393335375-1870-1-git-send-email-21cnbao@gmail.com> (raw)

From: Xianglong Du <Xianglong.Du@csr.com>

commit a1a7521064428fc1cf8 moved to report EV_KEY event(KEY_POWER) instead of
reporting EV_PWR event(KEY_SUSPEND), but it didn't enable the capability, so
the KEY_POWER will not be reported to userspace by input core. this patch fixes
the issue.

Signed-off-by: Xianglong Du <Xianglong.Du@csr.com>
Signed-off-by: Barry Song <Baohua.Song@csr.com>
---
 drivers/input/misc/sirfsoc-onkey.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/input/misc/sirfsoc-onkey.c b/drivers/input/misc/sirfsoc-onkey.c
index 4d66c72..e4104f9 100644
--- a/drivers/input/misc/sirfsoc-onkey.c
+++ b/drivers/input/misc/sirfsoc-onkey.c
@@ -136,6 +136,7 @@ static int sirfsoc_pwrc_probe(struct platform_device *pdev)
 	pwrcdrv->input->name = "sirfsoc pwrckey";
 	pwrcdrv->input->phys = "pwrc/input0";
 	pwrcdrv->input->evbit[0] = BIT_MASK(EV_KEY);
+	input_set_capability(pwrcdrv->input, EV_KEY, KEY_POWER);
 
 	INIT_DELAYED_WORK(&pwrcdrv->work, sirfsoc_pwrc_report_event);
 
-- 
1.7.9.5


             reply	other threads:[~2014-02-25 13:36 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-25 13:36 Barry Song [this message]
2014-03-27  7:35 ` [PATCH] input: sirfsoc-onkey - set the capability of reporting KEY_POWER Barry Song
2014-03-28  7:39   ` Dmitry Torokhov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1393335375-1870-1-git-send-email-21cnbao@gmail.com \
    --to=21cnbao@gmail.com \
    --cc=Baohua.Song@csr.com \
    --cc=Xianglong.Du@csr.com \
    --cc=dmitry.torokhov@gmail.com \
    --cc=linux-input@vger.kernel.org \
    --cc=workgroup.linux@csr.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).