linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] GPIO: gpio-generic: Add label to platform data
@ 2014-01-30 13:18 Pawel Moll
  2014-02-04 20:52 ` Linus Walleij
  0 siblings, 1 reply; 2+ messages in thread
From: Pawel Moll @ 2014-01-30 13:18 UTC (permalink / raw)
  To: Linus Walleij, Alexandre Courbot
  Cc: Anton Vorontsov, Andreas Larsson, linux-gpio, Pawel Moll

When registering more than one platform device, it is
useful to set the gpio chip label in the platform data.

Signed-off-by: Pawel Moll <pawel.moll@arm.com>
---
 drivers/gpio/gpio-generic.c     | 2 ++
 include/linux/basic_mmio_gpio.h | 1 +
 2 files changed, 3 insertions(+)

diff --git a/drivers/gpio/gpio-generic.c b/drivers/gpio/gpio-generic.c
index d2196bf..8c778af 100644
--- a/drivers/gpio/gpio-generic.c
+++ b/drivers/gpio/gpio-generic.c
@@ -531,6 +531,8 @@ static int bgpio_pdev_probe(struct platform_device *pdev)
 		return err;
 
 	if (pdata) {
+		if (pdata->label)
+			bgc->gc.label = pdata->label;
 		bgc->gc.base = pdata->base;
 		if (pdata->ngpio > 0)
 			bgc->gc.ngpio = pdata->ngpio;
diff --git a/include/linux/basic_mmio_gpio.h b/include/linux/basic_mmio_gpio.h
index d8a97ec..0e97856 100644
--- a/include/linux/basic_mmio_gpio.h
+++ b/include/linux/basic_mmio_gpio.h
@@ -19,6 +19,7 @@
 #include <linux/spinlock_types.h>
 
 struct bgpio_pdata {
+	const char *label;
 	int base;
 	int ngpio;
 };
-- 
1.8.3.2


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

* Re: [PATCH] GPIO: gpio-generic: Add label to platform data
  2014-01-30 13:18 [PATCH] GPIO: gpio-generic: Add label to platform data Pawel Moll
@ 2014-02-04 20:52 ` Linus Walleij
  0 siblings, 0 replies; 2+ messages in thread
From: Linus Walleij @ 2014-02-04 20:52 UTC (permalink / raw)
  To: Pawel Moll
  Cc: Alexandre Courbot, Anton Vorontsov, Andreas Larsson,
	linux-gpio@vger.kernel.org

On Thu, Jan 30, 2014 at 2:18 PM, Pawel Moll <pawel.moll@arm.com> wrote:

> When registering more than one platform device, it is
> useful to set the gpio chip label in the platform data.
>
> Signed-off-by: Pawel Moll <pawel.moll@arm.com>

Patch applied.

Yours,
Linus Walleij

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

end of thread, other threads:[~2014-02-04 20:52 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-01-30 13:18 [PATCH] GPIO: gpio-generic: Add label to platform data Pawel Moll
2014-02-04 20:52 ` 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).