power: smb135x-charger: Enable voting for path suspending
The driver prioritizes suspend calls from userspace (as part of
disabling charging) over other suspend calls i.e. if the userspace
has set the USB path to suspend state, even if another usecase (current
value set from USB stack) wants to unsuspend USB path it cannot.
This works as long as there are only two levels of usecases - in this
case USB charging enable/disable and current being set from the USB
driver.
We need to expand these usecase levels to accomodate thermal usecases.
For that change the suspend flags in the chip structure to bit
representation where every bit indicates the vote from that particular
usecase. Apply suspend settings when all of them vote for unsuspending
OR any one of them votes for suspending.
Change-Id: I9850a82e66b7a995694713157607e4a1482bfcd6
Signed-off-by:
Abhijeet Dharmapurikar <adharmap@codeaurora.org>
Loading
Please register or sign in to comment