devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] gpio: pca953x: Add support for pca9506
@ 2021-01-13 19:49 Uwe Kleine-König
  2021-01-13 19:49 ` [PATCH 2/2] dt-bindings: gpio: pca953x: increase allowed length for gpio-line-names Uwe Kleine-König
  2021-01-15 14:18 ` [PATCH 1/2] gpio: pca953x: Add support for pca9506 Bartosz Golaszewski
  0 siblings, 2 replies; 8+ messages in thread
From: Uwe Kleine-König @ 2021-01-13 19:49 UTC (permalink / raw)
  To: Linus Walleij, Bartosz Golaszewski, Rob Herring, Andy Shevchenko
  Cc: linux-gpio, devicetree, kernel

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


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 2/2] dt-bindings: gpio: pca953x: increase allowed length for gpio-line-names
  2021-01-13 19:49 [PATCH 1/2] gpio: pca953x: Add support for pca9506 Uwe Kleine-König
@ 2021-01-13 19:49 ` Uwe Kleine-König
  2021-01-18 14:36   ` Linus Walleij
  2021-01-15 14:18 ` [PATCH 1/2] gpio: pca953x: Add support for pca9506 Bartosz Golaszewski
  1 sibling, 1 reply; 8+ messages in thread
From: Uwe Kleine-König @ 2021-01-13 19:49 UTC (permalink / raw)
  To: Linus Walleij, Bartosz Golaszewski, Rob Herring, Andy Shevchenko
  Cc: linux-gpio, devicetree, kernel

Some supported chips (e.g. pca9505) support 40 chips. To be able to give
each line a name the length of the gpio-line-names property must be
allowed to contain up to 40 entries.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 Documentation/devicetree/bindings/gpio/gpio-pca95xx.yaml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/gpio/gpio-pca95xx.yaml b/Documentation/devicetree/bindings/gpio/gpio-pca95xx.yaml
index cdd7744b8723..246bae53be8b 100644
--- a/Documentation/devicetree/bindings/gpio/gpio-pca95xx.yaml
+++ b/Documentation/devicetree/bindings/gpio/gpio-pca95xx.yaml
@@ -71,7 +71,7 @@ properties:
 
   gpio-line-names:
     minItems: 1
-    maxItems: 32
+    maxItems: 40
 
   interrupts:
     maxItems: 1
-- 
2.29.2


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH 1/2] gpio: pca953x: Add support for pca9506
  2021-01-13 19:49 [PATCH 1/2] gpio: pca953x: Add support for pca9506 Uwe Kleine-König
  2021-01-13 19:49 ` [PATCH 2/2] dt-bindings: gpio: pca953x: increase allowed length for gpio-line-names Uwe Kleine-König
@ 2021-01-15 14:18 ` Bartosz Golaszewski
  2021-01-15 16:12   ` Uwe Kleine-König
  1 sibling, 1 reply; 8+ messages in thread
From: Bartosz Golaszewski @ 2021-01-15 14:18 UTC (permalink / raw)
  To: Uwe Kleine-König
  Cc: Linus Walleij, Rob Herring, Andy Shevchenko, linux-gpio,
	linux-devicetree, Sascha Hauer

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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 1/2] gpio: pca953x: Add support for pca9506
  2021-01-15 14:18 ` [PATCH 1/2] gpio: pca953x: Add support for pca9506 Bartosz Golaszewski
@ 2021-01-15 16:12   ` Uwe Kleine-König
  0 siblings, 0 replies; 8+ messages in thread
From: Uwe Kleine-König @ 2021-01-15 16:12 UTC (permalink / raw)
  To: Bartosz Golaszewski
  Cc: linux-devicetree, Linus Walleij, linux-gpio, Rob Herring,
	Sascha Hauer, Andy Shevchenko

[-- Attachment #1: Type: text/plain, Size: 679 bytes --]

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/ |

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 2/2] dt-bindings: gpio: pca953x: increase allowed length for gpio-line-names
  2021-01-13 19:49 ` [PATCH 2/2] dt-bindings: gpio: pca953x: increase allowed length for gpio-line-names Uwe Kleine-König
@ 2021-01-18 14:36   ` Linus Walleij
  2021-01-18 14:57     ` Uwe Kleine-König
  0 siblings, 1 reply; 8+ messages in thread
From: Linus Walleij @ 2021-01-18 14:36 UTC (permalink / raw)
  To: Uwe Kleine-König
  Cc: Bartosz Golaszewski, Rob Herring, Andy Shevchenko,
	open list:GPIO SUBSYSTEM,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	Sascha Hauer

On Wed, Jan 13, 2021 at 8:50 PM Uwe Kleine-König
<u.kleine-koenig@pengutronix.de> wrote:

> Some supported chips (e.g. pca9505) support 40 chips. To be able to give

40 lines I guess? (No big deal. Everyone understand what you mean.)

> each line a name the length of the gpio-line-names property must be
> allowed to contain up to 40 entries.
>
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

Reviewed-by: Linus Walleij <linus.walleij@linaro.org>

Yours,
Linus Walleij

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 2/2] dt-bindings: gpio: pca953x: increase allowed length for gpio-line-names
  2021-01-18 14:36   ` Linus Walleij
@ 2021-01-18 14:57     ` Uwe Kleine-König
  2021-01-22  9:50       ` Linus Walleij
  0 siblings, 1 reply; 8+ messages in thread
From: Uwe Kleine-König @ 2021-01-18 14:57 UTC (permalink / raw)
  To: Linus Walleij
  Cc: open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	open list:GPIO SUBSYSTEM, Bartosz Golaszewski, Rob Herring,
	Sascha Hauer, Andy Shevchenko

[-- Attachment #1: Type: text/plain, Size: 993 bytes --]

On Mon, Jan 18, 2021 at 03:36:08PM +0100, Linus Walleij wrote:
> On Wed, Jan 13, 2021 at 8:50 PM Uwe Kleine-König
> <u.kleine-koenig@pengutronix.de> wrote:
> 
> > Some supported chips (e.g. pca9505) support 40 chips. To be able to give
> 
> 40 lines I guess? (No big deal. Everyone understand what you mean.)

Yes, I noticed that myself and fixed that in v2
(https://lore.kernel.org/r/20210115164658.187681-1-u.kleine-koenig@pengutronix.de)

> > each line a name the length of the gpio-line-names property must be
> > allowed to contain up to 40 entries.
> >
> > Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> 
> Reviewed-by: Linus Walleij <linus.walleij@linaro.org>

Who will pick up this series (preferable v2 instead of this (implicit)
v1)? Will they notice this Reviewed-by?

Thanks
Uwe

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

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 2/2] dt-bindings: gpio: pca953x: increase allowed length for gpio-line-names
  2021-01-18 14:57     ` Uwe Kleine-König
@ 2021-01-22  9:50       ` Linus Walleij
  2021-01-22 11:53         ` Bartosz Golaszewski
  0 siblings, 1 reply; 8+ messages in thread
From: Linus Walleij @ 2021-01-22  9:50 UTC (permalink / raw)
  To: Uwe Kleine-König
  Cc: open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	open list:GPIO SUBSYSTEM, Bartosz Golaszewski, Rob Herring,
	Sascha Hauer, Andy Shevchenko

On Mon, Jan 18, 2021 at 3:57 PM Uwe Kleine-König
<u.kleine-koenig@pengutronix.de> wrote:

> Who will pick up this series (preferable v2 instead of this (implicit)
> v1)? Will they notice this Reviewed-by?

Bartosz is collecting GPIO patches to Torvalds for this merge
window.

Yours,
Linus Walleij

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 2/2] dt-bindings: gpio: pca953x: increase allowed length for gpio-line-names
  2021-01-22  9:50       ` Linus Walleij
@ 2021-01-22 11:53         ` Bartosz Golaszewski
  0 siblings, 0 replies; 8+ messages in thread
From: Bartosz Golaszewski @ 2021-01-22 11:53 UTC (permalink / raw)
  To: Linus Walleij
  Cc: Uwe Kleine-König,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	open list:GPIO SUBSYSTEM, Rob Herring, Sascha Hauer,
	Andy Shevchenko

On Fri, Jan 22, 2021 at 10:50 AM Linus Walleij <linus.walleij@linaro.org> wrote:
>
> On Mon, Jan 18, 2021 at 3:57 PM Uwe Kleine-König
> <u.kleine-koenig@pengutronix.de> wrote:
>
> > Who will pick up this series (preferable v2 instead of this (implicit)
> > v1)? Will they notice this Reviewed-by?
>
> Bartosz is collecting GPIO patches to Torvalds for this merge
> window.
>
> Yours,
> Linus Walleij

I already have v2 of this series in my tree.

Bartosz

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2021-01-22 11:54 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-13 19:49 [PATCH 1/2] gpio: pca953x: Add support for pca9506 Uwe Kleine-König
2021-01-13 19:49 ` [PATCH 2/2] dt-bindings: gpio: pca953x: increase allowed length for gpio-line-names Uwe Kleine-König
2021-01-18 14:36   ` Linus Walleij
2021-01-18 14:57     ` Uwe Kleine-König
2021-01-22  9:50       ` Linus Walleij
2021-01-22 11:53         ` Bartosz Golaszewski
2021-01-15 14:18 ` [PATCH 1/2] gpio: pca953x: Add support for pca9506 Bartosz Golaszewski
2021-01-15 16:12   ` Uwe Kleine-König

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).