From: Joseph Telaak <joseph@telaak.dev>
To: sashiko-bot@kernel.org
Cc: Linus Walleij <linusw@kernel.org>,
Bartosz Golaszewski <brgl@kernel.org>,
Michael Walle <mwalle@kernel.org>, Rob Herring <robh@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
linux-gpio@vger.kernel.org, devicetree@vger.kernel.org
Subject: Re: [PATCH v3 2/2] gpio: Add Siflower GPIO controller driver
Date: Sun, 22 Nov 2026 23:01:42 -0500 [thread overview]
Message-ID: <20261123040142.48880-1-joseph@telaak.dev> (raw)
In-Reply-To: <sashiko-outbox-228534@kernel.org>
> Is MACH_SIFLOWER_MIPS defined anywhere in the tree?
It comes with the MIPS series:
https://patch.msgid.link/20261111-sf19a2890-mips-v2-0-36730fa4f5a6@telaak.dev
Only the SF19A2890 is supported here; the RISC-V parts will add their
own dependency with their compatibles.
> Should sf_gpio_regmap_config set .use_raw_spinlock = true?
Yes, v4 will set it.
> Can irq_chip callbacks dereference priv->gpio before it is initialized or
> after it has been freed?
For teardown, v4 will follow gpiolib's own irqchip order. The chained
handlers will go in after devm_gpio_regmap_register(), and one devm
action added after them will remove the handlers and dispose of the
mappings before gpio-regmap unregisters. That will also cover the
undisposed mappings.
Probe is harder. gpio-regmap takes the domain only at registration, so
the domain can be found from its fwnode before priv->gpio is set, and a
consumer that requests an IRQ in that window passes NULL to
gpio_regmap_reqres_irq(). gpio-rtd1625 and gpio-axiado-sgpio are set up
the same way. I see two ways to close it:
1. sf_gpio_irq_request_resources() would return -EPROBE_DEFER until
priv->gpio is set (smp_store_release()/smp_load_acquire()).
2. A gpio-regmap change so the driver gets the gpio_regmap before the
gpiochip is added, for example from an init callback in
gpio_regmap_config.
Linus, Bartosz, Michael: which would you prefer, or is there a better
way?
Joseph
next prev parent reply other threads:[~2026-11-23 4:02 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-23 1:37 [PATCH v3 0/2] gpio: Add the Siflower SF19A2890 GPIO controller Joseph Telaak
2026-11-23 1:37 ` Joseph Telaak via B4 Relay
2026-11-23 1:37 ` [PATCH v3 1/2] dt-bindings: gpio: Add " Joseph Telaak
2026-11-23 1:37 ` Joseph Telaak via B4 Relay
2026-11-23 1:45 ` sashiko-bot
2026-11-23 1:37 ` [PATCH v3 2/2] gpio: Add Siflower GPIO controller driver Joseph Telaak
2026-11-23 1:37 ` Joseph Telaak via B4 Relay
2026-11-23 1:49 ` sashiko-bot
2026-11-23 4:01 ` Joseph Telaak [this message]
2026-11-30 21:49 ` Linus Walleij
2026-11-30 22:03 ` Joseph Telaak
2026-11-30 22:06 ` 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=20261123040142.48880-1-joseph@telaak.dev \
--to=joseph@telaak.dev \
--cc=brgl@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=linusw@kernel.org \
--cc=linux-gpio@vger.kernel.org \
--cc=mwalle@kernel.org \
--cc=robh@kernel.org \
--cc=sashiko-bot@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.