From: Heiko Stuebner <heiko@sntech.de>
To: broonie@kernel.org
Cc: linux-spi@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
linux-rockchip@lists.infradead.org, quentin.schulz@cherry.de,
Lee Jones <lee@kernel.org>,
Sebastian Reichel <sebastian.reichel@collabora.com>,
Heiko Stuebner <heiko.stuebner@cherry.de>
Subject: Re: [PATCH v2 2/6] spi: Export spi_set_cs() function
Date: Fri, 13 Nov 2026 19:30:33 +0100 [thread overview]
Message-ID: <m57rhfeHSi6wilRDC92EGA@sntech.de> (raw)
In-Reply-To: <9kep3BO9ROGEepQWTWqwnA@sntech.de>
Am Freitag, 13. November 2026, 14:56:33 Mitteleuropäische Normalzeit schrieb Heiko Stübner:
> Am Freitag, 13. November 2026, 14:50:13 Mitteleuropäische Normalzeit schrieb Heiko Stuebner:
> > From: Heiko Stuebner <heiko.stuebner@cherry.de>
> >
> > While spi_set_cs is currently only used when the SPI framework manages
> > the core transfer function, it contains a lot of functionality that
> > can be used for the upcoming atomic transfers, where a driver implementing
> > that atomic transfer could profit from not having to duplicate the
> > chip-select functionality.
> >
> > The only sleeping part was the spi_delay_exec function doing the
> > chip-select delays, which can now also run in atomic contexts.
> >
> > So export the function.
> >
> > Signed-off-by: Heiko Stuebner <heiko.stuebner@cherry.de>
> > ---
>
> Dang, overlooked spi_toggle_csgpiod() called in spi_set_cs(), which does
> gpiod_set_value_cansleep().
spi_toggle_csgpiod() can of course also differentiate between using
_can_sleep normally and switching to the no-sleep variant in the atomic
mode.
So before this whole series a splat is already created if a gpio-cs at
the late stage, so after this, the splat would only occur, if someone
uses a sleeping gpio(-expander) for something wanting to poweroff a
system.
Anyway, I've created a patch for spi_toggle_csgpiod() but will wait
till monday to maybe get some more comments beforehand.
Heiko
next prev parent reply other threads:[~2026-11-13 18:30 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-13 13:50 [PATCH v2 0/6] spi: Implement a atomic transfer as a last resort Heiko Stuebner
2026-11-13 13:50 ` [PATCH v2 1/6] spi: Allow spi_delay_exec() to be used from atomic contexts Heiko Stuebner
2026-11-13 13:50 ` [PATCH v2 2/6] spi: Export spi_set_cs() function Heiko Stuebner
2026-11-13 13:56 ` Heiko Stübner
2026-11-13 18:30 ` Heiko Stuebner [this message]
2026-11-13 13:50 ` [PATCH v2 3/6] spi: Add infrastructure for atomic sync transfers Heiko Stuebner
2026-11-13 13:50 ` [PATCH v2 4/6] spi: rockchip: Fix runtime resume error handling Heiko Stuebner
2026-11-13 13:50 ` [PATCH v2 5/6] spi: rockchip: Move to pm_runtime_resume_and_get Heiko Stuebner
2026-11-13 13:50 ` [PATCH v2 6/6] spi: rockchip: Add an atomic transfer function Heiko Stuebner
2026-11-13 19:04 ` Sebastian Reichel
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=m57rhfeHSi6wilRDC92EGA@sntech.de \
--to=heiko@sntech.de \
--cc=broonie@kernel.org \
--cc=heiko.stuebner@cherry.de \
--cc=lee@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-rockchip@lists.infradead.org \
--cc=linux-spi@vger.kernel.org \
--cc=quentin.schulz@cherry.de \
--cc=sebastian.reichel@collabora.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