97f0960e55
Add API log_wakeup_reason() and expose it to userspace via sysfs path /sys/kernel/wakeup_reasons/last_resume_reason Bug: 120445600 Signed-off-by: Ruchi Kandoi <kandoiruchi@google.com> [AmitP: Folded following android-4.9 commit changes into this patch 1135122a192a ("ANDROID: POWER: fix compile warnings in log_wakeup_reason") b4e6247778b0 ("ANDROID: Power: Changes the permission to read only for sysfs file /sys/kernel/wakeup_reasons/last_resume_reason") e13dbc7c69cd ("ANDROID: power: wakeup_reason: rename irq_count to irqcount")] Signed-off-by: Amit Pundir <amit.pundir@linaro.org> [astrachan: Folded the following changes into this patch: 39d7c7fe91c0 ("ANDROID: power: wakeup_reason: Add guard condition for maximum wakeup reasons") 0730434bdf49 ("ANDROID: power: wakeup_reason: Avoids bogus error messages for the suspend aborts.") 4e42dceae54e ("ANDROID: power: wakeup_reason: Adds functionality to log the last suspend abort reason.") f21313b70ac7 ("ANDROID: power: wakeup_reason: Report suspend times from last_suspend_time") f97ec34442ac ("ANDROID: power: wakeup_reason: fix suspend time reporting") cd92df73e504 ("ANDROID: power: wakeup: Add last wake up source logging for suspend abort reason.") 546b6ae3c087 ("ANDROID: power: wakeup: Add the guard condition for len in pm_get_active_wakeup_sources") 1453d9ffcdbe ("ANDROID: power: wakeup_reason: make logging work in an interrupt context.")] Change-Id: I81addaf420f1338255c5d0638b0d244a99d777d1 Signed-off-by: Alistair Strachan <astrachan@google.com>
20 lines
595 B
Makefile
20 lines
595 B
Makefile
# SPDX-License-Identifier: GPL-2.0
|
|
|
|
ccflags-$(CONFIG_PM_DEBUG) := -DDEBUG
|
|
|
|
KASAN_SANITIZE_snapshot.o := n
|
|
|
|
obj-y += qos.o
|
|
obj-$(CONFIG_PM) += main.o
|
|
obj-$(CONFIG_VT_CONSOLE_SLEEP) += console.o
|
|
obj-$(CONFIG_FREEZER) += process.o
|
|
obj-$(CONFIG_SUSPEND) += suspend.o
|
|
obj-$(CONFIG_PM_TEST_SUSPEND) += suspend_test.o
|
|
obj-$(CONFIG_HIBERNATION) += hibernate.o snapshot.o swap.o user.o
|
|
obj-$(CONFIG_PM_AUTOSLEEP) += autosleep.o
|
|
obj-$(CONFIG_PM_WAKELOCKS) += wakelock.o
|
|
|
|
obj-$(CONFIG_MAGIC_SYSRQ) += poweroff.o
|
|
|
|
obj-$(CONFIG_ENERGY_MODEL) += energy_model.o
|
|
obj-$(CONFIG_SUSPEND) += wakeup_reason.o
|