Re: [PATCH v3 08/17] staging: iio: cdc: ad7746: Break up use of chan->address and use FIELD_PREP etc

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux