Re: [RFT PATCH 6/7] gpio: exar: switch to using regmap
From: Andy Shevchenko
Date: Mon Oct 26 2020 - 10:59:03 EST
On Mon, Oct 26, 2020 at 4:23 PM Bartosz Golaszewski <brgl@xxxxxxxx> wrote:
>
> From: Bartosz Golaszewski <bgolaszewski@xxxxxxxxxxxx>
>
> 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