qpnp: smb2: fix ICL recovery mechanism

ICL recovery mechanism is used by user space daemon
to recover from adapter collapse during voltage increment
event by reducing the USB ICL. There could be a situation
where nobody votes on usb_icl_votable and this could lead
to a negative ICL value.
Fix this by reading "HW_CURRENT_MAX" property to get ICL in
situations where usb_icl_votable is not voted by any client,
this ensures ICL reduction will always vote a valid ICL.

CRs-Fixed: 2048330
Change-Id: I8e53a945530c1685aaaba0537d16ac5fb11858df
Signed-off-by: Ashay Jaiswal <ashayj@codeaurora.org>
1 file changed