Re: [PATCH net-next v2 2/2] net: phy: micrel: lan8814 cable improvement errata

From: Jakub Kicinski
Date: Sat Mar 02 2024 - 22:40:52 EST


On Fri, 1 Mar 2024 08:27:57 +0100 Horatiu Vultur - M31836 wrote:
> > > +#define LAN8814_PD_CONTROLS 0x9d
> > > +#define LAN8814_PD_CONTROLS_PD_MEAS_TIME_MASK_ GENMASK(3, 0)
> > > +#define LAN8814_PD_CONTROLS_PD_MEAS_TIME_VAL_ 0xb
> >
> > nitpick: TIME_VAL macro is very generic if it can end with specific
> > like TIME_VAL_100M or something similar will gives more readability.
>
> Actually I prefer to keep it like this the name if it is possible..
> Because the VAL_ represents the value and MASK_ represents the mask
> value. Therefore the actual bits name of the register is
> LAN8814_PD_CONTROLS_PD_MEAS_TIME.
>
> I am trying to have a naming convetion about how to define names in this
> file:
> <TARGET>_<REG_NAME>_<REG_BITS_NAME>

Why the trailing underscores, tho?