lkml.org 
[lkml]   [2020]   [Dec]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH v3 2/2] usb: dwc3: drd: Improve dwc3_get_extcon() style
On Sun, Dec 13, 2020 at 5:27 AM Sam Protsenko
<semen.protsenko@linaro.org> wrote:
>
> Commit c73b41955ee4 ("usb: dwc3: drd: Avoid error when extcon is

The previous change ("...

(because we don't know the actual commit id)

> missing") changed the code flow in dwc3_get_extcon() function, leading
> to unnecessary if-branch. This patch does housekeeping by reworking the
> code for obtaining extcon device from the "port" node. While at it, add

an extcon

> the comment from mentioned code block, explaining how checking the port
> availability helps to avoid the misleading error.

...

> + /*
> + * Try to get extcon device from USB PHY controller's "port" node.

an extcon
the USB

> + * Check if it has the "port" node first, to avoid printing the error
> + * message from underlying code, as it's a valid case: extcon device
> + * (and "port" node) may be missing in case of "usb-role-switch" or OTG
> + * mode.
> + */

To me it sounds like this should be in the previous patch.

--
With Best Regards,
Andy Shevchenko

\
 
 \ /
  Last update: 2020-12-13 12:33    [W:0.066 / U:0.824 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site