Skip to content

Commit 91edf63

Browse files
0xB0Dgregkh
authored andcommitted
usb: chipidea: msm: Ensure proper controller reset using role switch API
Currently we check to make sure there is no error state on the extcon handle for VBUS when writing to the HS_PHY_GENCONFIG_2 register. When using the USB role-switch API we still need to write to this register absent an extcon handle. This patch makes the appropriate update to ensure the write happens if role-switching is true. Fixes: 05559f1 ("usb: chipidea: add role switch class support") Cc: stable <[email protected]> Cc: Greg Kroah-Hartman <[email protected]> Cc: Philipp Zabel <[email protected]> Cc: [email protected] Cc: [email protected] Cc: Stephen Boyd <[email protected]> Signed-off-by: Bryan O'Donoghue <[email protected]> Signed-off-by: Peter Chen <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 084d7e7 commit 91edf63

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/usb/chipidea/ci_hdrc_msm.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ static int ci_hdrc_msm_notify_event(struct ci_hdrc *ci, unsigned event)
114114
hw_write_id_reg(ci, HS_PHY_GENCONFIG_2,
115115
HS_PHY_ULPI_TX_PKT_EN_CLR_FIX, 0);
116116

117-
if (!IS_ERR(ci->platdata->vbus_extcon.edev)) {
117+
if (!IS_ERR(ci->platdata->vbus_extcon.edev) || ci->role_switch) {
118118
hw_write_id_reg(ci, HS_PHY_GENCONFIG_2,
119119
HS_PHY_SESS_VLD_CTRL_EN,
120120
HS_PHY_SESS_VLD_CTRL_EN);

0 commit comments

Comments
 (0)