On Fri, Aug 25, 2023 at 09:53:44PM +0100, Biju Das wrote: ... > +#define TMP51X_TEMP_CONFIG_GPM FIELD_PREP(GENMASK(1, 0), 0) > +#define TMP51X_TEMP_CONFIG_GP FIELD_PREP(TMP51X_TEMP_CONFIG_GPM_MASK, 0) > +#define TMP51X_TEMP_CONFIG_CONV_RATE FIELD_PREP(GENMASK(9, 7), 0x7) How is this different from (GENMASK(2, 0) << 7)? > +#define TMP51X_TEMP_CONFIG_RC FIELD_PREP(TMP51X_TEMP_CONFIG_RC_MASK, 1) > +#define TMP51X_TEMP_CHANNEL_MASK(n) FIELD_PREP(GENMASK(14, 11), GENMASK(n, 0) > 1) > +#define TMP51X_TEMP_CONFIG_CONT FIELD_PREP(TMP51X_TEMP_CONFIG_CONT_MASK, 1) Looking at these I believe the FIELD_PREP() is overkill. ... > +#define TMP51X_TEMP_CONFIG_DEFAULT(n) \ > + (TMP51X_TEMP_CONFIG_GPM | TMP51X_TEMP_CONFIG_GP | \ > + TMP51X_TEMP_CONFIG_CONV_RATE | TMP51X_TEMP_CONFIG_RC | \ > + TMP51X_TEMP_CHANNEL_MASK(n) | TMP51X_TEMP_CONFIG_CONT) Too many TABs -- With Best Regards, Andy Shevchenko