mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-10 06:09:23 -04:00
usb: misc: nb7vpq904m: fix suspend/resume issue
when suspend happen with empty OTG cable, then insert USB 3 thumb drive, after resume, thumb drive work in USB 2 mode. currently in suspend function only disable redriver, but no operation in resume function. fix it by enable redriver during resume. Change-Id: I57535dd24317cce77e40eb8ca30a2203af6776b0 Signed-off-by: Linyu Yuan <linyyuan@codeaurora.org>
This commit is contained in:
parent
c0a8ba67dd
commit
97d51db933
1 changed files with 11 additions and 2 deletions
|
|
@ -1022,8 +1022,8 @@ static int __maybe_unused redriver_i2c_suspend(struct device *dev)
|
|||
redriver->op_mode == OP_MODE_DEFAULT)
|
||||
return 0;
|
||||
|
||||
redriver->op_mode = OP_MODE_NONE;
|
||||
ssusb_redriver_gen_dev_set(redriver);
|
||||
redriver_i2c_reg_set(redriver, GEN_DEV_SET_REG,
|
||||
redriver->gen_dev_val & ~CHIP_EN);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -1036,6 +1036,15 @@ static int __maybe_unused redriver_i2c_resume(struct device *dev)
|
|||
dev_dbg(redriver->dev, "%s: SS USB redriver resume.\n",
|
||||
__func__);
|
||||
|
||||
/* no suspend happen in following mode */
|
||||
if (redriver->op_mode == OP_MODE_DP ||
|
||||
redriver->op_mode == OP_MODE_NONE ||
|
||||
redriver->op_mode == OP_MODE_DEFAULT)
|
||||
return 0;
|
||||
|
||||
redriver_i2c_reg_set(redriver, GEN_DEV_SET_REG,
|
||||
redriver->gen_dev_val);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue