u-boot/arch/sandbox/dts
Jonas Karlman 14639bf14d phy: Set phy->dev to NULL when generic_phy_get_by_index_nodev() fails
Generic phy helpers typically use generic_phy_valid() to determine if
the helper should perform its function on a passed struct phy.
generic_phy_valid() treat any struct phy having phy->dev set as valid.

With generic_phy_get_by_index_nodev() setting phy->dev to a valid struct
udevice early, there can be situations where the struct phy is returned
as valid when initialization in fact failed and returned an error.

Fix this by setting phy->dev back to NULL when any of the calls to
of_xlate ops, device_get_supply_regulator or phy_alloc_counts fail. Also
extend the dm_test_phy_base test with a test where of_xlate ops fail.

Fixes: 72e5016f87 ("drivers: phy: add generic PHY framework")
Fixes: b9688df3cb ("drivers: phy: Set phy->dev to NULL when generic_phy_get_by_index() fails")
Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
2023-09-13 15:52:20 -04:00
..
include Makefile: Support include files for .dts files 2014-06-20 11:55:03 -06:00
cedit.dtsi expo: Support building an expo from a description file 2023-07-14 12:54:51 -04:00
cros-ec-keyboard.dtsi sandbox: avoid duplicate backslash input 2020-10-06 09:07:54 -06:00
Makefile Kbuild: Fix cleanup of *.dtbo for sandbox 2023-07-07 16:25:56 -04:00
other.dts sandbox: Support loading the other FDT 2022-09-29 16:09:56 -04:00
overlay0.dts sandbox: Add license headers to the dts files 2021-09-16 13:19:25 -04:00
overlay1.dts sandbox: Add license headers to the dts files 2021-09-16 13:19:25 -04:00
sandbox.dts sandbox: Use the generic VPL option to enable VPL 2023-03-02 17:45:58 -05:00
sandbox.dtsi expo: Move cedit theme under bootstd 2023-08-25 13:54:33 -04:00
sandbox64.dts sandbox64: add support for NVMXIP QSPI 2023-04-27 17:01:14 -04:00
sandbox_pmic.dtsi dm: sandbox: i2c: Use new emulator parent uclass 2018-11-29 09:30:05 -07:00
sandbox_vpl.dtsi sandbox: Expand size for VPL image 2023-03-02 17:45:58 -05:00
test.dts phy: Set phy->dev to NULL when generic_phy_get_by_index_nodev() fails 2023-09-13 15:52:20 -04:00