Re: [PATCH v3 3/6] iio: adis: Add adis_update_bits() APIs

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

 



On Tue, Mar 31, 2020 at 2:49 PM Nuno Sá <nuno.sa@xxxxxxxxxx> wrote:
>
> This patch adds a `regmap_update_bits()` like API to the ADIS library.
> It provides locked and unlocked variant.

> +       __val &= ~mask;
> +       __val |= val & mask;

You can use standard one liner, i.e.

       __val = (__val & ~mask) | (val & mask);

-- 
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