From: Qiufang Dai Date: Fri, 14 Dec 2018 09:19:28 +0000 (+0800) Subject: suspend: remote: do not do suspend action under freeze mode [1/1] X-Git-Tag: hardkernel-4.9.236-104~2007 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c6412a36ec2bd11387e927d12d216ef41fedba8b;p=platform%2Fkernel%2Flinux-amlogic.git suspend: remote: do not do suspend action under freeze mode [1/1] PD#SWPL-2399 Problem: Miss IR (power) key value when wakeup from freeze. Solution: Do not suspend/resume IR device under freeze mode Verify: x301_tl1 Change-Id: I7bdf0b847fa1a8b96bb2896426e15faf8143e820 Signed-off-by: Qiufang Dai --- diff --git a/drivers/amlogic/input/remote/remote_meson.c b/drivers/amlogic/input/remote/remote_meson.c index 43a360d..6a7e416 100644 --- a/drivers/amlogic/input/remote/remote_meson.c +++ b/drivers/amlogic/input/remote/remote_meson.c @@ -704,6 +704,9 @@ static int remote_resume(struct device *dev) unsigned long flags; unsigned char cnt; + if (is_pm_freeze_mode()) + return 0; + dev_info(dev, "remote resume\n"); /*resume register config*/ spin_lock_irqsave(&chip->slock, flags); @@ -742,6 +745,9 @@ static int remote_suspend(struct device *dev) { struct remote_chip *chip = dev_get_drvdata(dev); + if (is_pm_freeze_mode()) + return 0; + dev_info(dev, "remote suspend\n"); disable_irq(chip->irqno); return 0; diff --git a/include/linux/amlogic/pm.h b/include/linux/amlogic/pm.h index 2d71273..dd1d1d3 100644 --- a/include/linux/amlogic/pm.h +++ b/include/linux/amlogic/pm.h @@ -51,6 +51,8 @@ struct early_suspend { extern void register_early_suspend(struct early_suspend *handler); extern void unregister_early_suspend(struct early_suspend *handler); extern unsigned int lgcy_early_suspend_init(void); +extern unsigned int is_pm_freeze_mode(void); + #endif //CONFIG_AMLOGIC_LEGACY_EARLY_SUSPEND