usb: misc: nb7vpq904m: fix disconnect api

if failed to stop active transfer in USB gadget mode,
currently gadget state will change to disconnect mode,
redriver will change to disable mode when usb call redriver disconnect,
it can't enable again if there is no new adsp notification,
usb super speed will not work again.

it should not change redriver mode to disable, but it can only write
register to disable and keep current software mode.

Change-Id: I3b8aa4140482564948bc8e25c4ef2532f4e641fa
Signed-off-by: Linyu Yuan <linyyuan@codeaurora.org>
This commit is contained in:
Linyu Yuan 2021-05-12 15:25:51 +08:00
commit 54060b2bc8

View file

@ -1,6 +1,6 @@
// SPDX-License-Identifier: GPL-2.0-only
/*
* Copyright (c) 2018-2020, The Linux Foundation. All rights reserved.
* Copyright (c) 2018-2021, The Linux Foundation. All rights reserved.
*/
#include <linux/module.h>
@ -578,12 +578,10 @@ int redriver_notify_disconnect(struct device_node *node)
(redriver->op_mode == OP_MODE_NONE))
return 0;
dev_dbg(redriver->dev, "op mode %s -> %s\n",
OPMODESTR(redriver->op_mode), OPMODESTR(OP_MODE_NONE));
dev_dbg(redriver->dev, "disconnect op mode %s\n",
OPMODESTR(redriver->op_mode));
redriver->op_mode = OP_MODE_NONE;
ssusb_redriver_gen_dev_set(redriver);
redriver_i2c_reg_set(redriver, GEN_DEV_SET_REG, 0);
return 0;
}