<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/drivers/usb/dwc3/drd.c, branch linux-6.9.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.</subtitle>
<id>https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-6.9.y</id>
<link rel='self' href='https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-6.9.y'/>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/'/>
<updated>2023-11-21T14:27:40Z</updated>
<entry>
<title>usb: dwc3: Fix default mode initialization</title>
<updated>2023-11-21T14:27:40Z</updated>
<author>
<name>Alexander Stein</name>
<email>alexander.stein@ew.tq-group.com</email>
</author>
<published>2023-10-25T09:51:10Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=10d510abd096d620b9fda2dd3e0047c5efc4ad2b'/>
<id>urn:sha1:10d510abd096d620b9fda2dd3e0047c5efc4ad2b</id>
<content type='text'>
The default mode, configurable by DT, shall be set before usb role switch
driver is registered. Otherwise there is a race between default mode
and mode set by usb role switch driver.

Fixes: 98ed256a4dbad ("usb: dwc3: Add support for role-switch-default-mode binding")
Cc: stable &lt;stable@kernel.org&gt;
Signed-off-by: Alexander Stein &lt;alexander.stein@ew.tq-group.com&gt;
Acked-by: Thinh Nguyen &lt;Thinh.Nguyen@synopsys.com&gt;
Link: https://lore.kernel.org/r/20231025095110.2405281-1-alexander.stein@ew.tq-group.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usb: dwc3: Don't switch OTG -&gt; peripheral if extcon is present</title>
<updated>2022-10-22T10:29:43Z</updated>
<author>
<name>Andrey Smirnov</name>
<email>andrew.smirnov@gmail.com</email>
</author>
<published>2022-10-17T23:35:10Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=d182c2e1bc92084c038b44c618f29589a4de9f66'/>
<id>urn:sha1:d182c2e1bc92084c038b44c618f29589a4de9f66</id>
<content type='text'>
If the extcon device exists, get the mode from the extcon device. If
the controller is DRD and the driver is unable to determine the mode,
only then default the dr_mode to USB_DR_MODE_PERIPHERAL.

Reported-by: Steev Klimaszewski &lt;steev@kali.org&gt;
Fixes: 7a84e7353e23 ("Revert "usb: dwc3: Don't switch OTG -&gt; peripheral if extcon is present"")
Cc: stable &lt;stable@kernel.org&gt;
Reviewed-by: Thinh Nguyen &lt;Thinh.Nguyen@synopsys.com&gt;
Signed-off-by: Andrey Smirnov &lt;andrew.smirnov@gmail.com&gt;
Signed-off-by: Andy Shevchenko &lt;andriy.shevchenko@linux.intel.com&gt;
Tested-by: Steev Klimaszewski &lt;steev@kali.org&gt;
Acked-by: Thinh Nguyen &lt;Thinh.Nguyen@synopsys.com&gt;
Link: https://lore.kernel.org/r/20221017233510.53336-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>Revert "usb: dwc3: Don't switch OTG -&gt; peripheral if extcon is present"</title>
<updated>2022-09-30T11:56:38Z</updated>
<author>
<name>Andy Shevchenko</name>
<email>andriy.shevchenko@linux.intel.com</email>
</author>
<published>2022-09-27T15:53:32Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=7a84e7353e23202d4f82b05093af4db2b26e6768'/>
<id>urn:sha1:7a84e7353e23202d4f82b05093af4db2b26e6768</id>
<content type='text'>
This reverts commit 0f01017191384e3962fa31520a9fd9846c3d352f.

As pointed out by Ferry this breaks Dual Role support on
Intel Merrifield platforms.

Fixes: 0f0101719138 ("usb: dwc3: Don't switch OTG -&gt; peripheral if extcon is present")
Reported-by: Ferry Toth &lt;fntoth@gmail.com&gt;
Cc: stable@vger.kernel.org
Signed-off-by: Andy Shevchenko &lt;andriy.shevchenko@linux.intel.com&gt;
Tested-by: Ferry Toth &lt;fntoth@gmail.com&gt; # for Merrifield
Reviewed-by: Sven Peter &lt;sven@svenpeter.dev&gt;
Link: https://lore.kernel.org/r/20220927155332.10762-3-andriy.shevchenko@linux.intel.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>Merge 5.18-rc5 into usb-next</title>
<updated>2022-05-03T14:35:26Z</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@linuxfoundation.org</email>
</author>
<published>2022-05-03T14:35:26Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=b9c92fb4aabb8d93b657d028f7c530d6c42cb630'/>
<id>urn:sha1:b9c92fb4aabb8d93b657d028f7c530d6c42cb630</id>
<content type='text'>
We need the USB fixes in here, and this resolves a merge issue in
drivers/usb/dwc3/drd.c

Reported-by: Stephen Rothwell &lt;sfr@canb.auug.org.au&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usb: dwc3: Don't switch OTG -&gt; peripheral if extcon is present</title>
<updated>2022-04-22T08:29:35Z</updated>
<author>
<name>Andrey Smirnov</name>
<email>andrew.smirnov@gmail.com</email>
</author>
<published>2022-04-03T16:49:07Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=0f01017191384e3962fa31520a9fd9846c3d352f'/>
<id>urn:sha1:0f01017191384e3962fa31520a9fd9846c3d352f</id>
<content type='text'>
If the extcon device exists, get the mode from the extcon device. If
the controller is DRD and the driver is unable to determine the mode,
only then default the dr_mode to USB_DR_MODE_PERIPHERAL.

Cc: Felipe Balbi &lt;balbi@kernel.org&gt;
Cc: Thinh Nguyen &lt;thinhn@synopsys.com&gt;
Cc: linux-usb@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Reviewed-by: Thinh Nguyen &lt;Thinh.Nguyen@synopsys.com&gt;
Signed-off-by: Andrey Smirnov &lt;andrew.smirnov@gmail.com&gt;
Link: https://lore.kernel.org/r/20220403164907.662860-1-andrew.smirnov@gmail.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usb: dwc3: Try usb-role-switch first in dwc3_drd_init</title>
<updated>2022-04-21T17:08:13Z</updated>
<author>
<name>Sven Peter</name>
<email>sven@svenpeter.dev</email>
</author>
<published>2022-04-11T15:53:00Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=ab7aa2866d295438dc60522f85c5421c6b4f1507'/>
<id>urn:sha1:ab7aa2866d295438dc60522f85c5421c6b4f1507</id>
<content type='text'>
If the PHY controller node has a "port" dwc3 tries to find an
extcon device even when "usb-role-switch" is present. This happens
because dwc3_get_extcon() sees that "port" node and then calls
extcon_find_edev_by_node() which will always return EPROBE_DEFER
in that case.

On the other hand, even if an extcon was present and dwc3_get_extcon()
was successful it would still be ignored in favor of "usb-role-switch".

Let's just first check if "usb-role-switch" is configured in the device
tree and directly use it instead and only try to look for an extcon
device otherwise.

Fixes: 8a0a13799744 ("usb: dwc3: Registering a role switch in the DRD code.")
Cc: stable &lt;stable@kernel.org&gt;
Signed-off-by: Sven Peter &lt;sven@svenpeter.dev&gt;
Link: https://lore.kernel.org/r/20220411155300.9766-1-sven@svenpeter.dev
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usb: dwc3: drd: Don't check against CONFIG_OF</title>
<updated>2022-02-17T15:12:21Z</updated>
<author>
<name>Thinh Nguyen</name>
<email>Thinh.Nguyen@synopsys.com</email>
</author>
<published>2022-02-15T22:49:48Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=e51879d85a4d58d3a6227bf2e88b770901b34ecb'/>
<id>urn:sha1:e51879d85a4d58d3a6227bf2e88b770901b34ecb</id>
<content type='text'>
The CONFIG_OF maybe set, but it may not be applicable to a device. In
such case, checking against that can cause the device fail to
initialize. Check against the device node (device-&gt;of_node) instead.

Fixes: a102f07e4edf ("usb: dwc3: drd: Add support for usb-conn-gpio based usb-role-switch")
Tested-by: Alexander Stein &lt;alexander.stein@ew.tq-group.com&gt;
Signed-off-by: Thinh Nguyen &lt;Thinh.Nguyen@synopsys.com&gt;
Link: https://lore.kernel.org/r/9f15580ad5810b1e5f31c241b35ebedfbfc30a3f.1644964864.git.Thinh.Nguyen@synopsys.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usb: dwc3: drd: Add support for usb-conn-gpio based usb-role-switch</title>
<updated>2022-01-26T12:58:59Z</updated>
<author>
<name>Alexander Stein</name>
<email>alexander.stein@ew.tq-group.com</email>
</author>
<published>2022-01-05T07:14:07Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=a102f07e4edf0f1cf06bf9825ab10e26a29dd945'/>
<id>urn:sha1:a102f07e4edf0f1cf06bf9825ab10e26a29dd945</id>
<content type='text'>
usb-conn-gpio devices are a subnode of the USB interface controller, which
needs to be populated.
This allows having a non-type-c connector providing dual-role.

Signed-off-by: Alexander Stein &lt;alexander.stein@ew.tq-group.com&gt;
Link: https://lore.kernel.org/r/20220105071407.2240302-1-alexander.stein@ew.tq-group.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usb: dwc3: drd: use helper to get role-switch-default-mode</title>
<updated>2021-07-27T13:58:37Z</updated>
<author>
<name>Chunfeng Yun</name>
<email>chunfeng.yun@mediatek.com</email>
</author>
<published>2021-07-15T09:07:51Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=26f94fe8e739641e96c50f70eb6e78ef1693d9ca'/>
<id>urn:sha1:26f94fe8e739641e96c50f70eb6e78ef1693d9ca</id>
<content type='text'>
Use the new helper usb_get_role_switch_default_mode() to
get property of "role-switch-default-mode"

Signed-off-by: Chunfeng Yun &lt;chunfeng.yun@mediatek.com&gt;
Link: https://lore.kernel.org/r/1626340078-29111-7-git-send-email-chunfeng.yun@mediatek.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usb: dwc3: remove repeated setting of current_dr_role</title>
<updated>2021-05-10T09:16:11Z</updated>
<author>
<name>Chunfeng Yun</name>
<email>chunfeng.yun@mediatek.com</email>
</author>
<published>2021-05-06T07:26:08Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=374ac7448caa73d689b50fd3c4fb59e40f1ab0b1'/>
<id>urn:sha1:374ac7448caa73d689b50fd3c4fb59e40f1ab0b1</id>
<content type='text'>
dwc3_set_prtcap() already sets current_dr_role as
DWC3_GCTL_PRTCAP_OTG, so remove the repeated one.

Acked-by: Felipe Balbi &lt;balbi@kernel.org&gt;
Signed-off-by: Chunfeng Yun &lt;chunfeng.yun@mediatek.com&gt;
Link: https://lore.kernel.org/r/20210506072608.32320-1-chunfeng.yun@mediatek.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
</feed>
