Re: [PATCH net-next v2 2/5] net: phy: mediatek: Add token ring access helper functions in mtk-phy-lib

From: Andrew Lunn
Date: Sun Feb 16 2025 - 11:48:09 EST


On Thu, Feb 13, 2025 at 04:05:50PM +0800, Sky Huang wrote:
> From: Sky Huang <skylake.huang@xxxxxxxxxxxx>
>
> This patch adds TR(token ring) manipulations and adds correct
> macro names for those magic numbers. TR is a way to access
> proprietary registers on page 52b5. Use these helper functions
> so we can see which fields we're going to modify/set/clear.
>
> TR functions with __* prefix mean that the operations inside
> aren't wrapped by page select/restore functions.
>
> This patch doesn't really change registers' settings but just
> enhances readability and maintainability.
>
> Signed-off-by: Sky Huang <skylake.huang@xxxxxxxxxxxx>

This is better, a bit smaller, but still pretty big. If you have made
a typo, and broken it, it is going to take a while to find it, no help
from git bisect.

Reviewed-by: Andrew Lunn <andrew@xxxxxxx>

Andrew