Skip to contentSkip to conversation

dt-bindings: gpio: pca953x: document the nxp,pca6416

PATCH In review Alexandre Belloni 2 participants 4 messages Apr 9, 2019 – Apr 11, 2019

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/2 dt-bindings: gpio: pca953x: document the nxp,pca6416

The NXP PCA6416 is a variant of the PCA GPIO expander, with 16 GPIOs.

---
 Documentation/devicetree/bindings/gpio/gpio-pca953x.txt | 1 +
 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/gpio/gpio-pca953x.txt +1 -0
index fb144e2b6522..22fb905a1b2d 100644
@@ -2,6 +2,7 @@
 
 Required properties:
  - compatible: Has to contain one of the following:
+	nxp,pca6416
 	nxp,pca9505
 	nxp,pca9534
 	nxp,pca9535
Signature · 1 line
2.20.1
#1 lore raw

PATCH 2/2 gpio: pca953x: add support for pca6416

The NXP PCA6416, documented at [1], is a variant of the PCA GPIO expander with 16 GPIOs, and supporting an interrupt.

[1] https://www.nxp.com/docs/en/data-sheet/PCA6416A.pdf

---
 drivers/gpio/gpio-pca953x.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/gpio/gpio-pca953x.c +2 -0
index 7e76830b3368..7fb4d51277e4 100644
@@ -73,6 +73,7 @@
 #define PCA_CHIP_TYPE(x)	((x) & PCA_TYPE_MASK)
 
 static const struct i2c_device_id pca953x_id[] = {
+	{ "pca6416", 16 | PCA953X_TYPE | PCA_INT, },
 	{ "pca9505", 40 | PCA953X_TYPE | PCA_INT, },
 	{ "pca9534", 8  | PCA953X_TYPE | PCA_INT, },
 	{ "pca9535", 16 | PCA953X_TYPE | PCA_INT, },
@@ -1137,6 +1138,7 @@ static int pca953x_resume(struct device *dev)
 #define OF_957X(__nrgpio, __int) (void *)(__nrgpio | PCA957X_TYPE | __int)
 
 static const struct of_device_id pca953x_dt_ids[] = {
+	{ .compatible = "nxp,pca6416", .data = OF_953X(16, PCA_INT), },
 	{ .compatible = "nxp,pca9505", .data = OF_953X(40, PCA_INT), },
 	{ .compatible = "nxp,pca9534", .data = OF_953X( 8, PCA_INT), },
 	{ .compatible = "nxp,pca9535", .data = OF_953X(16, PCA_INT), },
Signature · 1 line
2.20.1