power: pm8921-charger: implement thermal mitigation

Implement thermal mitigation in the charger driver. The userspace
daemon can get the battery temperature from
/sys/class/power_supply/battery/temp

and set the mitigation levels on
/sys/module/pm8921_charger/parameters/thermal_mitigation

The battery driver supports 4 levels [0 through 3]. O being normal
and 3 being extreme thermal mitigation.

Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
3 files changed