From 25c63fa374f6f23f948ad9c1ec9ed2a0962502e6 Mon Sep 17 00:00:00 2001 From: Lijuan Gao Date: Wed, 6 Dec 2017 16:20:35 +0800 Subject: drivers: power: reset: Do cold reset when doing oem reboot As the IMEM approach to store reset reason is deprecated, so use the spare register in PMIC power-on peripheral to store the oem restart reason. Bit-2 to bit-7 of SOFT_RB_SPARE for hard reset reason, so divide existing range into regions, value 0 to 31 for common defined features and 32 to 63 values are for OEMs/ODMs specific features. Change-Id: Ib8e64d6dd5a335325d0469280e41e9d10ec9b893 Signed-off-by: Lijuan Gao --- include/linux/input/qpnp-power-on.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'include/linux/input') diff --git a/include/linux/input/qpnp-power-on.h b/include/linux/input/qpnp-power-on.h index a2624ab57826..5944f0fd3414 100644 --- a/include/linux/input/qpnp-power-on.h +++ b/include/linux/input/qpnp-power-on.h @@ -51,6 +51,7 @@ enum pon_power_off_type { }; enum pon_restart_reason { + /* 0 ~ 31 for common defined features */ PON_RESTART_REASON_UNKNOWN = 0x00, PON_RESTART_REASON_RECOVERY = 0x01, PON_RESTART_REASON_BOOTLOADER = 0x02, @@ -58,6 +59,10 @@ enum pon_restart_reason { PON_RESTART_REASON_DMVERITY_CORRUPTED = 0x04, PON_RESTART_REASON_DMVERITY_ENFORCE = 0x05, PON_RESTART_REASON_KEYS_CLEAR = 0x06, + + /* 32 ~ 63 for OEMs/ODMs secific features */ + PON_RESTART_REASON_OEM_MIN = 0x20, + PON_RESTART_REASON_OEM_MAX = 0x3f, }; #ifdef CONFIG_INPUT_QPNP_POWER_ON -- cgit v1.2.3