From: sashiko-bot@kernel.org
To: "Maria Garcia" <mariagarcia7293@gmail.com>, linux-gpio@vger.kernel.org
Subject: Re: [PATCH 1/2] gpio: pca953x: Fix TCA6418 bulk transfers and input caching
Date: Mon, 23 Nov 2026 11:48:37 +0000 [thread overview]
Message-ID: <sashiko-outbox-229170@kernel.org> (raw)
In-Reply-To: <20261123113234.197852-2-mariagarcia7293@gmail.com>
Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Medium] gpio: pca953x: missing select BITREVERSE in Kconfig for
bitrev8() calls
--
commit bfc14bf3ac2754cdca4700090ff5ce99abc64218
Author: Maria Garcia <mariagarcia7293@gmail.com>
gpio: pca953x: Fix TCA6418 bulk transfers and input caching
This commit disables PCA-style register auto-increment for TCA6418, reverses
Bank 0 bits during bulk reads and writes, marks TCA6418 input registers
volatile, and adds TCA6418 IRQ registers to tca6418_check_register().
> diff --git a/drivers/gpio/gpio-pca953x.c b/drivers/gpio/gpio-pca953x.c
> index afec5ec236968..8d9f5563e222a 100644
> --- a/drivers/gpio/gpio-pca953x.c
> +++ b/drivers/gpio/gpio-pca953x.c
[ ... ]
> @@ -577,6 +598,9 @@ static int pca953x_write_regs(struct pca953x_chip *chip, int reg, unsigned long
> for (i = 0; i < NBANK(chip); i++)
> value[i] = bitmap_get_value8(val, i * BANK_SZ);
>
> + if (PCA_CHIP_TYPE(chip->driver_data) == TCA6418_TYPE)
> + value[0] = bitrev8(value[0]);
> +
> ret = regmap_bulk_write(chip->regmap, regaddr, value, NBANK(chip));
> if (ret < 0) {
> dev_err(&chip->client->dev, "failed writing register: %d\n", ret);
> @@ -598,6 +622,9 @@ static int pca953x_read_regs(struct pca953x_chip *chip, int reg, unsigned long *
> return ret;
> }
>
> + if (PCA_CHIP_TYPE(chip->driver_data) == TCA6418_TYPE)
> + value[0] = bitrev8(value[0]);
[Severity: Medium]
Does config GPIO_PCA953X in drivers/gpio/Kconfig need to select BITREVERSE
for these bitrev8() calls?
On architectures without CONFIG_HAVE_ARCH_BITREVERSE, runtime bitrev8() calls
reference byte_rev_table from lib/bitrev.c, which is only built when
CONFIG_BITREVERSE is enabled. Without selecting BITREVERSE, building with
CONFIG_GPIO_PCA953X enabled and CONFIG_BITREVERSE disabled (or =m with
CONFIG_GPIO_PCA953X=y) fails at link time with an undefined reference to
byte_rev_table.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261123113234.197852-1-mariagarcia7293@gmail.com?part=1
next prev parent reply other threads:[~2026-11-23 11:48 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-23 11:32 [PATCH 0/2] gpio: pca953x: Fix TCA6418 multi-bank I/O, caching, and IRQs Maria Garcia
2026-11-23 11:32 ` [PATCH 1/2] gpio: pca953x: Fix TCA6418 bulk transfers and input caching Maria Garcia
2026-11-23 11:48 ` sashiko-bot [this message]
2026-11-23 11:32 ` [PATCH 2/2] gpio: pca953x: Fix TCA6418 interrupt handling Maria Garcia
2026-11-23 11:47 ` sashiko-bot
2026-11-23 11:42 ` [PATCH 0/2] gpio: pca953x: Fix TCA6418 multi-bank I/O, caching, and IRQs María García Fernández
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-229170@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=linux-gpio@vger.kernel.org \
--cc=mariagarcia7293@gmail.com \
--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