[PATCH v2 0/3] phy: Fix generic_setup_phy return value on power on failure

Jonas Karlman jonas at kwiboo.se
Fri Sep 1 01:07:07 CEST 2023


This series fixes two issues related to the return value in case of
error from generic_setup_phy().

Patch 1 fixes that the error code from power_on gets returned.
Patch 2 fixes an regression so that success is returned instead of ENOENT.
Patch 3 refactor generic_{setup,shutdown}_phy() to improve readability.

Changes in v2:
- Split patch in two
- Restore old behavior for ENOENT
- Add unit tests

Jonas Karlman (3):
  phy: Fix generic_setup_phy() return value on power on failure
  phy: Return success from generic_setup_phy() when phy is not found
  phy: Refactor generic_{setup,shutdown}_phy() to reduce complexity

 drivers/phy/phy-uclass.c | 41 ++++++++++++++++------------------------
 test/dm/phy.c            | 29 ++++++++++++++++++++++++++++
 2 files changed, 45 insertions(+), 25 deletions(-)

-- 
2.42.0



More information about the U-Boot mailing list