linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Bartosz Golaszewski <brgl@bgdev.pl>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: Mark Brown <broonie@kernel.org>,
	linux-gpio@vger.kernel.org,  linux-kernel@vger.kernel.org,
	 Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Subject: Re: [PATCH v2 0/4] gpio: deprecate and track the removal of GPIO workarounds for regulators
Date: Wed, 23 Apr 2025 14:20:30 +0200	[thread overview]
Message-ID: <CAMRc=Mc9fMrx0bek1mE2kpoxXVgD7GATaeQWZnL1eDW5oZ-FTQ@mail.gmail.com> (raw)
In-Reply-To: <CACRpkdaKBDyd44xPA_kBxR9HVFqfLgcSnd1UDHumyB=m5-B3xQ@mail.gmail.com>

On Tue, Apr 22, 2025 at 2:05 PM Linus Walleij <linus.walleij@linaro.org> wrote:
>
> On Thu, Apr 17, 2025 at 8:57 PM Bartosz Golaszewski <brgl@bgdev.pl> wrote:
> > On Tue, Apr 15, 2025 at 11:33 PM Linus Walleij <linus.walleij@linaro.org> wrote:
>
> > > There are precedents for this type of semantic IRQF_SHARED
> > > is used whenever two devices share the same IRQ line,
> > > and that is something the drivers have to specify, i.e. the
> > > driver has to be aware that it may be sharing the IRQ
> > > with other devices, and whenever it gets an IRQ it has
> > > to check "was it for me?" and in case it was, return
> > > IRQ_HANDLED else IRQ_NONE.
> > >
> >
> > First: this flag has existed (as SA_SHIRQ) since before git days and
> > could be considered legacy. But also: it's a bit of a different story
> > as sometimes you get an interrupt and need to read a specific register
> > to check from the status bits whether it concerns you. This never
> > happens with a GPIO so I don't think it's a good argument for this
> > specific case.
>
> But at the same time Mark describes that drivers using a shared
> GPIO cannot really be opaque as to the status changes on the
> GPIO line, as it may or may not need to update register contents
> depending on whether the line has actually been low or not while
> being disabled. Maybe this can be fixed by a per-consumer status
> flag in the descriptor such as bool was_toggled;
>

The few use-cases we have for that use regulator notifiers at the
moment and I think async is the way to go here.

Bart

  reply	other threads:[~2025-04-23 12:20 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-01 12:46 [PATCH v2 0/4] gpio: deprecate and track the removal of GPIO workarounds for regulators Bartosz Golaszewski
2025-04-01 12:46 ` [PATCH v2 1/4] gpio: deprecate the GPIOD_FLAGS_BIT_NONEXCLUSIVE flag Bartosz Golaszewski
2025-04-01 12:46 ` [PATCH v2 2/4] gpio: deprecate devm_gpiod_unhinge() Bartosz Golaszewski
2025-04-15  7:55   ` Linus Walleij
2025-04-01 12:46 ` [PATCH v2 3/4] MAINTAINERS: add more keywords for the GPIO subsystem entry Bartosz Golaszewski
2025-04-01 12:46 ` [PATCH v2 4/4] gpio: TODO: track the removal of regulator-related workarounds Bartosz Golaszewski
2025-04-01 13:27 ` [PATCH v2 0/4] gpio: deprecate and track the removal of GPIO workarounds for regulators Mark Brown
2025-04-01 14:42   ` Bartosz Golaszewski
2025-04-01 16:00     ` Mark Brown
2025-04-01 18:57       ` Bartosz Golaszewski
2025-04-01 21:55         ` Mark Brown
2025-04-02 10:05           ` Bartosz Golaszewski
2025-04-02 14:08             ` Mark Brown
2025-04-07 13:15               ` Bartosz Golaszewski
2025-04-07 13:24                 ` Mark Brown
2025-04-07 13:29                   ` Bartosz Golaszewski
2025-04-07 13:33                     ` Mark Brown
2025-04-07 13:52                       ` Mark Brown
2025-04-15 21:32             ` Linus Walleij
2025-04-17 18:57               ` Bartosz Golaszewski
2025-04-22 12:04                 ` Linus Walleij
2025-04-23 12:20                   ` Bartosz Golaszewski [this message]
2025-04-08  8:43 ` Bartosz Golaszewski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAMRc=Mc9fMrx0bek1mE2kpoxXVgD7GATaeQWZnL1eDW5oZ-FTQ@mail.gmail.com' \
    --to=brgl@bgdev.pl \
    --cc=bartosz.golaszewski@linaro.org \
    --cc=broonie@kernel.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).