mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-08 20:07:46 +09:00
ir: cannot wakeup system when keep pressing power key [1/1]
PD#SWPL-14797 Problem: In freeze mode, keep press power key won't wake up system. Solution: replace pm_wakup_event with pm_stay_awake Verify: tl1 Change-Id: I5b88714ff45034280ec1d638f86b51fa54e2a011 Signed-off-by: Qianggui Song <qianggui.song@amlogic.com>
This commit is contained in:
@@ -65,6 +65,8 @@ static void ir_do_keyup(struct remote_dev *dev)
|
||||
{
|
||||
input_report_key(dev->input_device, dev->last_keycode, 0);
|
||||
input_sync(dev->input_device);
|
||||
if (dev->last_keycode == KEY_POWER)
|
||||
pm_relax(dev->dev);
|
||||
dev->keypressed = false;
|
||||
dev->last_scancode = -1;
|
||||
remote_dbg(dev->dev, "keyup!!\n");
|
||||
@@ -145,7 +147,7 @@ void remote_keydown(struct remote_dev *dev, int scancode, int status)
|
||||
if (status == REMOTE_NORMAL) {
|
||||
keycode = dev->getkeycode(dev, scancode);
|
||||
if (keycode == KEY_POWER)
|
||||
pm_wakeup_event(dev->dev, 2000);
|
||||
pm_stay_awake(dev->dev);
|
||||
ir_do_keydown(dev, scancode, keycode);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user