PM / wakeup: Add msm_show_resume_irq_mask to print off wakeup irq

Utilitize the msm_show_resume_irq_mask to print off the actual wakeup irq
in order to help debug.

[eberman@codeaurora.org: Squashed in "PM / wakeup: Fix error when
CONFIG_QCOM_SHOW_RESUME_IRQ not defined"]
Change-Id: I0e9e4225d1274bb20e1ed682059432a8161a5a71
Signed-off-by: Maria Yu <aiquny@codeaurora.org>
Signed-off-by: Kyle Yan <kyan@codeaurora.org>
Signed-off-by: Elliot Berman <eberman@codeaurora.org>
This commit is contained in:
Kyle Yan 2017-08-11 14:51:41 -07:00 • committed by Elliot Berman
commit f78d8b73b2
2 changed files with 23 additions and 0 deletions

View file

@ -99,6 +99,12 @@ extern int pm_async_enabled;
/* drivers/base/power/main.c */
extern struct list_head dpm_list; /* The active device list */
#ifdef CONFIG_QCOM_SHOW_RESUME_IRQ
extern int msm_show_resume_irq_mask;
#else
#define msm_show_resume_irq_mask 0
#endif
static inline struct device *to_device(struct list_head *entry)
{
return container_of(entry, struct device, power.entry);

View file

@ -17,6 +17,9 @@
#include <linux/pm_wakeirq.h>
#include <linux/types.h>
#include <trace/events/power.h>
#include <linux/irq.h>
#include <linux/interrupt.h>
#include <linux/irqdesc.h>
#include "power.h"
@ -903,7 +906,21 @@ void pm_wakeup_clear(bool reset)
void pm_system_irq_wakeup(unsigned int irq_number)
{
struct irq_desc *desc;
const char *name = "null";
if (pm_wakeup_irq == 0) {
if (msm_show_resume_irq_mask) {
desc = irq_to_desc(irq_number);
if (desc == NULL)
name = "stray irq";
else if (desc->action && desc->action->name)
name = desc->action->name;
pr_warn("%s: %d triggered %s\n", __func__,
irq_number, name);
}
pm_wakeup_irq = irq_number;
pm_system_wakeup();
}