supsend: clear wakeup reason after reusme. [1/1]
authorHong Guo <hong.guo@amlogic.com>
Fri, 12 Jul 2019 09:21:07 +0000 (17:21 +0800)
committerTao Zeng <tao.zeng@amlogic.com>
Thu, 18 Jul 2019 06:04:05 +0000 (23:04 -0700)
PD#SWPL-11035

Problem:
clear wakeup reason after reusme.

Solution:
clear wakeup reason after reusme.

Verify:
test pass on t962x2-x301 ,g12b_400

Change-Id: I19360dbf1c7a1cf9460417b00c8af6ebc818beba
Signed-off-by: Hong Guo <hong.guo@amlogic.com>
drivers/amlogic/input/keyboard/adc_keypad.c
drivers/amlogic/input/keyboard/gpio_keypad.c
drivers/amlogic/input/keyboard/gpio_keypad_old.c
drivers/amlogic/input/remote/remote_meson.c
drivers/amlogic/vrtc/aml_vrtc.c

index 4f5c53a..3d09eef 100644 (file)
@@ -31,6 +31,7 @@
 #include <linux/input-polldev.h>
 #include <linux/amlogic/scpi_protocol.h>
 #include "adc_keypad.h"
+#include <linux/amlogic/scpi_protocol.h>
 
 #define POLL_INTERVAL_DEFAULT 25
 #define KEY_JITTER_COUNT  1
@@ -628,6 +629,8 @@ static int meson_adc_kp_resume(struct platform_device *pdev)
                                input_report_key(kp->poll_dev->input,
                                        KEY_POWER,  0);
                                input_sync(kp->poll_dev->input);
+                               if (scpi_clr_wakeup_reason())
+                                       pr_debug("clr adc wakeup reason fail.\n");
 
                                break;
                        }
index 22c5bc1..04569b7 100644 (file)
@@ -23,6 +23,7 @@
 #include <linux/interrupt.h>
 #include <linux/slab.h>
 #include <linux/amlogic/pm.h>
+#include <linux/amlogic/scpi_protocol.h>
 
 #undef pr_fmt
 #define pr_fmt(fmt) "gpio-keypad: " fmt
@@ -326,6 +327,8 @@ static int meson_gpio_kp_resume(struct platform_device *dev)
                                break;
                        }
                }
+               if (scpi_clr_wakeup_reason())
+                       pr_debug("clr gpio kp wakeup reason fail.\n");
        }
        return 0;
 }
index 35abea9..0421048 100644 (file)
@@ -46,6 +46,7 @@
 #include <linux/amlogic/pm.h>
 #include <linux/of_address.h>
 #include "../../../gpio/gpiolib.h"
+#include <linux/amlogic/scpi_protocol.h>
 
 #define OFFSET  24
 
@@ -462,6 +463,8 @@ static int gpio_key_resume(struct platform_device *dev)
                                break;
                        }
                }
+               if (scpi_clr_wakeup_reason())
+                       pr_debug("clr gipo key wakeup reason fail.\n");
        }
        return 0;
 }
index ea1f0ca..16c81f1 100644 (file)
@@ -41,6 +41,7 @@
 #include <linux/amlogic/iomap.h>
 #include <linux/pm_wakeup.h>
 #include <linux/pm_wakeirq.h>
+#include <linux/amlogic/scpi_protocol.h>
 
 static void amlremote_tasklet(unsigned long data);
 static void learning_done_workqueue(struct work_struct *work);
@@ -922,6 +923,8 @@ static int remote_resume(struct device *dev)
                input_event(chip->r_dev->input_device,
                    EV_KEY, KEY_POWER, 0);
                input_sync(chip->r_dev->input_device);
+               if (scpi_clr_wakeup_reason())
+                       pr_debug("clr wakeup reason fail.\n");
        }
 
        if (get_resume_method() == REMOTE_CUS_WAKEUP) {
@@ -929,6 +932,8 @@ static int remote_resume(struct device *dev)
                input_sync(chip->r_dev->input_device);
                input_event(chip->r_dev->input_device, EV_KEY, 133, 0);
                input_sync(chip->r_dev->input_device);
+               if (scpi_clr_wakeup_reason())
+                       pr_debug("clr wakeup reason fail.\n");
        }
 #endif
 
index 2c79f35..5bf6883 100644 (file)
@@ -28,6 +28,7 @@
 #include <linux/debugfs.h>
 #include <linux/input.h>
 #include <linux/amlogic/pm.h>
+#include <linux/amlogic/scpi_protocol.h>
 
 static void __iomem *alarm_reg_vaddr;
 static void __iomem *timere_low_vaddr, *timere_high_vaddr;
@@ -44,6 +45,8 @@ static void send_power_btn_wakeup(void)
                input_sync(vinput_dev);
                input_event(vinput_dev, EV_KEY, KEY_POWER, 0);
                input_sync(vinput_dev);
+               if (scpi_clr_wakeup_reason())
+                       pr_debug("clr vrtc wakeup reason fail.\n");
        }
 }