summaryrefslogtreecommitdiff
path: root/drivers/usb/typec/class.c
diff options
context:
space:
mode:
authorRoy Luo <royluo@google.com>2024-12-23 04:25:36 +0000
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2024-12-24 08:56:05 +0100
commit1ff24d40b3c3c673d833c546f898133b80dffc39 (patch)
treea39de2fce184ea5e47f7c8728cc5f721bd9e4363 /drivers/usb/typec/class.c
parent997a6e146d5fdb9d92186a09e7ad6463679fe271 (diff)
usb: dwc3: gadget: Fix incorrect UDC state after manual deconfiguration
The UDC state in sysfs (/sys/class/udc/<udc>/state) should accurately reflect the current state of the USB Device Controller. Currently, the UDC state is not handled consistently during gadget disconnection. While the disconnect interrupt path correctly sets the state to "not-attached", manual deconfiguration leaves the state in "configured", misrepresenting the actual situation. This commit ensures consistent UDC state handling by setting the state to "not-attached" after manual deconfiguration. This accurately reflects the UDC's state and provides a consistent behavior regardless of the disconnection method. Signed-off-by: Roy Luo <royluo@google.com> Reviewed-by: André Draszik <andre.draszik@linaro.org> Tested-by: André Draszik <andre.draszik@linaro.org> Link: https://lore.kernel.org/r/20241223042536.1465299-1-royluo@google.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/typec/class.c')
0 files changed, 0 insertions, 0 deletions