Re: [RFC net-next] net: phy: introduce phy_reg_field interface

From: Andrew Lunn
Date: Fri Mar 31 2023 - 08:53:10 EST


On Fri, Mar 31, 2023 at 03:32:59PM +0300, Radu Pirea (OSS) wrote:
> Some PHYs can be heavily modified between revisions, and the addresses of
> the registers are changed and the register fields are moved from one
> register to another.
>
> To integrate more PHYs in the same driver with the same register fields,
> but these register fields were located in different registers at
> different offsets, I introduced the phy_reg_fied structure.
>
> phy_reg_fied structure abstracts the register fields differences.

Hi Radu

You should always include a user of a new API. It makes it easier to
understand and review if you see both sides of an API.

Please turn this into a patchset, and make use of this new functions
in a driver.

Andrew