From: sashiko-bot@kernel.org
To: "Akshat Rawat" <akshatrawat095@gmail.com>
Cc: linux-rtc@vger.kernel.org,
"Alexandre Belloni" <alexandre.belloni@bootlin.com>
Subject: Re: [PATCH] rtc: pcf2127: use const per-variant regmap_config tables
Date: Wed, 25 Nov 2026 12:47:53 +0000 [thread overview]
Message-ID: <sashiko-outbox-233394@kernel.org> (raw)
In-Reply-To: <20261125124416.468-1-akshatrawat095@gmail.com>
> Both pcf2127_i2c_probe() and pcf2127_spi_probe() declare config as a
> static struct regmap_config and update it in place based on the chip
> variant.
>
> In pcf2127_spi_probe(), if a PCF2131 probes first, read_flag_mask and
> write_flag_mask are overwritten to 0 and never restored. Any PCF2127 or
> PCF2129 probed later reuses those zeroed masks instead of 0xa0/0x20,
> breaking SPI register access. Modifying static max_register and flag
> masks also races if multiple instances probe concurrently.
>
> Replace the shared mutable config structs in both probe paths with
> per-variant static const struct regmap_config tables, and drop the
> now-unused max_register field from struct pcf21xx_config.
>
> Fixes: fd28ceb4603f ("rtc: pcf2127: add variant-specific configuration structure")
> Fixes: fa78e9b606a4 ("rtc: pcf2127: fix SPI command byte for PCF2131")
> Cc: stable@vger.kernel.org
> Signed-off-by: Akshat Rawat <akshatrawat095@gmail.com>
Sashiko has reviewed this patch and found no issues.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261125124416.468-1-akshatrawat095@gmail.com?part=1
next prev parent reply other threads:[~2026-11-25 12:47 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-25 12:44 [PATCH] rtc: pcf2127: use const per-variant regmap_config tables Akshat Rawat
2026-11-25 12:47 ` sashiko-bot [this message]
2026-11-25 14:58 ` Hugo Villeneuve
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=sashiko-outbox-233394@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=akshatrawat095@gmail.com \
--cc=alexandre.belloni@bootlin.com \
--cc=linux-rtc@vger.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 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.