[PATCH 1/2] phy: Extend generic_setup_phy() with PHY mode and submode
Marek Vasut
marek.vasut at mailbox.org
Mon Jun 17 19:38:38 CEST 2024
On 6/16/24 10:49 PM, Jonas Karlman wrote:
Hi,
>> diff --git a/drivers/phy/phy-uclass.c b/drivers/phy/phy-uclass.c
>> index acdcda15b5b..bbaf95112c5 100644
>> --- a/drivers/phy/phy-uclass.c
>> +++ b/drivers/phy/phy-uclass.c
>> @@ -508,7 +508,8 @@ int generic_phy_power_off_bulk(struct phy_bulk *bulk)
>> return ret;
>> }
>>
>> -int generic_setup_phy(struct udevice *dev, struct phy *phy, int index)
>> +int generic_setup_phy(struct udevice *dev, struct phy *phy, int index,
>> + enum phy_mode mode, int submode)
>> {
>> int ret;
>>
>> @@ -520,6 +521,10 @@ int generic_setup_phy(struct udevice *dev, struct phy *phy, int index)
>> if (ret)
>> return ret;
>>
>> + ret = generic_phy_set_mode(phy, mode, submode);
>> + if (ret)
>> + generic_phy_exit(phy);
>
> This should probably also return ret and not continue with power_on.
>
> If possible please also add a test case for this scenario.
Fixed both in V2, thanks .
More information about the U-Boot
mailing list