Messages in this thread | | | From | Andy Shevchenko <> | Date | Mon, 26 Oct 2020 16:59:50 +0200 | Subject | Re: [RFT PATCH 6/7] gpio: exar: switch to using regmap |
| |
On Mon, Oct 26, 2020 at 4:23 PM Bartosz Golaszewski <brgl@bgdev.pl> wrote: > > From: Bartosz Golaszewski <bgolaszewski@baylibre.com> > > We can simplify the code in gpio-exar by using regmap. This allows us to > drop the mutex (regmap provides its own locking) and we can also reuse > regmap's bit operations instead of implementing our own update function.
...
> + if (value) > + regmap_set_bits(exar_gpio->regs, addr, BIT(bit)); > + else > + regmap_clear_bits(exar_gpio->regs, addr, BIT(bit));
A side note: perhaps + regmap_assign_bits() ?
-- With Best Regards, Andy Shevchenko
| |