[PATCH v3 2/4] net: phy: air_en8811h: use standard rx-polarity/tx-polarity properties
Simon Glass
sjg at chromium.org
Sat Apr 11 16:37:50 CEST 2026
Hi Lucien,
On 2026-04-05T14:49:40, Lucien.Jheng <lucienzx159 at gmail.com> wrote:
> net: phy: air_en8811h: use standard rx-polarity/tx-polarity properties
>
> Replace the proprietary airoha,pnswap-rx / airoha,pnswap-tx boolean
> device tree properties with the standard rx-polarity and tx-polarity
> properties defined in phy-common-props.yaml.
>
> Backward compatibility is maintained by reading the legacy boolean
> properties first and passing them as the default_pol argument to
> phy_get_rx/tx_polarity(). If the standard properties are absent the
> legacy values are used transparently, so existing device trees remain
> functional without modification.
>
> Link: https://git.kernel.org/linus/66d8a334b57e64e43810623b3d88f0ce9745270b
> Signed-off-by: Lucien.Jheng <lucienzx159 at gmail.com>
>
> drivers/net/phy/airoha/Kconfig | 1 +
> drivers/net/phy/airoha/air_en8811.c | 58 ++++++++++++++++++++++++++++---------
> 2 files changed, 45 insertions(+), 14 deletions(-)
> diff --git a/drivers/net/phy/airoha/air_en8811.c b/drivers/net/phy/airoha/air_en8811.c
> @@ -1046,6 +1047,47 @@ static int air_leds_init(...)
> + ret = phy_get_rx_polarity(node,
> + phy_interface_strings[phydev->interface],
Should you use phy_string_for_interface() here instead of directly indexing?
> diff --git a/drivers/net/phy/airoha/air_en8811.c b/drivers/net/phy/airoha/air_en8811.c
> @@ -1046,6 +1047,47 @@ static int air_leds_init(...)
> + ret = phy_get_tx_polarity(node,
> + phy_interface_strings[phydev->interface],
Same here.
Regards,
Simon
More information about the U-Boot
mailing list