Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1588052
| From | Chanwoo Choi <cwchoi00@gmail.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v2 4/4] usb: dwc3: Workaround for super-speed host on dra7 in dual-role mode |
| Date | 2017-02-25 04:40 +0100 |
| Message-ID | <teBnb-1Oq-1@gated-at.bofh.it> (permalink) |
| References | <tbtYS-6zA-11@gated-at.bofh.it> <tbtYS-6zA-9@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Hi Roger,
[snip]
> /* dwc->lock must be held */
> static void dwc3_otg_core_exit(struct dwc3 *dwc)
> {
> + if (dwc->edev)
> + return;
> +
> /* disable all otg irqs */
> dwc3_otg_disable_events(dwc, DWC3_OTG_ALL_EVENTS);
> /* clear all events */
> @@ -1286,6 +1364,57 @@ static int dwc3_drd_init(struct dwc3 *dwc)
>
> INIT_WORK(&dwc->otg_work, dwc3_drd_work);
>
> + /* If extcon device is present we don't rely on OTG core for ID event */
> + if (dwc->edev) {
> + int id, vbus;
> +
> + dwc->edev_nb.notifier_call = dwc3_drd_notifier;
> + ret = extcon_register_notifier(dwc->edev, EXTCON_USB,
> + &dwc->edev_nb);
I recommend that you better to use the devm_extcon_register_notifier()
> + if (ret < 0) {
> + dev_err(dwc->dev, "Couldn't register USB cable notifier\n");
> + return -ENODEV;
> + }
> +
> + ret = extcon_register_notifier(dwc->edev, EXTCON_USB_HOST,
> + &dwc->edev_nb);
Ditto.
[snip]
--
Best Regards,
Chanwoo Choi
Samsung Electronics
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH v2 4/4] usb: dwc3: Workaround for super-speed host on dra7 in dual-role mode Roger Quadros <rogerq@ti.com> - 2017-02-16 14:10 +0100
Re: [PATCH v2 4/4] usb: dwc3: Workaround for super-speed host on dra7 in dual-role mode Vivek Gautam <vivek.gautam@codeaurora.org> - 2017-02-23 09:40 +0100
Re: [PATCH v2 4/4] usb: dwc3: Workaround for super-speed host on dra7 in dual-role mode Peter Chen <hzpeterchen@gmail.com> - 2017-02-24 02:10 +0100
Re: [PATCH v2 4/4] usb: dwc3: Workaround for super-speed host on dra7 in dual-role mode Vivek Gautam <vivek.gautam@codeaurora.org> - 2017-02-24 04:20 +0100
Re: [PATCH v2 4/4] usb: dwc3: Workaround for super-speed host on dra7 in dual-role mode Roger Quadros <rogerq@ti.com> - 2017-02-24 13:10 +0100
Re: [PATCH v2 4/4] usb: dwc3: Workaround for super-speed host on dra7 in dual-role mode Chanwoo Choi <cwchoi00@gmail.com> - 2017-02-25 04:50 +0100
Re: [PATCH v2 4/4] usb: dwc3: Workaround for super-speed host on dra7 in dual-role mode Chanwoo Choi <cwchoi00@gmail.com> - 2017-02-25 05:00 +0100
Re: [PATCH v2 4/4] usb: dwc3: Workaround for super-speed host on dra7 in dual-role mode Vivek Gautam <vivek.gautam@codeaurora.org> - 2017-02-28 15:10 +0100
Re: [PATCH v2 4/4] usb: dwc3: Workaround for super-speed host on dra7 in dual-role mode Chanwoo Choi <cwchoi00@gmail.com> - 2017-02-25 04:40 +0100
Re: [PATCH v2 4/4] usb: dwc3: Workaround for super-speed host on dra7 in dual-role mode Roger Quadros <rogerq@ti.com> - 2017-02-28 16:20 +0100
csiph-web