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 <qiufang.dai@amlogic.com>
This commit is contained in:
Qiufang Dai
2018-12-14 17:19:28 +08:00
committed by Jianxin Pan
parent 40bbd6e3ad
commit c6412a36ec
2 changed files with 8 additions and 0 deletions

View File

@@ -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;

View File

@@ -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