linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/4] gpio: arizona: Use local copy of pdata
@ 2019-07-22  9:07 Charles Keepax
  2019-07-22  9:07 ` [PATCH 2/4] gpio: madera: " Charles Keepax
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Charles Keepax @ 2019-07-22  9:07 UTC (permalink / raw)
  To: bgolaszewski; +Cc: linus.walleij, linux-gpio, patches

A local copy of the pdata exists and it should be used rather than
pulling a fresh copy.

Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
---
 drivers/gpio/gpio-arizona.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpio/gpio-arizona.c b/drivers/gpio/gpio-arizona.c
index c07fad975049d..5640efe5e7504 100644
--- a/drivers/gpio/gpio-arizona.c
+++ b/drivers/gpio/gpio-arizona.c
@@ -142,7 +142,7 @@ static const struct gpio_chip template_chip = {
 static int arizona_gpio_probe(struct platform_device *pdev)
 {
 	struct arizona *arizona = dev_get_drvdata(pdev->dev.parent);
-	struct arizona_pdata *pdata = dev_get_platdata(arizona->dev);
+	struct arizona_pdata *pdata = &arizona->pdata;
 	struct arizona_gpio *arizona_gpio;
 	int ret;
 
@@ -177,7 +177,7 @@ static int arizona_gpio_probe(struct platform_device *pdev)
 		return -EINVAL;
 	}
 
-	if (pdata && pdata->gpio_base)
+	if (pdata->gpio_base)
 		arizona_gpio->gpio_chip.base = pdata->gpio_base;
 	else
 		arizona_gpio->gpio_chip.base = -1;
-- 
2.11.0


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

* [PATCH 2/4] gpio: madera: Use local copy of pdata
  2019-07-22  9:07 [PATCH 1/4] gpio: arizona: Use local copy of pdata Charles Keepax
@ 2019-07-22  9:07 ` Charles Keepax
  2019-08-05  9:43   ` Linus Walleij
  2019-07-22  9:07 ` [PATCH 3/4] gpio: madera: Add support for Cirrus Logic CS47L15 Charles Keepax
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 8+ messages in thread
From: Charles Keepax @ 2019-07-22  9:07 UTC (permalink / raw)
  To: bgolaszewski; +Cc: linus.walleij, linux-gpio, patches

A local copy of the pdata exists and it should be used rather than
pulling a fresh copy.

Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
---
 drivers/gpio/gpio-madera.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpio/gpio-madera.c b/drivers/gpio/gpio-madera.c
index 4dbc837d12155..fa3441df0a5db 100644
--- a/drivers/gpio/gpio-madera.c
+++ b/drivers/gpio/gpio-madera.c
@@ -120,7 +120,7 @@ static const struct gpio_chip madera_gpio_chip = {
 static int madera_gpio_probe(struct platform_device *pdev)
 {
 	struct madera *madera = dev_get_drvdata(pdev->dev.parent);
-	struct madera_pdata *pdata = dev_get_platdata(madera->dev);
+	struct madera_pdata *pdata = &madera->pdata;
 	struct madera_gpio *madera_gpio;
 	int ret;
 
@@ -153,7 +153,7 @@ static int madera_gpio_probe(struct platform_device *pdev)
 	}
 
 	/* We want to be usable on systems that don't use devicetree or acpi */
-	if (pdata && pdata->gpio_base)
+	if (pdata->gpio_base)
 		madera_gpio->gpio_chip.base = pdata->gpio_base;
 	else
 		madera_gpio->gpio_chip.base = -1;
-- 
2.11.0


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

* [PATCH 3/4] gpio: madera: Add support for Cirrus Logic CS47L15
  2019-07-22  9:07 [PATCH 1/4] gpio: arizona: Use local copy of pdata Charles Keepax
  2019-07-22  9:07 ` [PATCH 2/4] gpio: madera: " Charles Keepax
@ 2019-07-22  9:07 ` Charles Keepax
  2019-08-05  9:45   ` Linus Walleij
  2019-07-22  9:07 ` [PATCH 4/4] gpio: madera: Add support for Cirrus Logic CS47L92 Charles Keepax
  2019-08-05  9:42 ` [PATCH 1/4] gpio: arizona: Use local copy of pdata Linus Walleij
  3 siblings, 1 reply; 8+ messages in thread
From: Charles Keepax @ 2019-07-22  9:07 UTC (permalink / raw)
  To: bgolaszewski; +Cc: linus.walleij, linux-gpio, patches

From: Richard Fitzgerald <rf@opensource.cirrus.com>

As the gpio is common to all madera codecs all that is needed
is to setup the correct number of GPIO pins for the CS47L15.

Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
---
 drivers/gpio/gpio-madera.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/gpio/gpio-madera.c b/drivers/gpio/gpio-madera.c
index fa3441df0a5db..c403899ff4500 100644
--- a/drivers/gpio/gpio-madera.c
+++ b/drivers/gpio/gpio-madera.c
@@ -136,6 +136,9 @@ static int madera_gpio_probe(struct platform_device *pdev)
 	madera_gpio->gpio_chip.parent = pdev->dev.parent;
 
 	switch (madera->type) {
+	case CS47L15:
+		madera_gpio->gpio_chip.ngpio = CS47L15_NUM_GPIOS;
+		break;
 	case CS47L35:
 		madera_gpio->gpio_chip.ngpio = CS47L35_NUM_GPIOS;
 		break;
-- 
2.11.0


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

* [PATCH 4/4] gpio: madera: Add support for Cirrus Logic CS47L92
  2019-07-22  9:07 [PATCH 1/4] gpio: arizona: Use local copy of pdata Charles Keepax
  2019-07-22  9:07 ` [PATCH 2/4] gpio: madera: " Charles Keepax
  2019-07-22  9:07 ` [PATCH 3/4] gpio: madera: Add support for Cirrus Logic CS47L15 Charles Keepax
@ 2019-07-22  9:07 ` Charles Keepax
  2019-08-05  9:45   ` Linus Walleij
  2019-08-05  9:42 ` [PATCH 1/4] gpio: arizona: Use local copy of pdata Linus Walleij
  3 siblings, 1 reply; 8+ messages in thread
From: Charles Keepax @ 2019-07-22  9:07 UTC (permalink / raw)
  To: bgolaszewski; +Cc: linus.walleij, linux-gpio, patches

As the gpio is common to all madera codecs all that is needed
is to setup the correct number of GPIO pins for the CS47L92.

Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
---
 drivers/gpio/gpio-madera.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/gpio/gpio-madera.c b/drivers/gpio/gpio-madera.c
index c403899ff4500..7086f8b5388fd 100644
--- a/drivers/gpio/gpio-madera.c
+++ b/drivers/gpio/gpio-madera.c
@@ -150,6 +150,11 @@ static int madera_gpio_probe(struct platform_device *pdev)
 	case CS47L91:
 		madera_gpio->gpio_chip.ngpio = CS47L90_NUM_GPIOS;
 		break;
+	case CS42L92:
+	case CS47L92:
+	case CS47L93:
+		madera_gpio->gpio_chip.ngpio = CS47L92_NUM_GPIOS;
+		break;
 	default:
 		dev_err(&pdev->dev, "Unknown chip variant %d\n", madera->type);
 		return -EINVAL;
-- 
2.11.0


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

* Re: [PATCH 1/4] gpio: arizona: Use local copy of pdata
  2019-07-22  9:07 [PATCH 1/4] gpio: arizona: Use local copy of pdata Charles Keepax
                   ` (2 preceding siblings ...)
  2019-07-22  9:07 ` [PATCH 4/4] gpio: madera: Add support for Cirrus Logic CS47L92 Charles Keepax
@ 2019-08-05  9:42 ` Linus Walleij
  3 siblings, 0 replies; 8+ messages in thread
From: Linus Walleij @ 2019-08-05  9:42 UTC (permalink / raw)
  To: Charles Keepax; +Cc: Bartosz Golaszewski, open list:GPIO SUBSYSTEM, patches

On Mon, Jul 22, 2019 at 11:07 AM Charles Keepax
<ckeepax@opensource.cirrus.com> wrote:

> A local copy of the pdata exists and it should be used rather than
> pulling a fresh copy.
>
> Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>

Patch applied.

Yours,
Linus Walleij

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

* Re: [PATCH 2/4] gpio: madera: Use local copy of pdata
  2019-07-22  9:07 ` [PATCH 2/4] gpio: madera: " Charles Keepax
@ 2019-08-05  9:43   ` Linus Walleij
  0 siblings, 0 replies; 8+ messages in thread
From: Linus Walleij @ 2019-08-05  9:43 UTC (permalink / raw)
  To: Charles Keepax; +Cc: Bartosz Golaszewski, open list:GPIO SUBSYSTEM, patches

On Mon, Jul 22, 2019 at 11:07 AM Charles Keepax
<ckeepax@opensource.cirrus.com> wrote:

> A local copy of the pdata exists and it should be used rather than
> pulling a fresh copy.
>
> Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>

Patch applied.

Yours,
Linus Walleij

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

* Re: [PATCH 3/4] gpio: madera: Add support for Cirrus Logic CS47L15
  2019-07-22  9:07 ` [PATCH 3/4] gpio: madera: Add support for Cirrus Logic CS47L15 Charles Keepax
@ 2019-08-05  9:45   ` Linus Walleij
  0 siblings, 0 replies; 8+ messages in thread
From: Linus Walleij @ 2019-08-05  9:45 UTC (permalink / raw)
  To: Charles Keepax; +Cc: Bartosz Golaszewski, open list:GPIO SUBSYSTEM, patches

On Mon, Jul 22, 2019 at 11:07 AM Charles Keepax
<ckeepax@opensource.cirrus.com> wrote:

> From: Richard Fitzgerald <rf@opensource.cirrus.com>
>
> As the gpio is common to all madera codecs all that is needed
> is to setup the correct number of GPIO pins for the CS47L15.
>
> Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
> Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>

Patch applied.

Yours,
Linus Walleij

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

* Re: [PATCH 4/4] gpio: madera: Add support for Cirrus Logic CS47L92
  2019-07-22  9:07 ` [PATCH 4/4] gpio: madera: Add support for Cirrus Logic CS47L92 Charles Keepax
@ 2019-08-05  9:45   ` Linus Walleij
  0 siblings, 0 replies; 8+ messages in thread
From: Linus Walleij @ 2019-08-05  9:45 UTC (permalink / raw)
  To: Charles Keepax; +Cc: Bartosz Golaszewski, open list:GPIO SUBSYSTEM, patches

On Mon, Jul 22, 2019 at 11:07 AM Charles Keepax
<ckeepax@opensource.cirrus.com> wrote:

> As the gpio is common to all madera codecs all that is needed
> is to setup the correct number of GPIO pins for the CS47L92.
>
> Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>

Patch applied.

Yours,
Linus Walleij

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

end of thread, other threads:[~2019-08-05  9:46 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-22  9:07 [PATCH 1/4] gpio: arizona: Use local copy of pdata Charles Keepax
2019-07-22  9:07 ` [PATCH 2/4] gpio: madera: " Charles Keepax
2019-08-05  9:43   ` Linus Walleij
2019-07-22  9:07 ` [PATCH 3/4] gpio: madera: Add support for Cirrus Logic CS47L15 Charles Keepax
2019-08-05  9:45   ` Linus Walleij
2019-07-22  9:07 ` [PATCH 4/4] gpio: madera: Add support for Cirrus Logic CS47L92 Charles Keepax
2019-08-05  9:45   ` Linus Walleij
2019-08-05  9:42 ` [PATCH 1/4] gpio: arizona: Use local copy of pdata Linus Walleij

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).