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

Skip to content
Commit 36f363fd authored by Maria Yu's avatar Maria Yu
Browse files

platform: qpnp-power-on: Set boot reason in procfs



Assigns a value to the boot_reason procfs property in
qpnp-power-on. This property can be read via
/proc/sys/kernel/boot_reason. The value for this property
will reflect lowest bit set in the PON_REASON1 PMIC register.
For example, if bit 0 is set in the register, then
boot_reason will have a value of 1. If no bits are set
in the register, then boot_reason will have a value of 0.

For existing PMIC chips, the following mapping applies
for the value of boot_reason:

0 -> unknown
1 -> hard reset
2 -> sudden momentary power loss (SMPL)
3 -> real time clock (RTC)
4 -> DC charger inserted
5 -> USB charger inserted
6 -> PON1 pin toggled (for secondary PMICs)
7 -> CBLPWR_N pin toggled (for external power supply)
8 -> KPDPWR_N pin toggled (power key pressed)

Change-Id: Icf2be66165fd01d3063282fcbfb2b115480e7b5c
Signed-off-by: default avatarMaria Yu <aiquny@codeaurora.org>
parent 39e0d0b3
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment