[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <822f7e4b-8c00-7d47-1c30-dc09841c05a9@ti.com>
Date: Tue, 28 Feb 2017 17:17:41 +0200
From: Roger Quadros <rogerq@...com>
To: <cwchoi00@...il.com>
CC: <balbi@...nel.org>, <vivek.gautam@...eaurora.org>,
<linux-usb@...r.kernel.org>,
linux-kernel <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v2 4/4] usb: dwc3: Workaround for super-speed host on dra7
in dual-role mode
On 25/02/17 05:35, Chanwoo Choi wrote:
> 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()
Got it.
>
>> + 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]
>
--
cheers,
-roger
Powered by blists - more mailing lists