* [PATCH] gpio: pca953x: Add support for MaxLinear's XRA1200 / XRA1200P
@ 2026-10-25 15:48 Uwe Kleine-König
2026-10-25 15:53 ` Uwe Kleine-König
2026-10-25 15:54 ` sashiko-bot
0 siblings, 2 replies; 3+ messages in thread
From: Uwe Kleine-König @ 2026-10-25 15:48 UTC (permalink / raw)
To: Linus Walleij, Bartosz Golaszewski; +Cc: linux-gpio
These are documented to be compatible with PCA9534 and PCA9554
respectively. The difference between the two is, that the XRA1200P has
the configurable pull-ups enabled upon power-up.
Datasheet available at https://www.maxlinear.com/ds/xra1200.pdf.
Signed-off-by: Uwe Kleine-König <ukleinek@debian.org>
---
drivers/gpio/gpio-pca953x.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/gpio/gpio-pca953x.c b/drivers/gpio/gpio-pca953x.c
index afec5ec23696..ea01fd152ac2 100644
--- a/drivers/gpio/gpio-pca953x.c
+++ b/drivers/gpio/gpio-pca953x.c
@@ -124,6 +124,8 @@ static const struct i2c_device_id pca953x_id[] = {
{ .name = "tca9538", .driver_data = 8 | PCA953X_TYPE | PCA_INT },
{ .name = "tca9539", .driver_data = 16 | PCA953X_TYPE | PCA_INT },
{ .name = "tca9554", .driver_data = 8 | PCA953X_TYPE | PCA_INT },
+ { .name = "xra1200", .driver_data = 8 | PCA953X_TYPE },
+ { .name = "xra1200p", .driver_data = 8 | PCA953X_TYPE },
{ .name = "xra1202", .driver_data = 8 | PCA953X_TYPE },
{ .name = "tcal6408", .driver_data = 8 | PCA953X_TYPE | PCA_LATCH_INT },
@@ -1485,6 +1487,9 @@ static const struct of_device_id pca953x_dt_ids[] = {
{ .compatible = "nxp,pcal9554b", .data = OF_953X( 8, PCA_LATCH_INT), },
{ .compatible = "nxp,pcal9555a", .data = OF_953X(16, PCA_LATCH_INT), },
+ { .compatible = "maxlinear,xra1200", .data = OF_953X( 8, PCA_INT), },
+ { .compatible = "maxlinear,xra1200p", .data = OF_953X( 8, PCA_INT), },
+
{ .compatible = "maxim,max7310", .data = OF_953X( 8, 0), },
{ .compatible = "maxim,max7312", .data = OF_953X(16, PCA_INT), },
{ .compatible = "maxim,max7313", .data = OF_953X(16, PCA_INT), },
--
2.47.3
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] gpio: pca953x: Add support for MaxLinear's XRA1200 / XRA1200P
2026-10-25 15:48 [PATCH] gpio: pca953x: Add support for MaxLinear's XRA1200 / XRA1200P Uwe Kleine-König
@ 2026-10-25 15:53 ` Uwe Kleine-König
2026-10-25 15:54 ` sashiko-bot
1 sibling, 0 replies; 3+ messages in thread
From: Uwe Kleine-König @ 2026-10-25 15:53 UTC (permalink / raw)
To: Linus Walleij, Bartosz Golaszewski; +Cc: linux-gpio
[-- Attachment #1.1: Type: text/plain, Size: 1221 bytes --]
On 2026-10-25 16:48, Uwe Kleine-König wrote:
> These are documented to be compatible with PCA9534 and PCA9554
> respectively. The difference between the two is, that the XRA1200P has
> the configurable pull-ups enabled upon power-up.
>
> Datasheet available at https://www.maxlinear.com/ds/xra1200.pdf.
>
> Signed-off-by: Uwe Kleine-König <ukleinek@debian.org>
> ---
> drivers/gpio/gpio-pca953x.c | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/drivers/gpio/gpio-pca953x.c b/drivers/gpio/gpio-pca953x.c
> index afec5ec23696..ea01fd152ac2 100644
> --- a/drivers/gpio/gpio-pca953x.c
> +++ b/drivers/gpio/gpio-pca953x.c
> @@ -124,6 +124,8 @@ static const struct i2c_device_id pca953x_id[] = {
> { .name = "tca9538", .driver_data = 8 | PCA953X_TYPE | PCA_INT },
> { .name = "tca9539", .driver_data = 16 | PCA953X_TYPE | PCA_INT },
> { .name = "tca9554", .driver_data = 8 | PCA953X_TYPE | PCA_INT },
> + { .name = "xra1200", .driver_data = 8 | PCA953X_TYPE },
> + { .name = "xra1200p", .driver_data = 8 | PCA953X_TYPE },
Argh, after seeing that patch in my inbox I saw that the two lines lack a `| PCA_INT`.
I'll wait a bit before resending ...
Best regards
Uwe
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] gpio: pca953x: Add support for MaxLinear's XRA1200 / XRA1200P
2026-10-25 15:48 [PATCH] gpio: pca953x: Add support for MaxLinear's XRA1200 / XRA1200P Uwe Kleine-König
2026-10-25 15:53 ` Uwe Kleine-König
@ 2026-10-25 15:54 ` sashiko-bot
1 sibling, 0 replies; 3+ messages in thread
From: sashiko-bot @ 2026-10-25 15:54 UTC (permalink / raw)
To: Uwe Kleine-König; +Cc: linux-gpio
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] gpio: pca953x: missing PCA_INT flag for xra1200/xra1200p in pca953x_id
--
commit 79260b2b7ac0a0bff8a0c5399da85adabe336338
Author: Uwe Kleine-König <ukleinek@debian.org>
gpio: pca953x: Add support for MaxLinear's XRA1200 / XRA1200P
This commit adds I2C device ID and OF match table entries to support the
MaxLinear XRA1200 and XRA1200P 8-bit I2C GPIO expanders in the pca953x
driver.
> diff --git a/drivers/gpio/gpio-pca953x.c b/drivers/gpio/gpio-pca953x.c
> index afec5ec236968..ea01fd152ac22 100644
> --- a/drivers/gpio/gpio-pca953x.c
> +++ b/drivers/gpio/gpio-pca953x.c
> @@ -124,6 +124,8 @@ static const struct i2c_device_id pca953x_id[] = {
> { .name = "tca9538", .driver_data = 8 | PCA953X_TYPE | PCA_INT },
> { .name = "tca9539", .driver_data = 16 | PCA953X_TYPE | PCA_INT },
> { .name = "tca9554", .driver_data = 8 | PCA953X_TYPE | PCA_INT },
> + { .name = "xra1200", .driver_data = 8 | PCA953X_TYPE },
> + { .name = "xra1200p", .driver_data = 8 | PCA953X_TYPE },
[Severity: Medium]
Should the xra1200 and xra1200p entries in pca953x_id[] in
drivers/gpio/gpio-pca953x.c also include the PCA_INT flag in .driver_data?
In pca953x_dt_ids[], the corresponding entries for these devices set PCA_INT,
matching the pca9534 and pca9554 entries that they are compatible with:
{ .compatible = "maxlinear,xra1200", .data = OF_953X( 8, PCA_INT), },
{ .compatible = "maxlinear,xra1200p", .data = OF_953X( 8, PCA_INT), },
However, when an xra1200 or xra1200p device is matched via pca953x_id[] in
pca953x_probe() -> i2c_get_match_data(), chip->driver_data will not have
PCA_INT set, causing pca953x_irq_setup() to return early without setting up
interrupt support:
if (!(chip->driver_data & PCA_INT))
return 0;
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261025154840.657888-2-ukleinek@debian.org?part=1
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-10-25 15:54 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-25 15:48 [PATCH] gpio: pca953x: Add support for MaxLinear's XRA1200 / XRA1200P Uwe Kleine-König
2026-10-25 15:53 ` Uwe Kleine-König
2026-10-25 15:54 ` sashiko-bot
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.