[PATCH v3 2/4] net: phy: air_en8811h: use standard rx-polarity/tx-polarity properties
Lucien.Jheng
lucienzx159 at gmail.com
Fri Apr 24 18:48:30 CEST 2026
Simon Glass 於 2026/4/11 下午 10:37 寫道:
> 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.
I will use phy_string_for_interface() in the next patch.
Thanks
>
> Regards,
> Simon
More information about the U-Boot
mailing list