aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/chipidea
diff options
context:
space:
mode:
authorXu Yang <xu.yang_2@nxp.com>2025-06-14 20:56:43 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2025-06-19 12:28:25 +0200
commit78c76554c6b94dfa5e101b870f0c57b6c230503e (patch)
treefecd4e75012518a6e886286ab40b05d7a7561897 /drivers/usb/chipidea
parentusb: typec: intel_pmc_mux: Defer probe if SCU IPC isn't present (diff)
downloadlinux-78c76554c6b94dfa5e101b870f0c57b6c230503e.tar.gz
linux-78c76554c6b94dfa5e101b870f0c57b6c230503e.zip
usb: chipidea: udc: add CI_HDRC_CONTROLLER_PULLUP_EVENT event
The device controller will send CI_HDRC_CONTROLLER_PULLUP_EVENT event when it's going to pullup or pulldown data line. Signed-off-by: Xu Yang <xu.yang_2@nxp.com> Acked-by: Peter Chen <peter.chen@kernel.org> Link: https://lore.kernel.org/r/20250614125645.207732-2-xu.yang_2@nxp.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/chipidea')
-rw-r--r--drivers/usb/chipidea/udc.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/usb/chipidea/udc.c b/drivers/usb/chipidea/udc.c
index 8a9b31fd5c89..8ec9817d3311 100644
--- a/drivers/usb/chipidea/udc.c
+++ b/drivers/usb/chipidea/udc.c
@@ -1970,6 +1970,11 @@ static int ci_udc_pullup(struct usb_gadget *_gadget, int is_on)
hw_write(ci, OP_USBCMD, USBCMD_RS, USBCMD_RS);
else
hw_write(ci, OP_USBCMD, USBCMD_RS, 0);
+
+ if (ci->platdata->notify_event) {
+ _gadget->connected = is_on;
+ ci->platdata->notify_event(ci, CI_HDRC_CONTROLLER_PULLUP_EVENT);
+ }
pm_runtime_put_sync(ci->dev);
return 0;