On Sun, Jun 26, 2022 at 2:20 PM Jonathan Cameron <jic23@xxxxxxxxxx> wrote: > > From: Jonathan Cameron <Jonathan.Cameron@xxxxxxxxxx> > > Instead of encoding several different fields into chan->address use > an indirection to a separate per channel structure where the various > fields can be expressed in a more readable form. This also allows > the register values to be constructed at runtime using FIELD_PREP() FIELD_PREP(). (Note period) > Drop the now redundant _SHIFT macros. ... > /* CAPDAC Register Bit Designations (AD7746_REG_CAPDACx) */ > #define AD7746_CAPDAC_DACEN BIT(7) > -#define AD7746_CAPDAC_DACP(x) ((x) & 0x7F) > +#define AD7746_CAPDAC_DACP_MASK 0x7F GENMASK() ? -- With Best Regards, Andy Shevchenko