diff options
| author | Fenglin Wu <fenglinw@codeaurora.org> | 2017-06-22 12:30:33 +0800 |
|---|---|---|
| committer | Fenglin Wu <fenglinw@codeaurora.org> | 2017-06-22 12:41:58 +0800 |
| commit | dd1a56d034ebfa5f96e2e68053b97c978ed8cf12 (patch) | |
| tree | 481cd72c225cb704525527b41ec893a3035aeb36 | |
| parent | 560a996da5c0bf398d2fba51e9909cd7323afea8 (diff) | |
power: qpnp-smb2: Unset ONLINE for UNKNOWN USB charger type
Currently, USB power_supply POWER_SUPPLY_PROP_ONLINE property will be
set if the charger type is POWER_SUPPLY_TYPE_UNKNOWN which is not
expected. Unset ONLINE for UNKNOWN USB charger type.
CRs-Fixed: 2065139
Change-Id: Ibc40ee62b2d95c319a7fe34b17813c2b57518f67
Signed-off-by: Fenglin Wu <fenglinw@codeaurora.org>
| -rw-r--r-- | drivers/power/supply/qcom/qpnp-smb2.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/power/supply/qcom/qpnp-smb2.c b/drivers/power/supply/qcom/qpnp-smb2.c index 803851d2b3ef..47d9e715fe3e 100644 --- a/drivers/power/supply/qcom/qpnp-smb2.c +++ b/drivers/power/supply/qcom/qpnp-smb2.c @@ -461,6 +461,8 @@ static int smb2_usb_get_prop(struct power_supply *psy, val->intval = 0; else val->intval = 1; + if (chg->real_charger_type == POWER_SUPPLY_TYPE_UNKNOWN) + val->intval = 0; break; case POWER_SUPPLY_PROP_VOLTAGE_MIN: val->intval = chg->voltage_min_uv; |
