power: qpnp-charger: add charger OVP status monitor
Enable coarse-det-usb irq for charger OVP monitor. When insert a
high voltage charger, coarse-det-usb irq trigger, after wait for
usb valid debounce time, check the OVP condition, and report usb
health state; When an OVP happened in the process of charging, a
falling usbin valid_irq trigger, check OVP condition in usb plug
out condition, and report the usb health state.
Userspace can use the charger health state change to pop up
warning message when a charger, which exceeds the OVP threshold,
is connected.
Change-Id: Idedcdd7084aa24505675cf016d869444a89ca46c
Signed-off-by: Wu Fenglin <fenglinw@codeaurora.org>
6 files changed