OSDN Git Service

smb-lib: Handle icl voter priorities between DCP, SDP and PD type
authorAbhijeet Dharmapurikar <adharmap@codeaurora.org>
Thu, 9 Feb 2017 17:25:51 +0000 (22:55 +0530)
committerAshay Jaiswal <ashayj@codeaurora.org>
Fri, 10 Feb 2017 04:26:36 +0000 (09:56 +0530)
commit059118476764090b5fc6ee4bdfb5491f6571cb34
tree5a399dd0c3ebe523c3ea99fa10c1b779792021fa
parentdd6494d94ef819c093157f73a314e9927305d305
smb-lib: Handle icl voter priorities between DCP, SDP and PD type

Cleanup the code such that when PD is activated, DCP_VOTER
and USB_PSY_VOTER (the voter for SDP and CDP types) are disabled.

While at it DCP_VOTER is intended to enforce a different value
from the hw defaults. Set it only when type is confirmed DCP.

Also to handle the situation when the PD profile allows to suspend
based on the phy, use a different voter PD_SUSPEND_SUPPORTED_VOTER
to activate that situation.

Change-Id: I0cb1a0aad9c94fdd233ec3103779e1a13449472e
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
drivers/power/supply/qcom/qpnp-smb2.c
drivers/power/supply/qcom/smb-lib.c
drivers/power/supply/qcom/smb-lib.h