Skip to contentSkip to conversation

gpio/pca953x: Add TI TCA9539 support

PATCH Superseded Thierry Reding 2 participants 4 messages Sep 9, 2015 – Oct 2, 2015

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

PATCH 1/1 gpio/pca953x: Add TI TCA9539 support

From: Thierry Reding <[email protected]>

The TCA9539 is almost identical to the PCA9555 and software-compatible with this driver. It exposes 16 general purpose I/O pins in two 8-bit configurations.

---
 drivers/gpio/gpio-pca953x.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/gpio/gpio-pca953x.c +2 -0
index 50caeb1ee350..b28791279173 100644
@@ -67,6 +67,7 @@ static const struct i2c_device_id pca953x_id[] = {
 	{ "tca6408", 8  | PCA953X_TYPE | PCA_INT, },
 	{ "tca6416", 16 | PCA953X_TYPE | PCA_INT, },
 	{ "tca6424", 24 | PCA953X_TYPE | PCA_INT, },
+	{ "tca9539", 16 | PCA953X_TYPE | PCA_INT, },
 	{ "xra1202", 8  | PCA953X_TYPE },
 	{ }
 };
@@ -754,6 +755,7 @@ static const struct of_device_id pca953x_dt_ids[] = {
 	{ .compatible = "ti,tca6408", },
 	{ .compatible = "ti,tca6416", },
 	{ .compatible = "ti,tca6424", },
+	{ .compatible = "ti,tca9539", },
 
 	{ .compatible = "exar,xra1202", },
 	{ }
Signature · 1 line
2.5.0
#1 lore raw
Quoted 7 lines · Thierry Reding

From: Thierry Reding <[email protected]>

The TCA9539 is almost identical to the PCA9555 and software-compatible with this driver. It exposes 16 general purpose I/O pins in two 8-bit configurations.

Looks good! But:

Quoted 1 line

+ { .compatible = "ti,tca9539", },

You forgot to patch Documentation/devicetree/bindings/gpio/gpio-pca953x.txt

Fix that and I'll apply it.

Yours,
Linus Walleij

#2 lore raw

PATCH v2 1/1 gpio/pca953x: Add TI TCA9539 support

In reply to Thierry Reding

From: Thierry Reding <[email protected]>

The TCA9539 is almost identical to the PCA9555 and software-compatible with this driver. It exposes 16 general purpose I/O pins in two 8-bit configurations.

---
Changes in v2:
- update device tree binding documentation

 Documentation/devicetree/bindings/gpio/gpio-pca953x.txt | 1 +
 drivers/gpio/gpio-pca953x.c                             | 2 ++
 2 files changed, 3 insertions(+)
Documentation/devicetree/bindings/gpio/gpio-pca953x.txt +1 -0
index b9a42f294dd0..13df9933f4cd 100644
@@ -24,6 +24,7 @@ Required properties:
 	ti,tca6408
 	ti,tca6416
 	ti,tca6424
+	ti,tca9539
 	exar,xra1202
 
 Example:
drivers/gpio/gpio-pca953x.c +2 -0
index 50caeb1ee350..b28791279173 100644
@@ -67,6 +67,7 @@ static const struct i2c_device_id pca953x_id[] = {
 	{ "tca6408", 8  | PCA953X_TYPE | PCA_INT, },
 	{ "tca6416", 16 | PCA953X_TYPE | PCA_INT, },
 	{ "tca6424", 24 | PCA953X_TYPE | PCA_INT, },
+	{ "tca9539", 16 | PCA953X_TYPE | PCA_INT, },
 	{ "xra1202", 8  | PCA953X_TYPE },
 	{ }
 };
@@ -754,6 +755,7 @@ static const struct of_device_id pca953x_dt_ids[] = {
 	{ .compatible = "ti,tca6408", },
 	{ .compatible = "ti,tca6416", },
 	{ .compatible = "ti,tca6424", },
+	{ .compatible = "ti,tca9539", },
 
 	{ .compatible = "exar,xra1202", },
 	{ }
Signature · 1 line
2.5.0
#3 lore raw
Quoted 10 lines · Thierry Reding

From: Thierry Reding <[email protected]>

The TCA9539 is almost identical to the PCA9555 and software-compatible with this driver. It exposes 16 general purpose I/O pins in two 8-bit configurations.

---
Changes in v2:
- update device tree binding documentation

Patch applied.

Yours,
Linus Walleij