phy: adin: fix broken support for adi, phy-mode-override
authorNate Drude <nate.d@variscite.com>
Thu, 19 May 2022 09:31:56 +0000 (12:31 +0300)
committerStefano Babic <sbabic@denx.de>
Tue, 14 Jun 2022 19:25:26 +0000 (21:25 +0200)
commit4cc25cd5ce6923ccd0a6164703bcbde0216fd77d
tree26fda438ba460de1823f07c807845f813694b57a
parent827ded0e82e5a000cfb4e7bd2697a320c65d835a
phy: adin: fix broken support for adi, phy-mode-override

Currently, the adin driver fails to compile.

The original patch introducing the adin driver used the function
phy_get_interface_by_name to support the adi,phy-mode-override
property. Unfortunately, a few days before the adin patch
was accepted, another patch removed support for phy_get_interface_by_name:

https://github.com/u-boot/u-boot/commit/123ca114e07ecf28aa2538748d733e2b22d8b8b5

This patch refactors adin_get_phy_mode_override, implementing the logic in
the new function, ofnode_read_phy_mode, from the patch above.

Signed-off-by: Nate Drude <nate.d@variscite.com>
Tested-by: Josua Mayer <josua@solid-run.com>
Signed-off-by: Josua Mayer <josua@solid-run.com>
drivers/net/phy/adin.c