From: Fabio Estevam <festevam@xxxxxxx>
Currently, after the SoC reaches the critical temperature, the board
goes through a poweroff mechanism.
In some cases, such behavior does not suit well, as the board may be
unattended in the field and rebooting may be a better approach.
The bootloader may also check the temperature and only allow the boot to
proceed when the temperature is below a certain threshold.
Introduce a 'reboot_on_crit' sysfs entry to indicate that the board
will go through a reboot after the critical temperature is reached.
By default, the original shutdown behavior is preserved.
Tested on a imx8mm-evk board by issuing the command below:
echo 1 > /sys/devices/platform/soc@0/30000000.bus/30260000.tmu/reboot_on_crit
Confirmed that it goes through a reboot after the critical temperature
is reached.
Signed-off-by: Fabio Estevam <festevam@xxxxxxx>
---
Changes since v3:
- Add a sysfs entry.