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

Skip to content
Commit 8c28e0fa authored by Nicholas Troast's avatar Nicholas Troast Committed by Harry Yang
Browse files

power: smb-lib: cleanup everything upon USB removal



Currently it is expected upon USB removal that consumers will receive a
notification that USB has been removed and will cleanup after
themselves. Unfortunately this makes it very difficult to keep track of
all of the necessary cleanup steps upon removal.

Also, in preparation of not allowing consumers to set properties after a
USB removal has happened it is now the responsibility of the charger
driver to cleanup on their behalf.

Moreover, since we don't have a separate removal/insertion interrupt,
the removal/insertion code may run even if the typeC cable is not
physically inserted/removed. Fix it by tracking a typec_present flag.

CRs-Fixed: 2020132
Change-Id: Ia514abaa4e12f72daec17fd1e95f3c51cc38a15f
Signed-off-by: default avatarNicholas Troast <ntroast@codeaurora.org>
Signed-off-by: default avatarAbhijeet Dharmapurikar <adharmap@codeaurora.org>
parent 0e43281e
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