mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-08 21:22:09 -04:00
usb_therm:optimize the usb cooler function
Charging enable in hot usb temp when thermal policy switch. Optimize the usb cooler function. Change-Id: I15779e756e3aa362b08377690820236d20ff2406 Signed-off-by: Lei Chen <chenlei18@lenovo.com> Reviewed-on: https://gerrit.mot.com/2489283 SME-Granted: SME Approvals Granted SLTApproved: Slta Waiver Tested-by: Jira Key Reviewed-by: Wei Xu <xuwei9@lenovo.com> Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com> Submit-Approved: Jira Key
This commit is contained in:
parent
632bd4f7f5
commit
3f876117c5
1 changed files with 2 additions and 11 deletions
|
|
@ -1889,18 +1889,9 @@ static int usb_therm_set_cur_state(struct thermal_cooling_device *cdev,
|
|||
unsigned long state)
|
||||
{
|
||||
struct mmi_discrete_charger *chip = cdev->devdata;
|
||||
|
||||
if (state) {
|
||||
if (chip->real_charger_type == POWER_SUPPLY_TYPE_USB_DCP |
|
||||
chip->real_charger_type == POWER_SUPPLY_TYPE_USB_PD |
|
||||
chip->real_charger_type == POWER_SUPPLY_TYPE_USB_HVDCP |
|
||||
chip->real_charger_type == POWER_SUPPLY_TYPE_USB_HVDCP_3 |
|
||||
chip->real_charger_type == POWER_SUPPLY_TYPE_USB_HVDCP_3P5 |
|
||||
chip->real_charger_type == POWER_SUPPLY_TYPE_USB |
|
||||
chip->real_charger_type == POWER_SUPPLY_TYPE_USB_CDP) {
|
||||
mmi_info(chip, "Enable typec mosfet for DCP/PD/HVDCP/USB/CDP.");
|
||||
usb_therm_set_mosfet(chip, true);
|
||||
}
|
||||
mmi_info(chip, "Enable typec mosfet.");
|
||||
usb_therm_set_mosfet(chip, true);
|
||||
} else {
|
||||
mmi_info(chip, "Disable typec mosfet.");
|
||||
usb_therm_set_mosfet(chip, false);
|
||||
|
|
|
|||
Loading…
Reference in a new issue