Re: [PATCH v3 net-next 3/8] mfd: Add Microchip ZL3073x support

Andrew Lunn
2025-04-18T20:18:39Z

> > > Anyway, look around. How many other MFD, well actually, any sort of
> > > driver at all, have a bunch of low level helpers as inline functions
> > > in a header? You are aiming to write a plain boring driver which looks
> > > like every other driver in Linux....
> >
> > Well, I took inline functions approach as this is safer than macro usage
> > and each register have own very simple implementation with type and
> > range control (in case of indexed registers).

Sorry, i was a bit ambiguous. Why inline? Why not just plain
functions. Are there lots of other drivers with a large number of
inline functions? No. inline functions are typically only used for
stubs when code is not being built due to CONFIG_ settings.

Andrew