input: sirfsoc-onkey - set the capability of reporting KEY_POWER
Subsystems (2)
PATCH 1/1 input: sirfsoc-onkey - set the capability of reporting KEY_POWER
From: Xianglong Du <[email protected]>
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.
--- drivers/input/misc/sirfsoc-onkey.c | 1 + 1 file changed, 1 insertion(+)
drivers/input/misc/sirfsoc-onkey.c +1 -0
@@ -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);
Signature · 1 line
1.7.9.5
2014-02-25 21:36 GMT+08:00 Barry Song <[email protected]>:
Quoted 10 lines
From: Xianglong Du <[email protected]>
commit
a1a7521064428fc1cf8moved to reportEV_KEYevent(KEY_POWER)instead of reportingEV_PWRevent(KEY_SUSPEND), but it didn't enable the capability, so theKEY_POWERwill not be reported to userspace by input core. this patch fixes the issue.Signed-off-by Xianglong Du <[email protected]>Signed-off-by Barry Song <[email protected]>---
Dmitry, i guess you missed this one, this one should be in 3.15, otherwise, onkey is broken.
Quoted 16 lines
drivers/input/misc/sirfsoc-onkey.c | 1 + 1 file changed, 1 insertion(+)drivers/input/misc/sirfsoc-onkey.c +1
-1@@ -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); --
Quoted 2 lines
1.7.9.5
-barry
Quoted 8 lines · Barry Song
2014-02-25 21:36 GMT+08:00 Barry Song <[email protected]>:
Quoted 7 lines
From: Xianglong Du <[email protected]>
commit
a1a7521064428fc1cf8moved to reportEV_KEYevent(KEY_POWER)instead of reportingEV_PWRevent(KEY_SUSPEND), but it didn't enable the capability, so theKEY_POWERwill not be reported to userspace by input core. this patch fixes the issue.
Quoted 6 lines
Quoted 3 lines
Signed-off-by Xianglong Du <[email protected]>Signed-off-by Barry Song <[email protected]>---
Dmitry, i guess you missed this one, this one should be in 3.15, otherwise, onkey is broken.
Applied, thank you.
Quoted 22 lines
Quoted 18 lines
drivers/input/misc/sirfsoc-onkey.c | 1 + 1 file changed, 1 insertion(+)drivers/input/misc/sirfsoc-onkey.c +1
-1@@ -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); --Quoted 2 lines
1.7.9.5
-barry
Signature · 1 line
Dmitry