[U-Boot, v2, 1/1]net: phy: add paged PHY register accessors
Lucien.Jheng
lucienzx159 at gmail.com
Sun Nov 2 16:34:57 CET 2025
Hi Marek
Marek Vasut 於 2025/11/2 下午 09:59 寫道:
> On 10/6/25 2:49 PM, Lucien.Jheng wrote:
>> Synchronize paged PHY helpers with Linux v6.17.
>>
>> Add support for PHY devices that use paged register access by
>> implementing the following functions:
>> - phy_save_page(): Save current page number
>> - phy_select_page(): Switch to a specific page and return previous page
>> - phy_restore_page(): Restore previously saved page
>>
>> Also adds read_page and write_page callbacks to the phy_driver
>> structure to enable driver-specific page handling.
>>
>> These helpers allow safe access to paged PHY registers by ensuring
>> proper page selection and restoration,
>> even in error conditions, which will be used by the Airoha PHY driver.
> Are there any users ? If not, this is dead code.
I have checked the latest Linux kernel, and these functions are
currently used by several vendors, including *MediaTek, Airoha, Marvell,
and Realtek PHY*.
Therefore, I believe these APIs are not dead code.
Thank you.
More information about the U-Boot
mailing list