From: Markus Probst <markus.probst@posteo.de>
To: Linus Walleij <linusw@kernel.org>, sashiko-reviews@lists.linux.dev
Cc: Alexandre Belloni <alexandre.belloni@bootlin.com>,
devicetree@vger.kernel.org, linux-rtc@vger.kernel.org,
conor+dt@kernel.org, robh@kernel.org
Subject: Re: [PATCH v6 5/6] rtc: s35390a: Add pinctrl
Date: Tue, 25 Aug 2026 19:36:59 +0000 [thread overview]
Message-ID: <3827a4e6be868e8726c140281a140a85e706aacc.camel@posteo.de> (raw)
In-Reply-To: <CAD++jLnpzMs5h-k49HQ_asppECRMm1wGQK8X+vTmiC+S70fZgw@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1791 bytes --]
On Tue, 2026-08-25 at 21:28 +0200, Linus Walleij wrote:
> On Mon, Aug 24, 2026 at 12:26 AM <sashiko-bot@kernel.org> wrote:
>
> > > config RTC_DRV_S35390A
> > > tristate "Seiko Instruments S-35390A"
> > > + depends on PINCTRL
> >
> > [Severity: High]
> > Will this unconditional dependency cause the RTC driver to be silently dropped
> > on platforms without PINCTRL enabled?
>
> Maybe just select PINCTRL then, it's a valid point.
>
> > > + err = pinctrl_enable(pctl);
> > > + if (err)
> > > + return dev_err_probe(dev, err, "pinctrl enable failed\n");
> > > +
> > > + /* If no pinmux function is defined in DT, fallback to previous behaviour */
> > > + fallback[0] = S35390A_FUNC_IGNORE;
> > > + fallback[1] = S35390A_FUNC_WAKEUP;
> > > +
> > > + for (i = 0; i < ARRAY_SIZE(s35390a_pin_groups); i++) {
> > > + if (s35390a->pinfunction[i] == -1) {
> >
> > [Severity: Medium]
> > Is there a data race here since the pinfunction array is accessed locklessly
> > after pinctrl_enable() has made the pinctrl device available?
>
> That's a valid concern.
I don't think so.
`s35390a_pinctrl_set_mux` itself will take a lock for the operation.
`pinfunction[i]` is a 32-bit integer, so there should be no load
tearing.
If we take a lock here, it shouldn't change anything. In a normal
condition this shouldn't happen anyway, as `pinctrl_enable` should
block until the default state is selected. If another driver is
concurrently selecting a pinctrl state of this device while we probe
(which is the only time pinfunction should be modified here
concurrently), it is still a race condition whether the fallback
applies or not.
Thanks
- Markus Probst
>
> Yours,
> Linus Walleij
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 870 bytes --]
next prev parent reply other threads:[~2026-08-25 19:37 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-23 22:13 [PATCH v6 0/6] rtc: s35390a: Allow use of output pin for interrupt signal 1 for wakealarm Markus Probst
2026-08-23 22:13 ` [PATCH v6 1/6] dt-bindings: rtc: Add pinctrl for S35390A Markus Probst
2026-08-23 22:20 ` sashiko-bot
2026-08-23 22:13 ` [PATCH v6 2/6] rtc: s35390a: Add missing newline to dev_err Markus Probst
2026-08-23 22:21 ` sashiko-bot
2026-08-25 19:25 ` Linus Walleij
2026-08-23 22:13 ` [PATCH v6 3/6] rtc: s35390a: Fix alarm not disabling Markus Probst
2026-08-23 22:19 ` sashiko-bot
2026-08-23 22:13 ` [PATCH v6 4/6] rtc: s35390a: Read 24-hour mode on access Markus Probst
2026-08-23 22:24 ` sashiko-bot
2026-08-23 22:13 ` [PATCH v6 5/6] rtc: s35390a: Add pinctrl Markus Probst
2026-08-23 22:26 ` sashiko-bot
2026-08-25 19:28 ` Linus Walleij
2026-08-25 19:36 ` Markus Probst [this message]
2026-08-25 19:39 ` Markus Probst
2026-08-23 22:13 ` [PATCH v6 6/6] rtc: s35390a: Add synology quirk Markus Probst
2026-08-23 22:18 ` sashiko-bot
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=3827a4e6be868e8726c140281a140a85e706aacc.camel@posteo.de \
--to=markus.probst@posteo.de \
--cc=alexandre.belloni@bootlin.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=linusw@kernel.org \
--cc=linux-rtc@vger.kernel.org \
--cc=robh@kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
/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