diff mbox series

[1/2] gpio: pca953x: Add support for pca9506

Message ID 20210113194952.104734-1-u.kleine-koenig@pengutronix.de
State New
Headers show
Series [1/2] gpio: pca953x: Add support for pca9506 | expand

Commit Message

Uwe Kleine-König Jan. 13, 2021, 7:49 p.m. UTC
According to the reference manual "The PCA9505 is identical to the
PCA9506 except that it includes 100 kΩ internal pull-up resistors on all
the I/Os." So the pca9506 device can be considered identical to the
pca9505 for the gpio driver.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 Documentation/devicetree/bindings/gpio/gpio-pca95xx.yaml | 1 +
 drivers/gpio/gpio-pca953x.c                              | 2 ++
 2 files changed, 3 insertions(+)


base-commit: 5c8fe583cce542aa0b84adc939ce85293de36e5e

Comments

Bartosz Golaszewski Jan. 15, 2021, 2:18 p.m. UTC | #1
On Wed, Jan 13, 2021 at 8:50 PM Uwe Kleine-König
<u.kleine-koenig@pengutronix.de> wrote:
>
> According to the reference manual "The PCA9505 is identical to the
> PCA9506 except that it includes 100 kΩ internal pull-up resistors on all
> the I/Os." So the pca9506 device can be considered identical to the
> pca9505 for the gpio driver.
>
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> ---
>  Documentation/devicetree/bindings/gpio/gpio-pca95xx.yaml | 1 +
>  drivers/gpio/gpio-pca953x.c                              | 2 ++
>  2 files changed, 3 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/gpio/gpio-pca95xx.yaml b/Documentation/devicetree/bindings/gpio/gpio-pca95xx.yaml
> index f5ee23c2df60..cdd7744b8723 100644
> --- a/Documentation/devicetree/bindings/gpio/gpio-pca95xx.yaml
> +++ b/Documentation/devicetree/bindings/gpio/gpio-pca95xx.yaml
> @@ -32,6 +32,7 @@ properties:
>        - maxim,max7327
>        - nxp,pca6416
>        - nxp,pca9505
> +      - nxp,pca9506
>        - nxp,pca9534
>        - nxp,pca9535
>        - nxp,pca9536
> diff --git a/drivers/gpio/gpio-pca953x.c b/drivers/gpio/gpio-pca953x.c
> index 825b362eb4b7..5ea09fd01544 100644
> --- a/drivers/gpio/gpio-pca953x.c
> +++ b/drivers/gpio/gpio-pca953x.c
> @@ -73,6 +73,7 @@
>  static const struct i2c_device_id pca953x_id[] = {
>         { "pca6416", 16 | PCA953X_TYPE | PCA_INT, },
>         { "pca9505", 40 | PCA953X_TYPE | PCA_INT, },
> +       { "pca9506", 40 | PCA953X_TYPE | PCA_INT, },
>         { "pca9534", 8  | PCA953X_TYPE | PCA_INT, },
>         { "pca9535", 16 | PCA953X_TYPE | PCA_INT, },
>         { "pca9536", 4  | PCA953X_TYPE, },
> @@ -1236,6 +1237,7 @@ static int pca953x_resume(struct device *dev)
>  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,pca9506", .data = OF_953X(40, PCA_INT), },
>         { .compatible = "nxp,pca9534", .data = OF_953X( 8, PCA_INT), },
>         { .compatible = "nxp,pca9535", .data = OF_953X(16, PCA_INT), },
>         { .compatible = "nxp,pca9536", .data = OF_953X( 4, 0), },
>
> base-commit: 5c8fe583cce542aa0b84adc939ce85293de36e5e
> --
> 2.29.2
>

Hi Uwe,

This looks good but we usually split the DT bindings and code changes
into separate patches. Would you mind resending?

Bart
Uwe Kleine-König Jan. 15, 2021, 4:12 p.m. UTC | #2
Hello Bart,

On Fri, Jan 15, 2021 at 03:18:10PM +0100, Bartosz Golaszewski wrote:
> On Wed, Jan 13, 2021 at 8:50 PM Uwe Kleine-König

> >  Documentation/devicetree/bindings/gpio/gpio-pca95xx.yaml | 1 +

> >  drivers/gpio/gpio-pca953x.c                              | 2 ++

> > [...]

>

> This looks good but we usually split the DT bindings and code changes

> into separate patches. Would you mind resending?


If I do mind, do you then take the patch as is? :-)

Well, ok, I can split ...

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | https://www.pengutronix.de/ |
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/gpio/gpio-pca95xx.yaml b/Documentation/devicetree/bindings/gpio/gpio-pca95xx.yaml
index f5ee23c2df60..cdd7744b8723 100644
--- a/Documentation/devicetree/bindings/gpio/gpio-pca95xx.yaml
+++ b/Documentation/devicetree/bindings/gpio/gpio-pca95xx.yaml
@@ -32,6 +32,7 @@  properties:
       - maxim,max7327
       - nxp,pca6416
       - nxp,pca9505
+      - nxp,pca9506
       - nxp,pca9534
       - nxp,pca9535
       - nxp,pca9536
diff --git a/drivers/gpio/gpio-pca953x.c b/drivers/gpio/gpio-pca953x.c
index 825b362eb4b7..5ea09fd01544 100644
--- a/drivers/gpio/gpio-pca953x.c
+++ b/drivers/gpio/gpio-pca953x.c
@@ -73,6 +73,7 @@ 
 static const struct i2c_device_id pca953x_id[] = {
 	{ "pca6416", 16 | PCA953X_TYPE | PCA_INT, },
 	{ "pca9505", 40 | PCA953X_TYPE | PCA_INT, },
+	{ "pca9506", 40 | PCA953X_TYPE | PCA_INT, },
 	{ "pca9534", 8  | PCA953X_TYPE | PCA_INT, },
 	{ "pca9535", 16 | PCA953X_TYPE | PCA_INT, },
 	{ "pca9536", 4  | PCA953X_TYPE, },
@@ -1236,6 +1237,7 @@  static int pca953x_resume(struct device *dev)
 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,pca9506", .data = OF_953X(40, PCA_INT), },
 	{ .compatible = "nxp,pca9534", .data = OF_953X( 8, PCA_INT), },
 	{ .compatible = "nxp,pca9535", .data = OF_953X(16, PCA_INT), },
 	{ .compatible = "nxp,pca9536", .data = OF_953X( 4, 0), },