diff options
| author | Xu Yang <xu.yang_2@nxp.com> | 2026-04-23 17:53:55 +0800 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2026-04-27 05:14:18 -0600 |
| commit | 62911bc82b0332aee7546156800d3516500fa1e1 (patch) | |
| tree | 697188879ae2c8ca1c7a9fdb93e0ae3b5775e1d1 /include/linux/platform_data | |
| parent | e68fddb47aad85ebd294a051243066f29da20d8d (diff) | |
usb: gadget: udc: skip pullup() if already connected
The device controller may update vbus status via usb_udc_vbus_handler(),
which tries to connect the gadget even though gadget_bind_driver() has
already called usb_udc_connect_control_locked(). This causes pullup() to
be called twice. Avoid this by checking if gadget->connected is true.
This also set gadget->connected as false in usb_gadget_activate() if it
became connected while it was being deactivated. Otherwise,
usb_gadget_connect_locked will return early and pullup() won't be called.
Signed-off-by: Xu Yang <xu.yang_2@nxp.com>
Reviewed-by: Alan Stern <stern@rowland.harvard.edu>
Link: https://patch.msgid.link/20260423095355.2673035-1-xu.yang_2@nxp.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux/platform_data')
0 files changed, 0 insertions, 0 deletions
