Re: [PATCH v4 2/2] net: phy: motorcomm: Add pad drive strength cfg support

From: Guo Samin
Date: Mon Jul 17 2023 - 04:40:13 EST




-------- 原始信息 --------
主题: Re: [PATCH v4 2/2] net: phy: motorcomm: Add pad drive strength cfg support
From: Andrew Lunn <andrew@xxxxxxx>
收件人: Samin Guo <samin.guo@xxxxxxxxxxxxxxxx>
日期: 2023/7/15

>> +static u32 yt8531_get_ds_map(struct phy_device *phydev, u32 cur)
>> +{
>> + u32 vol;
>> + int i;
>> +
>> + vol = yt8531_get_ldo_vol(phydev);
>> + for (i = 0; i < ARRAY_SIZE(yt8531_ldo_vol); i++) {
>> + if (yt8531_ldo_vol[i].vol == vol && yt8531_ldo_vol[i].cur == cur)
>> + return yt8531_ldo_vol[i].ds;
>> + }
>> +
>> + phydev_warn(phydev,
>> + "No matching current value was found %d, Use default value.\n", cur);
>> +
>> + return YT8531_RGMII_RX_DS_DEFAULT;
>
> If there is a value in DT and it is invalid, return -EINVAL and fail
> the probe. Only use the default if there is no value in DT.
>
> Andrew

Will be fixed in the next version.

Thanks for taking the time to review the code.

Best regards,
Samin