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

Skip to content
Commit d4e9f193 authored by Harry Yang's avatar Harry Yang Committed by Guru Das Srinagesh
Browse files

power: smb5-lib: re-organize smb_en pin control code to be legible



The smb_en pin access is lock protected, and every each function call
smblib_select_sec_charger() is wrapped by mutex lock/unlock operations.
The code can be simplified.

Factor smb_en pin control operation into a separate function
smblib_select_sec_charger_locked(), and encapsulate in
smblib_select_sec_charger() along with mutex lock/unlock.

Also add smb_en toggling to smblib_select_sec_charger_locked().

Change-Id: I9d369fbdb3e599d1bebc0bcbddc3ce543912f85d
Signed-off-by: default avatarHarry Yang <harryy@codeaurora.org>
parent ff079210
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