Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 07b6e5b9 authored by Abhijeet Dharmapurikar's avatar Abhijeet Dharmapurikar Committed by Ashay Jaiswal
Browse files

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: default avatarAbhijeet Dharmapurikar <adharmap@codeaurora.org>
parent 05911847
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment