<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/usb/chipidea/core.c, branch linux-5.4.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.4.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.4.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2024-01-25T22:34:29Z</updated>
<entry>
<title>usb: chipidea: wait controller resume finished for wakeup irq</title>
<updated>2024-01-25T22:34:29Z</updated>
<author>
<name>Xu Yang</name>
</author>
<published>2023-12-28T11:07:52Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a05ebd577979bcf135a1e8aa0f9622f6fb3b34d0'/>
<id>urn:sha1:a05ebd577979bcf135a1e8aa0f9622f6fb3b34d0</id>
<content type='text'>
commit 128d849074d05545becf86e713715ce7676fc074 upstream.

After the chipidea driver introduce extcon for id and vbus, it's able
to wakeup from another irq source, in case the system with extcon ID
cable, wakeup from usb ID cable and device removal, the usb device
disconnect irq may come firstly before the extcon notifier while system
resume, so we will get 2 "wakeup" irq, one for usb device disconnect;
and one for extcon ID cable change(real wakeup event), current driver
treat them as 2 successive wakeup irq so can't handle it correctly, then
finally the usb irq can't be enabled. This patch adds a check to bypass
further usb events before controller resume finished to fix it.

Fixes: 1f874edcb731 ("usb: chipidea: add runtime power management support")
cc:  &lt;stable@vger.kernel.org&gt;
Acked-by: Peter Chen &lt;peter.chen@kernel.org&gt;
Signed-off-by: Xu Yang &lt;xu.yang_2@nxp.com&gt;
Signed-off-by: Li Jun &lt;jun.li@nxp.com&gt;
Link: https://lore.kernel.org/r/20231228110753.1755756-2-xu.yang_2@nxp.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usb: chipidea: fix missing goto in `ci_hdrc_probe`</title>
<updated>2023-05-17T09:35:49Z</updated>
<author>
<name>Yinhao Hu</name>
</author>
<published>2023-04-12T05:58:52Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=bd7a3e6416abe57ea763f6d6e5ea53e2b08109df'/>
<id>urn:sha1:bd7a3e6416abe57ea763f6d6e5ea53e2b08109df</id>
<content type='text'>
[ Upstream commit d6f712f53b79f5017cdcefafb7a5aea9ec52da5d ]

From the comment of ci_usb_phy_init, it returns an error code if
usb_phy_init has failed, and it should do some clean up, not just
return directly.

Fix this by goto the error handling.

Fixes: 74475ede784d ("usb: chipidea: move PHY operation to core")
Reviewed-by: Dongliang Mu &lt;dzm91@hust.edu.cn&gt;
Acked-by: Peter Chen &lt;peter.chen@kernel.org&gt;
Signed-off-by: Yinhao Hu &lt;dddddd@hust.edu.cn&gt;
Link: https://lore.kernel.org/r/20230412055852.971991-1-dddddd@hust.edu.cn
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>usb: chipidea: core: fix possible concurrent when switch role</title>
<updated>2023-04-05T09:16:41Z</updated>
<author>
<name>Xu Yang</name>
</author>
<published>2023-03-17T06:15:16Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=f558789a886c4796f95566229040e6297e274df9'/>
<id>urn:sha1:f558789a886c4796f95566229040e6297e274df9</id>
<content type='text'>
commit 451b15ed138ec15bffbebb58a00ebdd884c3e659 upstream.

The user may call role_store() when driver is handling
ci_handle_id_switch() which is triggerred by otg event or power lost
event. Unfortunately, the controller may go into chaos in this case.
Fix this by protecting it with mutex lock.

Fixes: a932a8041ff9 ("usb: chipidea: core: add sysfs group")
cc: &lt;stable@vger.kernel.org&gt;
Acked-by: Peter Chen &lt;peter.chen@kernel.org&gt;
Signed-off-by: Xu Yang &lt;xu.yang_2@nxp.com&gt;
Link: https://lore.kernel.org/r/20230317061516.2451728-2-xu.yang_2@nxp.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usb: chipdea: core: fix return -EINVAL if request role is the same with current role</title>
<updated>2023-04-05T09:16:41Z</updated>
<author>
<name>Xu Yang</name>
</author>
<published>2023-03-17T06:15:15Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=6b3287b14739cdc448d5bfd476b9a5087bf92cfb'/>
<id>urn:sha1:6b3287b14739cdc448d5bfd476b9a5087bf92cfb</id>
<content type='text'>
commit 3670de80678961eda7fa2220883fc77c16868951 upstream.

It should not return -EINVAL if the request role is the same with current
role, return non-error and without do anything instead.

Fixes: a932a8041ff9 ("usb: chipidea: core: add sysfs group")
cc: &lt;stable@vger.kernel.org&gt;
Acked-by: Peter Chen &lt;peter.chen@kernel.org&gt;
Signed-off-by: Xu Yang &lt;xu.yang_2@nxp.com&gt;
Link: https://lore.kernel.org/r/20230317061516.2451728-1-xu.yang_2@nxp.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>USB: chipidea: fix interrupt deadlock</title>
<updated>2021-11-17T08:48:27Z</updated>
<author>
<name>Johan Hovold</name>
</author>
<published>2021-10-21T08:34:47Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=1bee9e59c67b64716fc826961ae7c61137598e87'/>
<id>urn:sha1:1bee9e59c67b64716fc826961ae7c61137598e87</id>
<content type='text'>
commit 9aaa81c3366e8393a62374e3a1c67c69edc07b8a upstream.

Chipidea core was calling the interrupt handler from non-IRQ context
with interrupts enabled, something which can lead to a deadlock if
there's an actual interrupt trying to take a lock that's already held
(e.g. the controller lock in udc_irq()).

Add a wrapper that can be used to fake interrupts instead of calling the
handler directly.

Fixes: 3ecb3e09b042 ("usb: chipidea: Use extcon framework for VBUS and ID detect")
Fixes: 876d4e1e8298 ("usb: chipidea: core: add wakeup support for extcon")
Cc: Peter Chen &lt;peter.chen@kernel.org&gt;
Cc: stable@vger.kernel.org      # 4.4
Signed-off-by: Johan Hovold &lt;johan@kernel.org&gt;
Link: https://lore.kernel.org/r/20211021083447.20078-1-johan@kernel.org
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usb: chipidea: core: add wakeup support for extcon</title>
<updated>2020-07-22T07:33:10Z</updated>
<author>
<name>Peter Chen</name>
</author>
<published>2020-07-07T06:06:01Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=01512075a387fbad5423ce8f866ee7c51eb0a9a3'/>
<id>urn:sha1:01512075a387fbad5423ce8f866ee7c51eb0a9a3</id>
<content type='text'>
commit 876d4e1e8298ad1f94d9e9392fc90486755437b4 upstream.

If wakeup event occurred by extcon event, it needs to call
ci_irq again since the first ci_irq calling at extcon notifier
only wakes up controller, but do noop for event handling,
it causes the extcon use case can't work well from low power mode.

Cc: &lt;stable@vger.kernel.org&gt;
Fixes: 3ecb3e09b042 ("usb: chipidea: Use extcon framework for VBUS and ID detect")
Reported-by: Philippe Schenker &lt;philippe.schenker@toradex.com&gt;
Tested-by: Philippe Schenker &lt;philippe.schenker@toradex.com&gt;
Signed-off-by: Peter Chen &lt;peter.chen@nxp.com&gt;
Link: https://lore.kernel.org/r/20200707060601.31907-2-peter.chen@kernel.org
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>usb: chipidea: add role switch class support</title>
<updated>2019-08-28T02:39:53Z</updated>
<author>
<name>Li Jun</name>
</author>
<published>2019-08-26T10:25:12Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=05559f10ed797b79f7fa47313682c48919a2b111'/>
<id>urn:sha1:05559f10ed797b79f7fa47313682c48919a2b111</id>
<content type='text'>
USB role is fully controlled by usb role switch consumer(e.g. typec),
usb port can be at host mode(USB_ROLE_HOST), device mode connected to
host(USB_ROLE_DEVICE), or not connecting any partner(USB_ROLE_NONE).

Signed-off-by: Li Jun &lt;jun.li@nxp.com&gt;
Signed-off-by: Peter Chen &lt;peter.chen@nxp.com&gt;
</content>
</entry>
<entry>
<title>USB: chipidea: convert platform driver to use dev_groups</title>
<updated>2019-08-09T05:55:44Z</updated>
<author>
<name>Greg Kroah-Hartman</name>
</author>
<published>2019-08-05T19:36:31Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=524f3ac1542c294a9337e4b82c6a22a9e7362290'/>
<id>urn:sha1:524f3ac1542c294a9337e4b82c6a22a9e7362290</id>
<content type='text'>
Platform drivers now have the option to have the platform core create
and remove any needed sysfs attribute files.  So take advantage of that
and do not register "by hand" any sysfs files.

Cc: Peter Chen &lt;Peter.Chen@nxp.com&gt;
Link: https://lore.kernel.org/r/20190805193636.25560-1-gregkh@linuxfoundation.org
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usb: Remove dev_err() usage after platform_get_irq()</title>
<updated>2019-07-30T18:29:18Z</updated>
<author>
<name>Stephen Boyd</name>
</author>
<published>2019-07-30T18:15:46Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=b33f37064b743d4c5771d3bfc65976790b7396cc'/>
<id>urn:sha1:b33f37064b743d4c5771d3bfc65976790b7396cc</id>
<content type='text'>
We don't need dev_err() messages when platform_get_irq() fails now that
platform_get_irq() prints an error message itself when something goes
wrong. Let's remove these prints with a simple semantic patch.

// &lt;smpl&gt;
@@
expression ret;
struct platform_device *E;
@@

ret =
(
platform_get_irq(E, ...)
|
platform_get_irq_byname(E, ...)
);

if ( \( ret &lt; 0 \| ret &lt;= 0 \) )
{
(
-if (ret != -EPROBE_DEFER)
-{ ...
-dev_err(...);
-... }
|
...
-dev_err(...);
)
...
}
// &lt;/smpl&gt;

While we're here, remove braces on if statements that only have one
statement (manually).

Signed-off-by: Stephen Boyd &lt;swboyd@chromium.org&gt;
Link: https://lore.kernel.org/r/20190730181557.90391-47-swboyd@chromium.org
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usb: chipidea: Use dev_err() instead of pr_err()</title>
<updated>2019-06-14T09:40:12Z</updated>
<author>
<name>Fabio Estevam</name>
</author>
<published>2019-06-05T16:08:49Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=b8a4f526fabafa2b701644c0a8a6220f39c3cbf1'/>
<id>urn:sha1:b8a4f526fabafa2b701644c0a8a6220f39c3cbf1</id>
<content type='text'>
dev_err() is more appropriate for printing error messages inside
drivers, so switch to dev_err().

While at it also add the missing newlines.

Signed-off-by: Fabio Estevam &lt;festevam@gmail.com&gt;
Signed-off-by: Peter Chen &lt;peter.chen@nxp.com&gt;
</content>
</entry>
</feed>
