smb-lib: manage override in icl_callback
Currently we have only one path - the pd active setting path - where
ICL_OVERRIDE gets set.
With the upcoming changes to manage connector temperature
mitigation and usbin-usbin parallel charger, the ICL_OVERRIDE is needed
to be set from these usecases.
So instead of creating a voter for ICL_OVERRIDE and putting the onus
on callsites to set it before calling their icl settings, it is best
to handle it in icl_callback.
Update the icl_callback to manage override and suspend in this way.
- Presence of voter signifies that the driver wants to enforce a
value different than the hw default. Force an icl override.
- No voters signifies that the hw defaults are good, undo an override.
- For USB types that command a limit aka SDP and CDP, never override.
- never suspend if there are no clients.
Change-Id: I3ed01237b0bb2c028bec572d2905cabb03ce50a3
Signed-off-by:
Abhijeet Dharmapurikar <adharmap@codeaurora.org>
Loading
Please register or sign in to comment