mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-26 06:33:19 -04:00
power: smb1398: Handle USB power path suspension appropriately
Unsuspend USB power path (turn off USB-path front-porch FET) before enabling, and suspend it upon disabling SMB1398. Change-Id: I319c215861f82cb2fb96504c38993c6eb03c38a7 Signed-off-by: Guru Das Srinagesh <gurus@codeaurora.org>
This commit is contained in:
parent
1ea05851c7
commit
084fe9ff3c
1 changed files with 9 additions and 1 deletions
|
|
@ -1,6 +1,6 @@
|
|||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
/*
|
||||
* Copyright (c) 2020 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2020-2021 The Linux Foundation. All rights reserved.
|
||||
*/
|
||||
|
||||
#define pr_fmt(fmt) "SMB1398: %s: " fmt, __func__
|
||||
|
|
@ -724,6 +724,14 @@ static int smb1398_div2_cp_switcher_en(struct smb1398_chip *chip, bool en)
|
|||
{
|
||||
int rc;
|
||||
|
||||
rc = smb1398_masked_write(chip, MISC_USB_WLS_SUSPEND_REG,
|
||||
USB_SUSPEND, en ? 0 : USB_SUSPEND);
|
||||
if (rc < 0) {
|
||||
dev_err(chip->dev, "Couldn't write USB_WLS_SUSPEND_REG, rc=%d\n",
|
||||
rc);
|
||||
return rc;
|
||||
}
|
||||
|
||||
rc = smb1398_masked_write(chip, MISC_SL_SWITCH_EN_REG,
|
||||
EN_SWITCHER, en ? EN_SWITCHER : 0);
|
||||
if (rc < 0) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue