> From: Andy Shevchenko <andy.shevchenko@xxxxxxxxx> > Sent: Dienstag, 31. März 2020 19:42 > To: Sa, Nuno <Nuno.Sa@xxxxxxxxxx> > Cc: linux-iio <linux-iio@xxxxxxxxxxxxxxx>; devicetree > <devicetree@xxxxxxxxxxxxxxx>; Jonathan Cameron <jic23@xxxxxxxxxx>; > Hartmut Knaack <knaack.h@xxxxxx>; Lars-Peter Clausen <lars@xxxxxxxxxx>; > Peter Meerwald-Stadler <pmeerw@xxxxxxxxxx>; Rob Herring > <robh+dt@xxxxxxxxxx>; Mark Rutland <mark.rutland@xxxxxxx>; Ardelean, > Alexandru <alexandru.Ardelean@xxxxxxxxxx>; Hennerich, Michael > <Michael.Hennerich@xxxxxxxxxx> > Subject: Re: [PATCH v3 3/6] iio: adis: Add adis_update_bits() APIs > > [External] > > 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); Sure. Can do that... - Nuno Sá > -- > With Best Regards, > Andy Shevchenko