qpnp: smb-lib: move usb_icl_votable to battery library
Move usb_icl_votable creation and it's callback in the
battery.c file, in preparation for an upcoming change where
usb_icl_votable callback will be able to
disable parallel charger when a low input current
request is set.
The new callback uses CURRENT_MAX property to be set on main
psy to set the ICL limit of primary charger.
The limit setting code in main charger path where the votable
call resides currently relies a lot on client being present or not.
Since the votable is being moved away, it won't have information
about the client. So use the current parameter of INT_MAX to
indicate no clients present.
Also it could be that main psy is not instantiated by the time first
icl vote comes in. Ensure that we rerun_election on usb_icl_votable
the instant main psy is seen.
CRs-Fixed:
2014572
Change-Id: Ie449af086ed9218b40ea83158b69e8f8e73edda3
Signed-off-by: Ashay Jaiswal <ashayj@codeaurora.org>
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>