gpio: pca953xx: Add support for pca6408
authorJustin Chen <justinpopo6@gmail.com>
Wed, 4 May 2022 22:29:16 +0000 (15:29 -0700)
committerBartosz Golaszewski <brgl@bgdev.pl>
Thu, 5 May 2022 12:52:39 +0000 (14:52 +0200)
Add support for pca6408 which is the 8-bit version of the pca6416.

https://www.nxp.com/docs/en/data-sheet/PCA6408A.pdf

Signed-off-by: Justin Chen <justinpopo6@gmail.com>
Acked-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: Bartosz Golaszewski <brgl@bgdev.pl>
drivers/gpio/gpio-pca953x.c

index d2fe76f..4909175 100644 (file)
@@ -71,6 +71,7 @@
 #define PCA_CHIP_TYPE(x)       ((x) & PCA_TYPE_MASK)
 
 static const struct i2c_device_id pca953x_id[] = {
+       { "pca6408", 8  | PCA953X_TYPE | PCA_INT, },
        { "pca6416", 16 | PCA953X_TYPE | PCA_INT, },
        { "pca9505", 40 | PCA953X_TYPE | PCA_INT, },
        { "pca9506", 40 | PCA953X_TYPE | PCA_INT, },
@@ -1198,6 +1199,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,pca6408", .data = OF_953X(8, PCA_INT), },
        { .compatible = "nxp,pca6416", .data = OF_953X(16, PCA_INT), },
        { .compatible = "nxp,pca9505", .data = OF_953X(40, PCA_INT), },
        { .compatible = "nxp,pca9506", .data = OF_953X(40, PCA_INT), },