Anirudh Ghayal 70d3a84c25 misc: qpnp-misc: Add support for TWM mode
TWM (Traditional watch mode) is a low power mode supported
on the BG platform. PMIC is  configured differently
while entering into TWM mode.

Add a sysfs node to -

1. Allow the BG daemon to enable/disable TWM mode.

echo 1 > /sys/class/pmic_twm/twm_enable --> Enable TWM mode
echo 0 > /sys/class/pmic_twm/twm_enable --> Clear TWM mode

2. Allow the BG daemon to check the TWM_EXIT state.

cat /sys/class/pmic_twm/twm_exit
Value of "1" indicates exit from TWM state

Also, add a notifier to notify other modules of the TWM enable
configuration.

Change-Id: Ide2f56a80d7b21d3def6a640db71512c20d30015
Signed-off-by: Sundara Vinayagam <sundvi@codeaurora.org>
Signed-off-by: Shilpa Suresh <sbsure@codeaurora.org>
2019-12-04 20:57:26 -08:00
..