<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/phy/phy-core.c, branch v4.4.235</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v4.4.235</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v4.4.235'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2018-01-23T18:50:16+00:00</updated>
<entry>
<title>phy: work around 'phys' references to usb-nop-xceiv devices</title>
<updated>2018-01-23T18:50:16+00:00</updated>
<author>
<name>Arnd Bergmann</name>
<email>arnd@arndb.de</email>
</author>
<published>2018-01-12T10:12:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=d5276c0137137dfa89402c52eceeb406f4950404'/>
<id>urn:sha1:d5276c0137137dfa89402c52eceeb406f4950404</id>
<content type='text'>
commit b7563e2796f8b23c98afcfea7363194227fa089d upstream.

Stefan Wahren reports a problem with a warning fix that was merged
for v4.15: we had lots of device nodes with a 'phys' property pointing
to a device node that is not compliant with the binding documented in
Documentation/devicetree/bindings/phy/phy-bindings.txt

This generally works because USB HCD drivers that support both the generic
phy subsystem and the older usb-phy subsystem ignore most errors from
phy_get() and related calls and then use the usb-phy driver instead.

However, it turns out that making the usb-nop-xceiv device compatible with
the generic-phy binding changes the phy_get() return code from -EINVAL to
-EPROBE_DEFER, and the dwc2 usb controller driver for bcm2835 now returns
-EPROBE_DEFER from its probe function rather than ignoring the failure,
breaking all USB support on raspberry-pi when CONFIG_GENERIC_PHY is
enabled. The same code is used in the dwc3 driver and the usb_add_hcd()
function, so a reasonable assumption would be that many other platforms
are affected as well.

I have reviewed all the related patches and concluded that "usb-nop-xceiv"
is the only USB phy that is affected by the change, and since it is by far
the most commonly referenced phy, all the other USB phy drivers appear
to be used in ways that are are either safe in DT (they don't use the
'phys' property), or in the driver (they already ignore -EPROBE_DEFER
from generic-phy when usb-phy is available).

To work around the problem, this adds a special case to _of_phy_get()
so we ignore any PHY node that is compatible with "usb-nop-xceiv",
as we know that this can never load no matter how much we defer. In the
future, we might implement a generic-phy driver for "usb-nop-xceiv"
and then remove this workaround.

Since we generally want older kernels to also want to work with the
fixed devicetree files, it would be good to backport the patch into
stable kernels as well (3.13+ are possibly affected), even though they
don't contain any of the patches that may have caused regressions.

Fixes: 014d6da6cb25 ARM: dts: bcm283x: Fix DTC warnings about missing phy-cells
Fixes: c5bbf358b790 arm: dts: nspire: Add missing #phy-cells to usb-nop-xceiv
Fixes: 44e5dced2ef6 arm: dts: marvell: Add missing #phy-cells to usb-nop-xceiv
Fixes: f568f6f554b8 ARM: dts: omap: Add missing #phy-cells to usb-nop-xceiv
Fixes: d745d5f277bf ARM: dts: imx51-zii-rdu1: Add missing #phy-cells to usb-nop-xceiv
Fixes: 915fbe59cbf2 ARM: dts: imx: Add missing #phy-cells to usb-nop-xceiv
Link: https://marc.info/?l=linux-usb&amp;m=151518314314753&amp;w=2
Link: https://patchwork.kernel.org/patch/10158145/
Cc: Felipe Balbi &lt;balbi@kernel.org&gt;
Cc: Eric Anholt &lt;eric@anholt.net&gt;
Tested-by: Stefan Wahren &lt;stefan.wahren@i2se.com&gt;
Acked-by: Rob Herring &lt;robh@kernel.org&gt;
Tested-by: Hans Verkuil &lt;hans.verkuil@cisco.com&gt;
Acked-by: Kishon Vijay Abraham I &lt;kishon@ti.com&gt;
Signed-off-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>phy: core: fix wrong err handle for phy_power_on</title>
<updated>2016-03-03T23:07:28+00:00</updated>
<author>
<name>Shawn Lin</name>
<email>shawn.lin@rock-chips.com</email>
</author>
<published>2016-01-28T08:14:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=be683dfd4c253e11a8e9d9263f5dd0fed8c21de3'/>
<id>urn:sha1:be683dfd4c253e11a8e9d9263f5dd0fed8c21de3</id>
<content type='text'>
commit b82fcabe212a11698fd4b3e604d2f81d929d22f6 upstream.

If phy_pm_runtime_get_sync failed but we already
enable regulator, current code return directly without
doing regulator_disable. This patch fix this problem
and cleanup err handle of phy_power_on to be more readable.

Fixes: 3be88125d85d ("phy: core: Support regulator ...")
Cc: Roger Quadros &lt;rogerq@ti.com&gt;
Cc: Axel Lin &lt;axel.lin@ingics.com&gt;
Signed-off-by: Shawn Lin &lt;shawn.lin@rock-chips.com&gt;
Signed-off-by: Kishon Vijay Abraham I &lt;kishon@ti.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>phy: core: Get a refcount to phy in devm_of_phy_get_by_index()</title>
<updated>2015-12-07T13:14:02+00:00</updated>
<author>
<name>Chunfeng Yun</name>
<email>chunfeng.yun@mediatek.com</email>
</author>
<published>2015-12-04T02:06:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=708744628ba96ed4dfcac74a985eb66ad551f164'/>
<id>urn:sha1:708744628ba96ed4dfcac74a985eb66ad551f164</id>
<content type='text'>
On driver detach, devm_phy_release() will put a refcount to
the phy, so gets a refconut to it before return.

Signed-off-by: Chunfeng Yun &lt;chunfeng.yun@mediatek.com&gt;
Signed-off-by: Kishon Vijay Abraham I &lt;kishon@ti.com&gt;
</content>
</entry>
<entry>
<title>Merge 4.1-rc7 into usb-next</title>
<updated>2015-06-08T17:57:51+00:00</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@linuxfoundation.org</email>
</author>
<published>2015-06-08T17:57:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=19915e623458004547c1c2490b09bb923fe69337'/>
<id>urn:sha1:19915e623458004547c1c2490b09bb923fe69337</id>
<content type='text'>
This resolves a merge issue in musb_core.c and we want the fixes that
were in Linus's tree in this branch as well for testing.

Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>phy: core: Check requested PHY status in _of_phy_get()</title>
<updated>2015-05-11T16:12:27+00:00</updated>
<author>
<name>Axel Lin</name>
<email>axel.lin@ingics.com</email>
</author>
<published>2015-04-07T04:23:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=33f434d283a27116fb358ae5bc3b42967c12f85a'/>
<id>urn:sha1:33f434d283a27116fb358ae5bc3b42967c12f85a</id>
<content type='text'>
This is a common checking in various drivers, so move the checking to
_of_phy_get().

Signed-off-by: Axel Lin &lt;axel.lin@ingics.com&gt;
Signed-off-by: Kishon Vijay Abraham I &lt;kishon@ti.com&gt;
</content>
</entry>
<entry>
<title>phy: phy-core: allow specifying supply at port level</title>
<updated>2015-05-11T16:12:25+00:00</updated>
<author>
<name>Dmitry Torokhov</name>
<email>dtor@chromium.org</email>
</author>
<published>2015-04-22T23:14:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=87006dd600e36e05a2bd978c112a0aa883713c00'/>
<id>urn:sha1:87006dd600e36e05a2bd978c112a0aa883713c00</id>
<content type='text'>
Multi-port phys may have per port power supplies. Let's change phy
core to look for supply at the port level when multiple ports are
specified. To keep compatibility with the existing device tree board
descriptions for single-port phys we will continue looking up the
power supply at the parent node level

Signed-off-by: Dmitry Torokhov &lt;dtor@chromium.org&gt;
Signed-off-by: Arun Ramamurthy &lt;arun.ramamurthy@broadcom.com&gt;
Reviewed-by: Ray Jui &lt;rjui@broadcom.com&gt;
Reviewed-by: Scott Branden &lt;sbranden@broadcom.com&gt;
Signed-off-by: Kishon Vijay Abraham I &lt;kishon@ti.com&gt;
</content>
</entry>
<entry>
<title>phy: core: Add devm_of_phy_get_by_index to phy-core</title>
<updated>2015-05-11T16:12:23+00:00</updated>
<author>
<name>Arun Ramamurthy</name>
<email>arun.ramamurthy@broadcom.com</email>
</author>
<published>2015-04-22T23:04:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=6be109b31ccdb9c98e7be12687171f6602527a5d'/>
<id>urn:sha1:6be109b31ccdb9c98e7be12687171f6602527a5d</id>
<content type='text'>
Some generic drivers, such as ehci, may use multiple phys and for such
drivers referencing phy(s) by name(s) does not make sense. Instead of
inventing new naming schemes and using custom code to iterate through them,
such drivers are better of using nameless phy bindings and using this newly
introduced API to iterate through them.

Signed-off-by: Arun Ramamurthy &lt;arun.ramamurthy@broadcom.com&gt;
Reviewed-by: Ray Jui &lt;rjui@broadcom.com&gt;
Reviewed-by: Scott Branden &lt;sbranden@broadcom.com&gt;
[kishon@ti.com: fix compilation errors]
Signed-off-by: Kishon Vijay Abraham I &lt;kishon@ti.com&gt;
</content>
</entry>
<entry>
<title>phy: core: Fix error checking in (devm_)phy_optional_get</title>
<updated>2015-05-11T14:48:51+00:00</updated>
<author>
<name>Axel Lin</name>
<email>axel.lin@ingics.com</email>
</author>
<published>2015-04-07T23:30:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=f83be4c3f69762e1fc736e375b04e5c22b3ddceb'/>
<id>urn:sha1:f83be4c3f69762e1fc736e375b04e5c22b3ddceb</id>
<content type='text'>
Don't pass valid pointer to PTR_ERR, use PTR_ERR(phy) only when
IS_ERR(phy) is true.

Signed-off-by: Axel Lin &lt;axel.lin@ingics.com&gt;
Signed-off-by: Kishon Vijay Abraham I &lt;kishon@ti.com&gt;
</content>
</entry>
<entry>
<title>phy: core: Fixup return value of phy_exit when !pm_runtime_enabled</title>
<updated>2015-03-13T11:44:38+00:00</updated>
<author>
<name>Axel Lin</name>
<email>axel.lin@ingics.com</email>
</author>
<published>2015-03-06T07:55:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=736b67a32062240592aad49033859f9712dd18ca'/>
<id>urn:sha1:736b67a32062240592aad49033859f9712dd18ca</id>
<content type='text'>
When phy_pm_runtime_get_sync() returns -ENOTSUPP, phy_exit() also returns
-ENOTSUPP if !phy-&gt;ops-&gt;exit. Fix it.
Also move the code to override ret close to the code we got ret.
I think it is less error prone this way.

Signed-off-by: Axel Lin &lt;axel.lin@ingics.com&gt;
Acked-by: Roger Quadros &lt;rogerq@ti.com&gt;
Signed-off-by: Kishon Vijay Abraham I &lt;kishon@ti.com&gt;
</content>
</entry>
<entry>
<title>phy: Find the right match in devm_phy_destroy()</title>
<updated>2015-03-13T11:43:52+00:00</updated>
<author>
<name>Thierry Reding</name>
<email>treding@nvidia.com</email>
</author>
<published>2015-02-25T15:16:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=2f1bce487cd0a02623cff3d877940f9a2026341c'/>
<id>urn:sha1:2f1bce487cd0a02623cff3d877940f9a2026341c</id>
<content type='text'>
devm_phy_create() stores the pointer to the new PHY at the address
returned by devres_alloc(). The res parameter passed to devm_phy_match()
is therefore the location where the pointer to the PHY is stored, hence
it needs to be dereferenced before comparing to the match data in order
to find the correct match.

Cc: &lt;stable@vger.kernel.org&gt; # v3.13+
Signed-off-by: Thierry Reding &lt;treding@nvidia.com&gt;
Signed-off-by: Kishon Vijay Abraham I &lt;kishon@ti.com&gt;
</content>
</entry>
</feed>
