Commit 9ed714db authored by Linus Torvalds's avatar Linus Torvalds

Merge tag 'usb-5.19-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb

Pull USB driver fixes from Greg KH:
 "Here are some small USB driver fixes and new device ids for 5.19-rc7.
  They include:

   - new usb-serial driver ids

   - typec uevent fix

   - uvc gadget driver fix

   - dwc3 driver fixes

   - ehci-fsl driver fix

  All of these have been in linux-next for a while with no reported
  issues"

* tag 'usb-5.19-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb:
  USB: serial: ftdi_sio: add Belimo device ids
  drivers/usb/host/ehci-fsl: Fix interrupt setup in host mode.
  usb: gadget: uvc: fix changing interface name via configfs
  usb: typec: add missing uevent when partner support PD
  usb: dwc3-am62: remove unnecesary clk_put()
  usb: dwc3: gadget: Fix event pending check
parents 8c91723a 3486af89
...@@ -195,8 +195,7 @@ static int dwc3_ti_probe(struct platform_device *pdev) ...@@ -195,8 +195,7 @@ static int dwc3_ti_probe(struct platform_device *pdev)
if (i == ARRAY_SIZE(dwc3_ti_rate_table)) { if (i == ARRAY_SIZE(dwc3_ti_rate_table)) {
dev_err(dev, "unsupported usb2_refclk rate: %lu KHz\n", rate); dev_err(dev, "unsupported usb2_refclk rate: %lu KHz\n", rate);
ret = -EINVAL; return -EINVAL;
goto err_clk_disable;
} }
data->rate_code = i; data->rate_code = i;
...@@ -204,7 +203,7 @@ static int dwc3_ti_probe(struct platform_device *pdev) ...@@ -204,7 +203,7 @@ static int dwc3_ti_probe(struct platform_device *pdev)
/* Read the syscon property and set the rate code */ /* Read the syscon property and set the rate code */
ret = phy_syscon_pll_refclk(data); ret = phy_syscon_pll_refclk(data);
if (ret) if (ret)
goto err_clk_disable; return ret;
/* VBUS divider select */ /* VBUS divider select */
data->vbus_divider = device_property_read_bool(dev, "ti,vbus-divider"); data->vbus_divider = device_property_read_bool(dev, "ti,vbus-divider");
...@@ -245,8 +244,6 @@ static int dwc3_ti_probe(struct platform_device *pdev) ...@@ -245,8 +244,6 @@ static int dwc3_ti_probe(struct platform_device *pdev)
clk_disable_unprepare(data->usb2_refclk); clk_disable_unprepare(data->usb2_refclk);
pm_runtime_disable(dev); pm_runtime_disable(dev);
pm_runtime_set_suspended(dev); pm_runtime_set_suspended(dev);
err_clk_disable:
clk_put(data->usb2_refclk);
return ret; return ret;
} }
...@@ -276,7 +273,6 @@ static int dwc3_ti_remove(struct platform_device *pdev) ...@@ -276,7 +273,6 @@ static int dwc3_ti_remove(struct platform_device *pdev)
pm_runtime_disable(dev); pm_runtime_disable(dev);
pm_runtime_set_suspended(dev); pm_runtime_set_suspended(dev);
clk_put(data->usb2_refclk);
platform_set_drvdata(pdev, NULL); platform_set_drvdata(pdev, NULL);
return 0; return 0;
} }
......
...@@ -4249,7 +4249,6 @@ static irqreturn_t dwc3_process_event_buf(struct dwc3_event_buffer *evt) ...@@ -4249,7 +4249,6 @@ static irqreturn_t dwc3_process_event_buf(struct dwc3_event_buffer *evt)
} }
evt->count = 0; evt->count = 0;
evt->flags &= ~DWC3_EVENT_PENDING;
ret = IRQ_HANDLED; ret = IRQ_HANDLED;
/* Unmask interrupt */ /* Unmask interrupt */
...@@ -4261,6 +4260,9 @@ static irqreturn_t dwc3_process_event_buf(struct dwc3_event_buffer *evt) ...@@ -4261,6 +4260,9 @@ static irqreturn_t dwc3_process_event_buf(struct dwc3_event_buffer *evt)
dwc3_writel(dwc->regs, DWC3_DEV_IMOD(0), dwc->imod_interval); dwc3_writel(dwc->regs, DWC3_DEV_IMOD(0), dwc->imod_interval);
} }
/* Keep the clearing of DWC3_EVENT_PENDING at the end */
evt->flags &= ~DWC3_EVENT_PENDING;
return ret; return ret;
} }
......
...@@ -2371,6 +2371,7 @@ static ssize_t f_uvc_opts_string_##cname##_store(struct config_item *item,\ ...@@ -2371,6 +2371,7 @@ static ssize_t f_uvc_opts_string_##cname##_store(struct config_item *item,\
const char *page, size_t len) \ const char *page, size_t len) \
{ \ { \
struct f_uvc_opts *opts = to_f_uvc_opts(item); \ struct f_uvc_opts *opts = to_f_uvc_opts(item); \
int size = min(sizeof(opts->aname), len + 1); \
int ret = 0; \ int ret = 0; \
\ \
mutex_lock(&opts->lock); \ mutex_lock(&opts->lock); \
...@@ -2379,8 +2380,9 @@ static ssize_t f_uvc_opts_string_##cname##_store(struct config_item *item,\ ...@@ -2379,8 +2380,9 @@ static ssize_t f_uvc_opts_string_##cname##_store(struct config_item *item,\
goto end; \ goto end; \
} \ } \
\ \
ret = snprintf(opts->aname, min(sizeof(opts->aname), len), \ ret = strscpy(opts->aname, page, size); \
"%s", page); \ if (ret == -E2BIG) \
ret = size - 1; \
\ \
end: \ end: \
mutex_unlock(&opts->lock); \ mutex_unlock(&opts->lock); \
......
...@@ -76,14 +76,9 @@ static int fsl_ehci_drv_probe(struct platform_device *pdev) ...@@ -76,14 +76,9 @@ static int fsl_ehci_drv_probe(struct platform_device *pdev)
return -ENODEV; return -ENODEV;
} }
res = platform_get_resource(pdev, IORESOURCE_IRQ, 0); irq = platform_get_irq(pdev, 0);
if (!res) { if (irq < 0)
dev_err(&pdev->dev, return irq;
"Found HC with no IRQ. Check %s setup!\n",
dev_name(&pdev->dev));
return -ENODEV;
}
irq = res->start;
hcd = __usb_create_hcd(&fsl_ehci_hc_driver, pdev->dev.parent, hcd = __usb_create_hcd(&fsl_ehci_hc_driver, pdev->dev.parent,
&pdev->dev, dev_name(&pdev->dev), NULL); &pdev->dev, dev_name(&pdev->dev), NULL);
......
...@@ -112,6 +112,9 @@ static struct platform_device *fsl_usb2_device_register( ...@@ -112,6 +112,9 @@ static struct platform_device *fsl_usb2_device_register(
goto error; goto error;
} }
pdev->dev.of_node = ofdev->dev.of_node;
pdev->dev.of_node_reused = true;
retval = platform_device_add(pdev); retval = platform_device_add(pdev);
if (retval) if (retval)
goto error; goto error;
......
...@@ -1023,6 +1023,9 @@ static const struct usb_device_id id_table_combined[] = { ...@@ -1023,6 +1023,9 @@ static const struct usb_device_id id_table_combined[] = {
{ USB_DEVICE(FTDI_VID, CHETCO_SEASMART_DISPLAY_PID) }, { USB_DEVICE(FTDI_VID, CHETCO_SEASMART_DISPLAY_PID) },
{ USB_DEVICE(FTDI_VID, CHETCO_SEASMART_LITE_PID) }, { USB_DEVICE(FTDI_VID, CHETCO_SEASMART_LITE_PID) },
{ USB_DEVICE(FTDI_VID, CHETCO_SEASMART_ANALOG_PID) }, { USB_DEVICE(FTDI_VID, CHETCO_SEASMART_ANALOG_PID) },
/* Belimo Automation devices */
{ USB_DEVICE(FTDI_VID, BELIMO_ZTH_PID) },
{ USB_DEVICE(FTDI_VID, BELIMO_ZIP_PID) },
/* ICP DAS I-756xU devices */ /* ICP DAS I-756xU devices */
{ USB_DEVICE(ICPDAS_VID, ICPDAS_I7560U_PID) }, { USB_DEVICE(ICPDAS_VID, ICPDAS_I7560U_PID) },
{ USB_DEVICE(ICPDAS_VID, ICPDAS_I7561U_PID) }, { USB_DEVICE(ICPDAS_VID, ICPDAS_I7561U_PID) },
......
...@@ -1568,6 +1568,12 @@ ...@@ -1568,6 +1568,12 @@
#define CHETCO_SEASMART_LITE_PID 0xA5AE /* SeaSmart Lite USB Adapter */ #define CHETCO_SEASMART_LITE_PID 0xA5AE /* SeaSmart Lite USB Adapter */
#define CHETCO_SEASMART_ANALOG_PID 0xA5AF /* SeaSmart Analog Adapter */ #define CHETCO_SEASMART_ANALOG_PID 0xA5AF /* SeaSmart Analog Adapter */
/*
* Belimo Automation
*/
#define BELIMO_ZTH_PID 0x8050
#define BELIMO_ZIP_PID 0xC811
/* /*
* Unjo AB * Unjo AB
*/ */
......
...@@ -1718,6 +1718,7 @@ void typec_set_pwr_opmode(struct typec_port *port, ...@@ -1718,6 +1718,7 @@ void typec_set_pwr_opmode(struct typec_port *port,
partner->usb_pd = 1; partner->usb_pd = 1;
sysfs_notify(&partner_dev->kobj, NULL, sysfs_notify(&partner_dev->kobj, NULL,
"supports_usb_power_delivery"); "supports_usb_power_delivery");
kobject_uevent(&partner_dev->kobj, KOBJ_CHANGE);
} }
put_device(partner_dev); put_device(partner_dev);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment