Re: [PATCH v4 1/2] gpio: Add support for IDT 79RC3243x GPIO controller
From: Andy Shevchenko
Date: Wed Apr 28 2021 - 09:45:24 EST
On Wed, Apr 28, 2021 at 2:57 PM Michael Walle <michael@xxxxxxxx> wrote:
>
> Am 2021-04-28 13:07, schrieb Andy Shevchenko:
> > On Wed, Apr 28, 2021 at 1:51 AM Michael Walle <michael@xxxxxxxx> wrote:
> >> Am 2021-04-26 12:29, schrieb Andy Shevchenko:
> >> > On Mon, Apr 26, 2021 at 12:55 PM Thomas Bogendoerfer
> >> > <tsbogend@xxxxxxxxxxxxxxxx> wrote:
> >> >
> >> > 2) there is gpio-regmap generic code, that may be worth
> >> > considering.
> >>
> >> This driver uses memory mapped registers. While that is
> >> also possible with gpio-regmap, there is one drawback:
> >> it assumes gpiochip->can_sleep = true for now, see [1].
> >> Unfortunately, there is no easy way to ask the regmap
> >> if its mmio/fastio.
> >
> > I don't see how it is an impediment.
>
> You'd have to use the *_cansleep() variants with the gpios,
> which cannot be used everywhere, no?
*can* sleep means that it requires a sleeping context to run, if your
controller is fine with that, there are no worries. OTOH if you want
to run this in an atomic context, then consumers can't do with that
kind of controller. What I meant above (and you stripped it here) is
to add a patch that will fix that and set it based on
gpio_regmap_config.
--
With Best Regards,
Andy Shevchenko