lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 28 Apr 2021 16:48:23 +0200
From:   Michael Walle <michael@...le.cc>
To:     Andy Shevchenko <andy.shevchenko@...il.com>
Cc:     Thomas Bogendoerfer <tsbogend@...ha.franken.de>,
        Linus Walleij <linus.walleij@...aro.org>,
        Bartosz Golaszewski <bgolaszewski@...libre.com>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        "open list:GPIO SUBSYSTEM" <linux-gpio@...r.kernel.org>,
        Mark Brown <broonie@...nel.org>
Subject: Re: [PATCH v4 1/2] gpio: Add support for IDT 79RC3243x GPIO
 controller

[Adding Mark here, too]

Am 2021-04-28 16:32, schrieb Andy Shevchenko:
> On Wed, Apr 28, 2021 at 5:04 PM Michael Walle <michael@...le.cc> wrote:
>> Am 2021-04-28 15:44, schrieb Andy Shevchenko:
>> > On Wed, Apr 28, 2021 at 2:57 PM Michael Walle <michael@...le.cc> wrote:
>> >>
>> >> Am 2021-04-28 13:07, schrieb Andy Shevchenko:
>> >> > On Wed, Apr 28, 2021 at 1:51 AM Michael Walle <michael@...le.cc> wrote:
>> >> >> Am 2021-04-26 12:29, schrieb Andy Shevchenko:
>> >> >> > On Mon, Apr 26, 2021 at 12:55 PM Thomas Bogendoerfer
>> >> >> > <tsbogend@...ha.franken.de> 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.
>> 
>> Ok, then we are on the same track.
>> 
>> > 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.
>> 
>> Yes, but ideally, it would ask the regmap. Otherwise that
>> information is redundant and might mismatch, i.e. gpio_regmap_config
>> tell can_sleep=false but the regmap is an I2C type for example. Also
>> if a driver wants to support both regmap types, we are no step
>> further.
> 
> Yeah, I agree that is a band aid, but you are free to fix it actually
> on regmap level.
> I don't think it will require an enormous amount of work there.

I'd love to fix that, but Mark was against exposing that property
outside of regmap. So it it what it is for now ;) Maybe he'll change
his mind or someone has another idea.

-michael

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ