linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Marc Zyngier <maz@kernel.org>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: linux-kernel@vger.kernel.org, Bartosz Golaszewski <brgl@bgdev.pl>,
	Thierry Reding <thierry.reding@gmail.com>,
	Joey Gouly <joey.gouly@arm.com>,
	Jonathan Hunter <jonathanh@nvidia.com>,
	Hector Martin <marcan@marcan.st>, Sven Peter <sven@svenpeter.dev>,
	Alyssa Rosenzweig <alyssa@rosenzweig.io>,
	Bjorn Andersson <bjorn.andersson@linaro.org>,
	Andy Gross <agross@kernel.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	linux-gpio@vger.kernel.org, linux-tegra@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-arm-msm@vger.kernel.org, kernel-team@android.com
Subject: Re: [PATCH 0/5] gpiolib: Handle immutable irq_chip structures
Date: Tue, 15 Mar 2022 09:35:08 +0000	[thread overview]
Message-ID: <e39c68c6c8c99fec796461cde33f78df@kernel.org> (raw)
In-Reply-To: <CACRpkdbEDoPeu=TWmsJ_t-4+NtyiiSCXoj9rymspZt0nC+yrsQ@mail.gmail.com>

On 2022-03-15 00:44, Linus Walleij wrote:
> On Wed, Feb 23, 2022 at 4:44 PM Marc Zyngier <maz@kernel.org> wrote:
> 
>> I recently realised that the gpiolib play ugly tricks on the
>> unsuspecting irq_chip structures by patching the callbacks.
> 
> Sorry about that...

No worries. It probably did seem like a good idea at the
time, and I have the benefit of hindsight here...

> 
>> My current approach is to add a new irq_chip flag (IRQCHIP_IMMUTABLE)
>> which does what it says on the tin: don't you dare writing there.
>> Gpiolib is further updated not to install its own callbacks, and it
>> becomes the responsibility of the driver to call into the gpiolib when
>> required. This is similar to what we do for other subsystems such as
>> PCI-MSI.
> 
> OK if there is a precedent it is usually wise to follow.
> 
>> I'd welcome comments on the approach. If deemed acceptable, there are
>> another 300+ drivers to update! Not to mention the documentation. I
>> appreciate that this is a lot of potential changes, but the current
>> situation is messy.
> 
> I'm happy with this approach as long as the 300+ drivers get fixed
> and the old way of doing it gets deleted.

Of course. Note that it will take some time before it actually happens.
My current plan is to stick in a pr_warn() each time a driver
following the old scheme gets registered, as a nudge for people to
update their driver if they care about it.

Regarding documentation, are you OK with me simply replacing the
current code samples with the new approach? It will at least avoid
giving people the wrong idea. I also want to write a brief migration
guide that people willing to bump up their patch count can follow.

I'll repost something once -rc1 is out.

Thanks,

         M.
-- 
Jazz is not dead. It just smells funny...

  reply	other threads:[~2022-03-15  9:35 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-23 15:44 [PATCH 0/5] gpiolib: Handle immutable irq_chip structures Marc Zyngier
2022-02-23 15:44 ` [PATCH 1/5] gpio: Don't fiddle with irqchips marked as immutable Marc Zyngier
2022-02-23 17:48   ` Jeffrey Hugo
2022-02-23 18:14     ` Marc Zyngier
2022-02-24 16:51   ` Thierry Reding
2022-02-26 10:32     ` Marc Zyngier
2022-02-23 15:44 ` [PATCH 2/5] gpio: Expose the gpiochip_irq_re[ql]res helpers Marc Zyngier
2022-02-23 15:44 ` [PATCH 3/5] pinctrl: apple-gpio: Make the irqchip immutable Marc Zyngier
2022-02-23 15:44 ` [PATCH 4/5] pinctrl: msmgpio: " Marc Zyngier
2022-02-23 15:44 ` [PATCH 5/5] gpio: tegra186: " Marc Zyngier
2022-02-24 16:40 ` [PATCH 0/5] gpiolib: Handle immutable irq_chip structures Thierry Reding
2022-02-24 17:42   ` Marc Zyngier
2022-03-04 17:19     ` Marc Zyngier
2022-03-15  0:44 ` Linus Walleij
2022-03-15  9:35   ` Marc Zyngier [this message]
2022-03-24 22:30     ` Linus Walleij

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=e39c68c6c8c99fec796461cde33f78df@kernel.org \
    --to=maz@kernel.org \
    --cc=agross@kernel.org \
    --cc=alyssa@rosenzweig.io \
    --cc=bjorn.andersson@linaro.org \
    --cc=brgl@bgdev.pl \
    --cc=joey.gouly@arm.com \
    --cc=jonathanh@nvidia.com \
    --cc=kernel-team@android.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tegra@vger.kernel.org \
    --cc=marcan@marcan.st \
    --cc=sven@svenpeter.dev \
    --cc=tglx@linutronix.de \
    --cc=thierry.reding@gmail.com \
    /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).