Re: [PATCH v6 4/6] reset: Instantiate reset GPIO controller for shared reset-gpios

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



On Wed, Jan 31, 2024 at 02:17:54PM +0100, Linus Walleij wrote:
> On Wed, Jan 31, 2024 at 10:37 AM Bartosz Golaszewski <brgl@xxxxxxxx> wrote:

> > This is a different problem: it supports many users enabling the same
> > GPIO (in Krzysztof's patch it's one but could be more if needed) but -
> > unlike the broken NONEXCLUSIVE GPIOs in GPIOLIB - it counts the number
> > of users and doesn't disable the GPIO for as long as there's at least
> > one.

> I don't know if the NONEXCLUSIVE stuff is broken, if you mean reference
> counting isn't working on them, then that is by design because they were
> invented for regulators and such use cases that do their own reference
> counting. It's also used for hacks where people need to look up a desc in
> a second spot, (perhaps we can fix those better).

Their own reference counting or whatever other coordination they want -
the deal is that users are responsible for their own coordination
whatever that might be.

> The NONEXCLUSIVE stuff was prompted by converting regulators to
> gpio descriptors, so it was for the greater good one can say. Or the
> lesser evil :( my judgement can be questioned here.

Right, previously we were working out if a GPIO was shared by looking at
the GPIO number but with descriptors we need to get the GPIO before we
can do anything with it, including figure out if it's shared.

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Pulseaudio]     [Linux Audio Users]     [ALSA Devel]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]

  Powered by Linux