irqchip: mpm: Add trace support to get mpm wakeup timer value

Add trace support to get mpm wakeup timer value while APPS going
into deep sleep.

Change-Id: I074012c6362140d87190f2416d8e5c2cb31183b2
Signed-off-by: Raghavendra Kakarla <rkakarla@codeaurora.org>
diff --git a/drivers/irqchip/qcom/mpm.c b/drivers/irqchip/qcom/mpm.c
index dff8bee..a792b39 100644
--- a/drivers/irqchip/qcom/mpm.c
+++ b/drivers/irqchip/qcom/mpm.c
@@ -466,6 +466,8 @@
 	}
 
 	msm_mpm_timer_write((uint32_t *)&wakeup);
+	trace_mpm_wakeup_time(from_idle, wakeup, arch_counter_get_cntvct());
+
 	return 0;
 }
 
diff --git a/include/trace/events/mpm.h b/include/trace/events/mpm.h
index 433fdbf..6746377 100644
--- a/include/trace/events/mpm.h
+++ b/include/trace/events/mpm.h
@@ -57,6 +57,28 @@
 	TP_printk("index:%u wakeup_irqs:0x%x", __entry->index, __entry->irqs)
 );
 
+TRACE_EVENT(mpm_wakeup_time,
+
+	TP_PROTO(bool from_idle, u64 wakeup, u64 current_ticks),
+
+	TP_ARGS(from_idle, wakeup, current_ticks),
+
+	TP_STRUCT__entry(
+		__field(bool, from_idle)
+		__field(u64, wakeup)
+		__field(u64, current_ticks)
+	),
+
+	TP_fast_assign(
+		__entry->from_idle = from_idle;
+		__entry->wakeup = wakeup;
+		__entry->current_ticks = current_ticks;
+	),
+
+	TP_printk("idle:%d wakeup:0x%llx current:0x%llx", __entry->from_idle,
+				__entry->wakeup, __entry->current_ticks)
+);
+
 #endif
 #define TRACE_INCLUDE_FILE mpm
 #include <trace/define_trace.h>