Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e8d87f1c authored by Kyle Yan's avatar Kyle Yan Committed by Rishabh Bhatnagar
Browse files

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.

Change-Id: I0e9e4225d1274bb20e1ed682059432a8161a5a71
Signed-off-by: default avatarKyle Yan <kyan@codeaurora.org>
Signed-off-by: default avatarRishabh Bhatnagar <rishabhb@codeaurora.org>
parent 657b1f68
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -98,6 +98,8 @@ extern int pm_async_enabled;
/* drivers/base/power/main.c */
extern struct list_head dpm_list;	/* The active device list */

extern int msm_show_resume_irq_mask;

static inline struct device *to_device(struct list_head *entry)
{
	return container_of(entry, struct device, power.entry);
+17 −0
Original line number Diff line number Diff line
@@ -16,6 +16,9 @@
#include <linux/debugfs.h>
#include <linux/pm_wakeirq.h>
#include <trace/events/power.h>
#include <linux/irq.h>
#include <linux/interrupt.h>
#include <linux/irqdesc.h>

#include "power.h"

@@ -881,7 +884,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();
	}