All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v5 0/3] gpio: pca9570: add slg7xl45106 support
@ 2022-09-30 10:22 Shubhrajyoti Datta
  2022-09-30 10:22 ` [PATCH v5 1/3] dt-bindings: gpio: pca9570: Add compatible for slg7xl45106 Shubhrajyoti Datta
                   ` (3 more replies)
  0 siblings, 4 replies; 11+ messages in thread
From: Shubhrajyoti Datta @ 2022-09-30 10:22 UTC (permalink / raw)
  To: linux-gpio
  Cc: git, devicetree, krzysztof.kozlowski+dt, robh+dt, brgl, linus.walleij


Add Dialog semiconductors SLG7XL45106 GPO expander


v4 and v5:
Resend as the patches were mangled.

Changes in v3:
Add ack
split the new patch
Suggested by Andy Shevchenko
split the new patch
Suggested by Andy Shevchenko

Changes in v2:
add alphabetically

Shubhrajyoti Datta (3):
  dt-bindings: gpio: pca9570: Add compatible for slg7xl45106
  gpio: pca9570: add a platform data structure
  gpio: pca9570: add slg7xl45106 support

 .../bindings/gpio/gpio-pca9570.yaml           |  1 +
 drivers/gpio/gpio-pca9570.c                   | 49 ++++++++++++++++---
 2 files changed, 44 insertions(+), 6 deletions(-)

-- 
2.17.1


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

* [PATCH v5 1/3] dt-bindings: gpio: pca9570: Add compatible for slg7xl45106
  2022-09-30 10:22 [PATCH v5 0/3] gpio: pca9570: add slg7xl45106 support Shubhrajyoti Datta
@ 2022-09-30 10:22 ` Shubhrajyoti Datta
  2022-09-30 10:22 ` [PATCH v5 2/3] gpio: pca9570: add a platform data structure Shubhrajyoti Datta
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 11+ messages in thread
From: Shubhrajyoti Datta @ 2022-09-30 10:22 UTC (permalink / raw)
  To: linux-gpio
  Cc: git, devicetree, krzysztof.kozlowski+dt, robh+dt, brgl, linus.walleij

This patch adds compatible string for the SLG7XL45106,
I2C GPO expander.

Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Shubhrajyoti Datta <shubhrajyoti.datta@amd.com>
---

(no changes since v3)

Changes in v3:
Add ack

Changes in v2:
add alphabetically

 Documentation/devicetree/bindings/gpio/gpio-pca9570.yaml | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Documentation/devicetree/bindings/gpio/gpio-pca9570.yaml b/Documentation/devicetree/bindings/gpio/gpio-pca9570.yaml
index 1acaa0a3d35a..48bf414aa50e 100644
--- a/Documentation/devicetree/bindings/gpio/gpio-pca9570.yaml
+++ b/Documentation/devicetree/bindings/gpio/gpio-pca9570.yaml
@@ -12,6 +12,7 @@ maintainers:
 properties:
   compatible:
     enum:
+      - dlg,slg7xl45106
       - nxp,pca9570
       - nxp,pca9571
 
-- 
2.17.1


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

* [PATCH v5 2/3] gpio: pca9570: add a platform data structure
  2022-09-30 10:22 [PATCH v5 0/3] gpio: pca9570: add slg7xl45106 support Shubhrajyoti Datta
  2022-09-30 10:22 ` [PATCH v5 1/3] dt-bindings: gpio: pca9570: Add compatible for slg7xl45106 Shubhrajyoti Datta
@ 2022-09-30 10:22 ` Shubhrajyoti Datta
  2022-10-26 10:00   ` Geert Uytterhoeven
  2022-09-30 10:22 ` [PATCH v5 3/3] gpio: pca9570: add slg7xl45106 support Shubhrajyoti Datta
  2022-10-25  8:37 ` [PATCH v5 0/3] " Bartosz Golaszewski
  3 siblings, 1 reply; 11+ messages in thread
From: Shubhrajyoti Datta @ 2022-09-30 10:22 UTC (permalink / raw)
  To: linux-gpio
  Cc: git, devicetree, krzysztof.kozlowski+dt, robh+dt, brgl, linus.walleij

Add struct pca9570_platform_data for adding the platform data
structure. Also modify the existing structs for pca9570 and pca9571

Signed-off-by: Shubhrajyoti Datta <shubhrajyoti.datta@amd.com>
---

(no changes since v3)

Changes in v3:
split the new patch
Suggested by Andy Shevchenko

 drivers/gpio/gpio-pca9570.c | 26 ++++++++++++++++++++++----
 1 file changed, 22 insertions(+), 4 deletions(-)

diff --git a/drivers/gpio/gpio-pca9570.c b/drivers/gpio/gpio-pca9570.c
index ab2a652964ec..d49e088e6b43 100644
--- a/drivers/gpio/gpio-pca9570.c
+++ b/drivers/gpio/gpio-pca9570.c
@@ -15,6 +15,16 @@
 #include <linux/mutex.h>
 #include <linux/property.h>
 
+/**
+ * struct pca9570_platform_data - GPIO platformdata
+ * @ngpio: no of gpios
+ * @command: Command to be sent
+ */
+struct pca9570_platform_data {
+	u16 ngpio;
+	u32 command;
+};
+
 /**
  * struct pca9570 - GPIO driver data
  * @chip: GPIO controller chip
@@ -119,16 +129,24 @@ static int pca9570_probe(struct i2c_client *client)
 	return devm_gpiochip_add_data(&client->dev, &gpio->chip, gpio);
 }
 
+static const struct pca9570_platform_data pca9570_gpio = {
+	.ngpio = 4,
+};
+
+static const struct pca9570_platform_data pca9571_gpio = {
+	.ngpio = 8,
+};
+
 static const struct i2c_device_id pca9570_id_table[] = {
-	{ "pca9570", 4 },
-	{ "pca9571", 8 },
+	{ "pca9570", (kernel_ulong_t)&pca9570_gpio},
+	{ "pca9571", (kernel_ulong_t)&pca9571_gpio },
 	{ /* sentinel */ }
 };
 MODULE_DEVICE_TABLE(i2c, pca9570_id_table);
 
 static const struct of_device_id pca9570_of_match_table[] = {
-	{ .compatible = "nxp,pca9570", .data = (void *)4 },
-	{ .compatible = "nxp,pca9571", .data = (void *)8 },
+	{ .compatible = "nxp,pca9570", .data = &pca9570_gpio },
+	{ .compatible = "nxp,pca9571", .data = &pca9571_gpio },
 	{ /* sentinel */ }
 };
 MODULE_DEVICE_TABLE(of, pca9570_of_match_table);
-- 
2.17.1


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

* [PATCH v5 3/3] gpio: pca9570: add slg7xl45106 support
  2022-09-30 10:22 [PATCH v5 0/3] gpio: pca9570: add slg7xl45106 support Shubhrajyoti Datta
  2022-09-30 10:22 ` [PATCH v5 1/3] dt-bindings: gpio: pca9570: Add compatible for slg7xl45106 Shubhrajyoti Datta
  2022-09-30 10:22 ` [PATCH v5 2/3] gpio: pca9570: add a platform data structure Shubhrajyoti Datta
@ 2022-09-30 10:22 ` Shubhrajyoti Datta
  2022-10-04  8:44   ` Linus Walleij
  2022-10-26 10:03   ` Geert Uytterhoeven
  2022-10-25  8:37 ` [PATCH v5 0/3] " Bartosz Golaszewski
  3 siblings, 2 replies; 11+ messages in thread
From: Shubhrajyoti Datta @ 2022-09-30 10:22 UTC (permalink / raw)
  To: linux-gpio
  Cc: git, devicetree, krzysztof.kozlowski+dt, robh+dt, brgl, linus.walleij

Dialog semiconductors SLG7XL45106 is an 8-bit I2C GPO expander.
The output port is controlled by a data byte with register
address. Add a compatible string for the same. Also update
the driver to write and read from it.

Signed-off-by: Shubhrajyoti Datta <shubhrajyoti.datta@amd.com>
---

(no changes since v3)

Changes in v3:
split the new patch
Suggested by Andy Shevchenko

 drivers/gpio/gpio-pca9570.c | 23 +++++++++++++++++++++--
 1 file changed, 21 insertions(+), 2 deletions(-)

diff --git a/drivers/gpio/gpio-pca9570.c b/drivers/gpio/gpio-pca9570.c
index d49e088e6b43..6c07a8811a7a 100644
--- a/drivers/gpio/gpio-pca9570.c
+++ b/drivers/gpio/gpio-pca9570.c
@@ -15,6 +15,8 @@
 #include <linux/mutex.h>
 #include <linux/property.h>
 
+#define SLG7XL45106_GPO_REG	0xDB
+
 /**
  * struct pca9570_platform_data - GPIO platformdata
  * @ngpio: no of gpios
@@ -28,11 +30,13 @@ struct pca9570_platform_data {
 /**
  * struct pca9570 - GPIO driver data
  * @chip: GPIO controller chip
+ * @p_data: GPIO controller platform data
  * @lock: Protects write sequences
  * @out: Buffer for device register
  */
 struct pca9570 {
 	struct gpio_chip chip;
+	const struct pca9570_platform_data *p_data;
 	struct mutex lock;
 	u8 out;
 };
@@ -42,7 +46,11 @@ static int pca9570_read(struct pca9570 *gpio, u8 *value)
 	struct i2c_client *client = to_i2c_client(gpio->chip.parent);
 	int ret;
 
-	ret = i2c_smbus_read_byte(client);
+	if (gpio->p_data->command != 0)
+		ret = i2c_smbus_read_byte_data(client, gpio->p_data->command);
+	else
+		ret = i2c_smbus_read_byte(client);
+
 	if (ret < 0)
 		return ret;
 
@@ -54,6 +62,9 @@ static int pca9570_write(struct pca9570 *gpio, u8 value)
 {
 	struct i2c_client *client = to_i2c_client(gpio->chip.parent);
 
+	if (gpio->p_data->command != 0)
+		return i2c_smbus_write_byte_data(client, gpio->p_data->command, value);
+
 	return i2c_smbus_write_byte(client, value);
 }
 
@@ -116,7 +127,8 @@ static int pca9570_probe(struct i2c_client *client)
 	gpio->chip.get = pca9570_get;
 	gpio->chip.set = pca9570_set;
 	gpio->chip.base = -1;
-	gpio->chip.ngpio = (uintptr_t)device_get_match_data(&client->dev);
+	gpio->p_data = device_get_match_data(&client->dev);
+	gpio->chip.ngpio = gpio->p_data->ngpio;
 	gpio->chip.can_sleep = true;
 
 	mutex_init(&gpio->lock);
@@ -137,14 +149,21 @@ static const struct pca9570_platform_data pca9571_gpio = {
 	.ngpio = 8,
 };
 
+static const struct pca9570_platform_data slg7xl45106_gpio = {
+	.ngpio = 8,
+	.command = SLG7XL45106_GPO_REG,
+};
+
 static const struct i2c_device_id pca9570_id_table[] = {
 	{ "pca9570", (kernel_ulong_t)&pca9570_gpio},
 	{ "pca9571", (kernel_ulong_t)&pca9571_gpio },
+	{ "slg7xl45106", (kernel_ulong_t)&slg7xl45106_gpio },
 	{ /* sentinel */ }
 };
 MODULE_DEVICE_TABLE(i2c, pca9570_id_table);
 
 static const struct of_device_id pca9570_of_match_table[] = {
+	{ .compatible = "dlg,slg7xl45106", .data = &slg7xl45106_gpio},
 	{ .compatible = "nxp,pca9570", .data = &pca9570_gpio },
 	{ .compatible = "nxp,pca9571", .data = &pca9571_gpio },
 	{ /* sentinel */ }
-- 
2.17.1


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

* Re: [PATCH v5 3/3] gpio: pca9570: add slg7xl45106 support
  2022-09-30 10:22 ` [PATCH v5 3/3] gpio: pca9570: add slg7xl45106 support Shubhrajyoti Datta
@ 2022-10-04  8:44   ` Linus Walleij
  2022-10-26 10:03   ` Geert Uytterhoeven
  1 sibling, 0 replies; 11+ messages in thread
From: Linus Walleij @ 2022-10-04  8:44 UTC (permalink / raw)
  To: Shubhrajyoti Datta
  Cc: linux-gpio, git, devicetree, krzysztof.kozlowski+dt, robh+dt, brgl

On Fri, Sep 30, 2022 at 12:23 PM Shubhrajyoti Datta
<shubhrajyoti.datta@amd.com> wrote:

> Dialog semiconductors SLG7XL45106 is an 8-bit I2C GPO expander.
> The output port is controlled by a data byte with register
> address. Add a compatible string for the same. Also update
> the driver to write and read from it.
>
> Signed-off-by: Shubhrajyoti Datta <shubhrajyoti.datta@amd.com>

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

Yours,
Linus Walleij

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

* Re: [PATCH v5 0/3] gpio: pca9570: add slg7xl45106 support
  2022-09-30 10:22 [PATCH v5 0/3] gpio: pca9570: add slg7xl45106 support Shubhrajyoti Datta
                   ` (2 preceding siblings ...)
  2022-09-30 10:22 ` [PATCH v5 3/3] gpio: pca9570: add slg7xl45106 support Shubhrajyoti Datta
@ 2022-10-25  8:37 ` Bartosz Golaszewski
  3 siblings, 0 replies; 11+ messages in thread
From: Bartosz Golaszewski @ 2022-10-25  8:37 UTC (permalink / raw)
  To: Shubhrajyoti Datta
  Cc: linux-gpio, git, devicetree, krzysztof.kozlowski+dt, robh+dt,
	linus.walleij

On Fri, Sep 30, 2022 at 12:23 PM Shubhrajyoti Datta
<shubhrajyoti.datta@amd.com> wrote:
>
>
> Add Dialog semiconductors SLG7XL45106 GPO expander
>
>
> v4 and v5:
> Resend as the patches were mangled.
>
> Changes in v3:
> Add ack
> split the new patch
> Suggested by Andy Shevchenko
> split the new patch
> Suggested by Andy Shevchenko
>
> Changes in v2:
> add alphabetically
>
> Shubhrajyoti Datta (3):
>   dt-bindings: gpio: pca9570: Add compatible for slg7xl45106
>   gpio: pca9570: add a platform data structure
>   gpio: pca9570: add slg7xl45106 support
>
>  .../bindings/gpio/gpio-pca9570.yaml           |  1 +
>  drivers/gpio/gpio-pca9570.c                   | 49 ++++++++++++++++---
>  2 files changed, 44 insertions(+), 6 deletions(-)
>
> --
> 2.17.1
>

Series applied, thanks!

Bartosz

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

* Re: [PATCH v5 2/3] gpio: pca9570: add a platform data structure
  2022-09-30 10:22 ` [PATCH v5 2/3] gpio: pca9570: add a platform data structure Shubhrajyoti Datta
@ 2022-10-26 10:00   ` Geert Uytterhoeven
  2022-10-26 11:46     ` Andy Shevchenko
  0 siblings, 1 reply; 11+ messages in thread
From: Geert Uytterhoeven @ 2022-10-26 10:00 UTC (permalink / raw)
  To: Shubhrajyoti Datta
  Cc: linux-gpio, git, devicetree, krzysztof.kozlowski+dt, robh+dt,
	brgl, linus.walleij, Andy Shevchenko

Hi Shubhrajyoti,

On Fri, Sep 30, 2022 at 12:41 PM Shubhrajyoti Datta
<shubhrajyoti.datta@amd.com> wrote:
> Add struct pca9570_platform_data for adding the platform data
> structure. Also modify the existing structs for pca9570 and pca9571
>
> Signed-off-by: Shubhrajyoti Datta <shubhrajyoti.datta@amd.com>
> ---
>
> (no changes since v3)
>
> Changes in v3:
> split the new patch
> Suggested by Andy Shevchenko

Thanks for your patch, which is now commit 35a4bc94a47f2ea6 ("gpio:
pca9570: add a platform data structure") in gpio/gpio/for-next
linux-next/master next-20221026

> --- a/drivers/gpio/gpio-pca9570.c
> +++ b/drivers/gpio/gpio-pca9570.c
> @@ -15,6 +15,16 @@
>  #include <linux/mutex.h>
>  #include <linux/property.h>
>
> +/**
> + * struct pca9570_platform_data - GPIO platformdata
> + * @ngpio: no of gpios
> + * @command: Command to be sent
> + */
> +struct pca9570_platform_data {
> +       u16 ngpio;
> +       u32 command;
> +};
> +
>  /**
>   * struct pca9570 - GPIO driver data
>   * @chip: GPIO controller chip
> @@ -119,16 +129,24 @@ static int pca9570_probe(struct i2c_client *client)
>         return devm_gpiochip_add_data(&client->dev, &gpio->chip, gpio);
>  }
>
> +static const struct pca9570_platform_data pca9570_gpio = {
> +       .ngpio = 4,
> +};
> +
> +static const struct pca9570_platform_data pca9571_gpio = {
> +       .ngpio = 8,
> +};
> +
>  static const struct i2c_device_id pca9570_id_table[] = {
> -       { "pca9570", 4 },
> -       { "pca9571", 8 },
> +       { "pca9570", (kernel_ulong_t)&pca9570_gpio},
> +       { "pca9571", (kernel_ulong_t)&pca9571_gpio },
>         { /* sentinel */ }
>  };
>  MODULE_DEVICE_TABLE(i2c, pca9570_id_table);
>
>  static const struct of_device_id pca9570_of_match_table[] = {
> -       { .compatible = "nxp,pca9570", .data = (void *)4 },
> -       { .compatible = "nxp,pca9571", .data = (void *)8 },
> +       { .compatible = "nxp,pca9570", .data = &pca9570_gpio },
> +       { .compatible = "nxp,pca9571", .data = &pca9571_gpio },

This breaks bisection, as .data is still considered to be the number
of GPIOs:

    gpio->chip.ngpio = (uintptr_t)device_get_match_data(&client->dev);


>         { /* sentinel */ }
>  };
>  MODULE_DEVICE_TABLE(of, pca9570_of_match_table);

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

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

* Re: [PATCH v5 3/3] gpio: pca9570: add slg7xl45106 support
  2022-09-30 10:22 ` [PATCH v5 3/3] gpio: pca9570: add slg7xl45106 support Shubhrajyoti Datta
  2022-10-04  8:44   ` Linus Walleij
@ 2022-10-26 10:03   ` Geert Uytterhoeven
  1 sibling, 0 replies; 11+ messages in thread
From: Geert Uytterhoeven @ 2022-10-26 10:03 UTC (permalink / raw)
  To: Shubhrajyoti Datta
  Cc: linux-gpio, git, devicetree, krzysztof.kozlowski+dt, robh+dt,
	brgl, linus.walleij, Andy Shevchenko

Hi Shubhrajyoti,

On Fri, Sep 30, 2022 at 1:15 PM Shubhrajyoti Datta
<shubhrajyoti.datta@amd.com> wrote:
> Dialog semiconductors SLG7XL45106 is an 8-bit I2C GPO expander.
> The output port is controlled by a data byte with register
> address. Add a compatible string for the same. Also update
> the driver to write and read from it.
>
> Signed-off-by: Shubhrajyoti Datta <shubhrajyoti.datta@amd.com>
> ---
>
> (no changes since v3)
>
> Changes in v3:
> split the new patch
> Suggested by Andy Shevchenko

Thanks for your patch, which is now commit 6a0411dc1f8694ce
("gpio: pca9570: add slg7xl45106 support") in gpio/gpio/for-next
linux-next/master next-20221026

> --- a/drivers/gpio/gpio-pca9570.c
> +++ b/drivers/gpio/gpio-pca9570.c

> @@ -116,7 +127,8 @@ static int pca9570_probe(struct i2c_client *client)
>         gpio->chip.get = pca9570_get;
>         gpio->chip.set = pca9570_set;
>         gpio->chip.base = -1;
> -       gpio->chip.ngpio = (uintptr_t)device_get_match_data(&client->dev);
> +       gpio->p_data = device_get_match_data(&client->dev);
> +       gpio->chip.ngpio = gpio->p_data->ngpio;

To avoid breakage during bisection, the change to initialize ngpio
should be moved into "[PATCH v5 2/3] gpio: pca9570: add a platform
data structure".

>         gpio->chip.can_sleep = true;
>
>         mutex_init(&gpio->lock);
> @@ -137,14 +149,21 @@ static const struct pca9570_platform_data pca9571_gpio = {
>         .ngpio = 8,
>  };
>
> +static const struct pca9570_platform_data slg7xl45106_gpio = {
> +       .ngpio = 8,
> +       .command = SLG7XL45106_GPO_REG,
> +};
> +
>  static const struct i2c_device_id pca9570_id_table[] = {
>         { "pca9570", (kernel_ulong_t)&pca9570_gpio},
>         { "pca9571", (kernel_ulong_t)&pca9571_gpio },
> +       { "slg7xl45106", (kernel_ulong_t)&slg7xl45106_gpio },
>         { /* sentinel */ }
>  };
>  MODULE_DEVICE_TABLE(i2c, pca9570_id_table);
>
>  static const struct of_device_id pca9570_of_match_table[] = {
> +       { .compatible = "dlg,slg7xl45106", .data = &slg7xl45106_gpio},
>         { .compatible = "nxp,pca9570", .data = &pca9570_gpio },
>         { .compatible = "nxp,pca9571", .data = &pca9571_gpio },
>         { /* sentinel */ }

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

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

* Re: [PATCH v5 2/3] gpio: pca9570: add a platform data structure
  2022-10-26 10:00   ` Geert Uytterhoeven
@ 2022-10-26 11:46     ` Andy Shevchenko
  2022-10-26 12:51       ` Bartosz Golaszewski
  0 siblings, 1 reply; 11+ messages in thread
From: Andy Shevchenko @ 2022-10-26 11:46 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Shubhrajyoti Datta, linux-gpio, git, devicetree,
	krzysztof.kozlowski+dt, robh+dt, brgl, linus.walleij

On Wed, Oct 26, 2022 at 12:00:34PM +0200, Geert Uytterhoeven wrote:
> Hi Shubhrajyoti,
> On Fri, Sep 30, 2022 at 12:41 PM Shubhrajyoti Datta
> <shubhrajyoti.datta@amd.com> wrote:

...

> Thanks for your patch, which is now commit 35a4bc94a47f2ea6 ("gpio:
> pca9570: add a platform data structure") in gpio/gpio/for-next
> linux-next/master next-20221026

Dunno if Bart rebases his tree...

...

> >  static const struct of_device_id pca9570_of_match_table[] = {
> > -       { .compatible = "nxp,pca9570", .data = (void *)4 },
> > -       { .compatible = "nxp,pca9571", .data = (void *)8 },
> > +       { .compatible = "nxp,pca9570", .data = &pca9570_gpio },
> > +       { .compatible = "nxp,pca9571", .data = &pca9571_gpio },
> 
> This breaks bisection, as .data is still considered to be the number
> of GPIOs:
> 
>     gpio->chip.ngpio = (uintptr_t)device_get_match_data(&client->dev);

You beat me up to it, I have also noticed this.

> >         { /* sentinel */ }
> >  };

-- 
With Best Regards,
Andy Shevchenko



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

* Re: [PATCH v5 2/3] gpio: pca9570: add a platform data structure
  2022-10-26 11:46     ` Andy Shevchenko
@ 2022-10-26 12:51       ` Bartosz Golaszewski
  2022-10-26 15:58         ` Datta, Shubhrajyoti
  0 siblings, 1 reply; 11+ messages in thread
From: Bartosz Golaszewski @ 2022-10-26 12:51 UTC (permalink / raw)
  To: Andy Shevchenko
  Cc: Geert Uytterhoeven, Shubhrajyoti Datta, linux-gpio, git,
	devicetree, krzysztof.kozlowski+dt, robh+dt, linus.walleij

On Wed, Oct 26, 2022 at 1:46 PM Andy Shevchenko
<andriy.shevchenko@linux.intel.com> wrote:
>
> On Wed, Oct 26, 2022 at 12:00:34PM +0200, Geert Uytterhoeven wrote:
> > Hi Shubhrajyoti,
> > On Fri, Sep 30, 2022 at 12:41 PM Shubhrajyoti Datta
> > <shubhrajyoti.datta@amd.com> wrote:
>
> ...
>
> > Thanks for your patch, which is now commit 35a4bc94a47f2ea6 ("gpio:
> > pca9570: add a platform data structure") in gpio/gpio/for-next
> > linux-next/master next-20221026
>
> Dunno if Bart rebases his tree...
>

I will back it out of next. Shubhrajyoti: can you send a fixed version
of this series?

Bart

> ...
>
> > >  static const struct of_device_id pca9570_of_match_table[] = {
> > > -       { .compatible = "nxp,pca9570", .data = (void *)4 },
> > > -       { .compatible = "nxp,pca9571", .data = (void *)8 },
> > > +       { .compatible = "nxp,pca9570", .data = &pca9570_gpio },
> > > +       { .compatible = "nxp,pca9571", .data = &pca9571_gpio },
> >
> > This breaks bisection, as .data is still considered to be the number
> > of GPIOs:
> >
> >     gpio->chip.ngpio = (uintptr_t)device_get_match_data(&client->dev);
>
> You beat me up to it, I have also noticed this.
>
> > >         { /* sentinel */ }
> > >  };
>
> --
> With Best Regards,
> Andy Shevchenko
>
>

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

* RE: [PATCH v5 2/3] gpio: pca9570: add a platform data structure
  2022-10-26 12:51       ` Bartosz Golaszewski
@ 2022-10-26 15:58         ` Datta, Shubhrajyoti
  0 siblings, 0 replies; 11+ messages in thread
From: Datta, Shubhrajyoti @ 2022-10-26 15:58 UTC (permalink / raw)
  To: Bartosz Golaszewski, Andy Shevchenko
  Cc: Geert Uytterhoeven, linux-gpio, git (AMD-Xilinx),
	devicetree, krzysztof.kozlowski+dt, robh+dt, linus.walleij

[AMD Official Use Only - General]



> -----Original Message-----
> From: Bartosz Golaszewski <brgl@bgdev.pl>
> Sent: Wednesday, October 26, 2022 6:21 PM
> To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> Cc: Geert Uytterhoeven <geert@linux-m68k.org>; Datta, Shubhrajyoti
> <shubhrajyoti.datta@amd.com>; linux-gpio@vger.kernel.org; git (AMD-
> Xilinx) <git@amd.com>; devicetree@vger.kernel.org;
> krzysztof.kozlowski+dt@linaro.org; robh+dt@kernel.org;
> linus.walleij@linaro.org
> Subject: Re: [PATCH v5 2/3] gpio: pca9570: add a platform data structure
> 
> Caution: This message originated from an External Source. Use proper
> caution when opening attachments, clicking links, or responding.
> 
> 
> On Wed, Oct 26, 2022 at 1:46 PM Andy Shevchenko
> <andriy.shevchenko@linux.intel.com> wrote:
> >
> > On Wed, Oct 26, 2022 at 12:00:34PM +0200, Geert Uytterhoeven wrote:
> > > Hi Shubhrajyoti,
> > > On Fri, Sep 30, 2022 at 12:41 PM Shubhrajyoti Datta
> > > <shubhrajyoti.datta@amd.com> wrote:
> >
> > ...
> >
> > > Thanks for your patch, which is now commit 35a4bc94a47f2ea6 ("gpio:
> > > pca9570: add a platform data structure") in gpio/gpio/for-next
> > > linux-next/master next-20221026
> >
> > Dunno if Bart rebases his tree...
> >
> 
> I will back it out of next. Shubhrajyoti: can you send a fixed version of this
> series?

Just sent it fixing it up.

> 
> Bart
> 
> > ...
> >
> > > >  static const struct of_device_id pca9570_of_match_table[] = {
> > > > -       { .compatible = "nxp,pca9570", .data = (void *)4 },
> > > > -       { .compatible = "nxp,pca9571", .data = (void *)8 },
> > > > +       { .compatible = "nxp,pca9570", .data = &pca9570_gpio },
> > > > +       { .compatible = "nxp,pca9571", .data = &pca9571_gpio },
> > >
> > > This breaks bisection, as .data is still considered to be the number
> > > of GPIOs:
> > >
> > >     gpio->chip.ngpio =
> > > (uintptr_t)device_get_match_data(&client->dev);
> >
> > You beat me up to it, I have also noticed this.
> >
> > > >         { /* sentinel */ }
> > > >  };
> >
> > --
> > With Best Regards,
> > Andy Shevchenko
> >
> >

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

end of thread, other threads:[~2022-10-26 15:59 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-30 10:22 [PATCH v5 0/3] gpio: pca9570: add slg7xl45106 support Shubhrajyoti Datta
2022-09-30 10:22 ` [PATCH v5 1/3] dt-bindings: gpio: pca9570: Add compatible for slg7xl45106 Shubhrajyoti Datta
2022-09-30 10:22 ` [PATCH v5 2/3] gpio: pca9570: add a platform data structure Shubhrajyoti Datta
2022-10-26 10:00   ` Geert Uytterhoeven
2022-10-26 11:46     ` Andy Shevchenko
2022-10-26 12:51       ` Bartosz Golaszewski
2022-10-26 15:58         ` Datta, Shubhrajyoti
2022-09-30 10:22 ` [PATCH v5 3/3] gpio: pca9570: add slg7xl45106 support Shubhrajyoti Datta
2022-10-04  8:44   ` Linus Walleij
2022-10-26 10:03   ` Geert Uytterhoeven
2022-10-25  8:37 ` [PATCH v5 0/3] " Bartosz Golaszewski

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.