<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/usb/fotg210, branch linux-6.2.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-6.2.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-6.2.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2023-03-11T12:50:42Z</updated>
<entry>
<title>USB: fotg210: fix memory leak with using debugfs_lookup()</title>
<updated>2023-03-11T12:50:42Z</updated>
<author>
<name>Greg Kroah-Hartman</name>
</author>
<published>2023-02-02T15:32:27Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=55c2ffc534928f4732199617e3b746d79a57898f'/>
<id>urn:sha1:55c2ffc534928f4732199617e3b746d79a57898f</id>
<content type='text'>
[ Upstream commit 6b4040f452037a7e95472577891d57c6b18c89c5 ]

When calling debugfs_lookup() the result must have dput() called on it,
otherwise the memory will leak over time.  To make things simpler, just
call debugfs_lookup_and_remove() instead which handles all of the logic
at once.

Reviewed-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Link: https://lore.kernel.org/r/20230202153235.2412790-5-gregkh@linuxfoundation.org
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: fotg210: List different variants</title>
<updated>2023-03-11T12:50:39Z</updated>
<author>
<name>Linus Walleij</name>
</author>
<published>2023-01-18T07:09:16Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=381c672990aee1b0728a258e7fb3df2caff30bbf'/>
<id>urn:sha1:381c672990aee1b0728a258e7fb3df2caff30bbf</id>
<content type='text'>
[ Upstream commit 170da81aab077c9e85fc2b786413ca07942774a0 ]

There are at least two variants of the FOTG: FOTG200 and
FOTG210. Handle them in this driver and let's add
more quirks as we go along.

Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Link: https://lore.kernel.org/r/20230103-gemini-fotg210-usb-v2-2-100388af9810@linaro.org
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>fotg210-udc: Add missing completion handler</title>
<updated>2023-03-10T08:28:52Z</updated>
<author>
<name>Fabian Vogt</name>
</author>
<published>2023-01-23T07:35:06Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=5217979df0ffd5617e5c57f1f405f74b62977b4f'/>
<id>urn:sha1:5217979df0ffd5617e5c57f1f405f74b62977b4f</id>
<content type='text'>
[ Upstream commit e55f67391fa986f7357edba0ca59e668d99c3a5f ]

This is used when responding to GET_STATUS requests. Without this, it
crashes on completion.

Fixes: b84a8dee23fd ("usb: gadget: add Faraday fotg210_udc driver")
Signed-off-by: Fabian Vogt &lt;fabian@ritter-vogt.de&gt;
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Link: https://lore.kernel.org/r/20230123073508.2350402-2-linus.walleij@linaro.org
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: gadget: udc: do not clear gadget driver.bus</title>
<updated>2023-02-02T08:41:17Z</updated>
<author>
<name>Aaro Koskinen</name>
</author>
<published>2023-02-01T22:01:25Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=30d09b3131f5b1b9d54ad9b7ee171a45e21362b3'/>
<id>urn:sha1:30d09b3131f5b1b9d54ad9b7ee171a45e21362b3</id>
<content type='text'>
Before the commit fc274c1e9973 ("USB: gadget: Add a new bus for gadgets")
gadget driver.bus was unused. For whatever reason, many UDC drivers set
this field explicitly to NULL in udc_start(). With the newly added gadget
bus, doing this will crash the driver during the attach.

The problem was first reported, fixed and tested with OMAP UDC and g_ether.
Other drivers are changed based on code analysis only.

Fixes: fc274c1e9973 ("USB: gadget: Add a new bus for gadgets")
Cc: stable &lt;stable@kernel.org&gt;
Signed-off-by: Aaro Koskinen &lt;aaro.koskinen@iki.fi&gt;
Acked-by: Alan Stern &lt;stern@rowland.harvard.edu&gt;
Link: https://lore.kernel.org/r/20230201220125.GD2415@darkstar.musicnaut.iki.fi
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usb: fotg210-udc: fix error return code in fotg210_udc_probe()</title>
<updated>2023-01-06T08:12:31Z</updated>
<author>
<name>Yang Yingliang</name>
</author>
<published>2022-12-30T06:54:27Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=1a5a23b9bdf6bde0e5185ca834ff6e806cc2aaaf'/>
<id>urn:sha1:1a5a23b9bdf6bde0e5185ca834ff6e806cc2aaaf</id>
<content type='text'>
After commit  5f217ccd520f ("fotg210-udc: Support optional external PHY"),
the error code is re-assigned to 0 in fotg210_udc_probe(), if allocate or
map memory fails after the assignment, it can't return an error code. Set
the error code to -ENOMEM to fix this problem.

Fixes: 5f217ccd520f ("fotg210-udc: Support optional external PHY")
Signed-off-by: Yang Yingliang &lt;yangyingliang@huawei.com&gt;
Reviewed-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Link: https://lore.kernel.org/r/20221230065427.944586-1-yangyingliang@huawei.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usb: fotg210: fix OTG-only build</title>
<updated>2022-12-28T10:23:53Z</updated>
<author>
<name>Arnd Bergmann</name>
</author>
<published>2022-12-15T16:57:20Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=2de5bba5890f6604a997c75e754df8082386c9f7'/>
<id>urn:sha1:2de5bba5890f6604a997c75e754df8082386c9f7</id>
<content type='text'>
The fotg210 module combines the HCD and OTG drivers, which then
fails to build when only the USB gadget support is enabled
in the kernel but host support is not:

aarch64-linux-ld: drivers/usb/fotg210/fotg210-core.o: in function `fotg210_init':
fotg210-core.c:(.init.text+0xc): undefined reference to `usb_disabled'

Move the check for usb_disabled() after the check for the HCD module,
and let the OTG driver still be probed in this configuration.

A nicer approach might be to have the common portion built as a
library module, with the two platform other files registering
their own platform_driver instances separately.

Fixes: ddacd6ef44ca ("usb: fotg210: Fix Kconfig for USB host modules")
Reviewed-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Signed-off-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Link: https://lore.kernel.org/r/20221215165728.2062984-1-arnd@kernel.org
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usb: fotg210-udc: fix potential memory leak in fotg210_udc_probe()</title>
<updated>2022-12-08T15:45:58Z</updated>
<author>
<name>Yi Yang</name>
</author>
<published>2022-12-02T01:21:26Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=0cd142b4665ee3133cd80539b5a430be5fd326c6'/>
<id>urn:sha1:0cd142b4665ee3133cd80539b5a430be5fd326c6</id>
<content type='text'>
In fotg210_udc_probe(), if devm_clk_get() or clk_prepare_enable()
fails, 'fotg210' will not be freed, which will lead to a memory leak.
Fix it by moving kfree() to a proper location.

In addition，we can use "return -ENOMEM" instead of "goto err"
to simplify the code.

Fixes: 718a38d092ec ("fotg210-udc: Handle PCLK")
Reviewed-by: Andrzej Pietrasiewicz &lt;andrzej.p@collabora.com&gt;
Reviewed-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Signed-off-by: Yi Yang &lt;yiyang13@huawei.com&gt;
Link: https://lore.kernel.org/r/20221202012126.246953-1-yiyang13@huawei.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usb: fotg210-udc: Remove a useless assignment</title>
<updated>2022-11-22T16:26:23Z</updated>
<author>
<name>Christophe JAILLET</name>
</author>
<published>2022-11-14T20:38:04Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=202f785b1863d8feef53f6489afd9abcb744e7bf'/>
<id>urn:sha1:202f785b1863d8feef53f6489afd9abcb744e7bf</id>
<content type='text'>
There is no need to use an intermediate array for these memory allocations,
so, axe it.

While at it, turn a '== NULL' into a shorter '!' when testing memory
allocation failure.

Signed-off-by: Christophe JAILLET &lt;christophe.jaillet@wanadoo.fr&gt;
Reviewed-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Link: https://lore.kernel.org/r/deab9696fc4000499470e7ccbca7c36fca17bd4e.1668458274.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>fotg210-udc: Get IRQ using platform_get_irq()</title>
<updated>2022-11-22T16:25:23Z</updated>
<author>
<name>Linus Walleij</name>
</author>
<published>2022-11-14T11:52:01Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=f8b729ce97f66807f6b958e891888d0b1ed20a9e'/>
<id>urn:sha1:f8b729ce97f66807f6b958e891888d0b1ed20a9e</id>
<content type='text'>
The platform_get_irq() is necessary to use to get dynamic
IRQ resolution when instantiating the device from the
device tree. IRQs are not passed as resources in that
case.

Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Link: https://lore.kernel.org/r/20221114115201.302887-4-linus.walleij@linaro.org
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>fotg210-udc: Handle PCLK</title>
<updated>2022-11-22T16:25:23Z</updated>
<author>
<name>Linus Walleij</name>
</author>
<published>2022-11-14T11:52:00Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=718a38d092ec920dd84a5e25510cc6721f527c3e'/>
<id>urn:sha1:718a38d092ec920dd84a5e25510cc6721f527c3e</id>
<content type='text'>
This adds optional handling of the peripheral clock PCLK.

Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Link: https://lore.kernel.org/r/20221114115201.302887-3-linus.walleij@linaro.org
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
</feed>
