diff options
| author | Umang Agrawal <uagrawal@codeaurora.org> | 2018-04-26 15:52:40 +0530 |
|---|---|---|
| committer | Umang Agrawal <uagrawal@codeaurora.org> | 2018-05-21 17:55:57 +0530 |
| commit | b7c91feb97d98a86227bef7d3840c16ac990d42e (patch) | |
| tree | 913413635540d301981ff1dc12fd94d05201e0f1 /drivers/power | |
| parent | 1ff291a124bd33683f1cf8eb99fdbf6064062050 (diff) | |
power: smb-lib: Allow PD enable/disable for typeC devices only
Currently if pd is not allowed, we force pd_active to 0 inorder
to run the legacy workaround and rerun apsd. But, this workaround
is required only for typeC devices.
Add a check to prevent PD disable for micro usb device.
Change-Id: I842166f66065c281ab366da327080b09a5e282e1
Signed-off-by: Umang Agrawal <uagrawal@codeaurora.org>
Diffstat (limited to 'drivers/power')
| -rw-r--r-- | drivers/power/supply/qcom/smb-lib.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/power/supply/qcom/smb-lib.c b/drivers/power/supply/qcom/smb-lib.c index 0ed748b5d582..2cf8eb4e7ceb 100644 --- a/drivers/power/supply/qcom/smb-lib.c +++ b/drivers/power/supply/qcom/smb-lib.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2016-2017 The Linux Foundation. All rights reserved. +/* Copyright (c) 2016-2018 The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and @@ -3615,7 +3615,8 @@ static void smblib_handle_hvdcp_check_timeout(struct smb_charger *chg, * if pd is not allowed, then set pd_active = false right here, * so that it starts the hvdcp engine */ - if (!get_effective_result(chg->pd_allowed_votable)) + if (!get_effective_result(chg->pd_allowed_votable) && + !chg->micro_usb_mode) __smblib_set_prop_pd_active(chg, 0); } |
