mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH v2 0/2] gpio: gpio-generic: add dt support
@ 2017-09-07  9:34 Antony Pavlov
  2017-09-07  9:34 ` [PATCH v2 1/2] gpio: gpio-generic: fix bgpio_map() Antony Pavlov
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Antony Pavlov @ 2017-09-07  9:34 UTC (permalink / raw)
  To: barebox

Changes since v1:

  * fix 'gpio: gpio-generic: fix bgpio_map()' according to Sascha's remark
    see http://lists.infradead.org/pipermail/barebox/2017-September/031044.html for details.


Antony Pavlov (2):
  gpio: gpio-generic: fix bgpio_map()
  gpio: gpio-generic: add dt support

 drivers/gpio/gpio-generic.c | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)

-- 
2.14.1


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

* [PATCH v2 1/2] gpio: gpio-generic: fix bgpio_map()
  2017-09-07  9:34 [PATCH v2 0/2] gpio: gpio-generic: add dt support Antony Pavlov
@ 2017-09-07  9:34 ` Antony Pavlov
  2017-09-07  9:34 ` [PATCH v2 2/2] gpio: gpio-generic: add dt support Antony Pavlov
  2017-09-08  6:27 ` [PATCH v2 0/2] " Sascha Hauer
  2 siblings, 0 replies; 4+ messages in thread
From: Antony Pavlov @ 2017-09-07  9:34 UTC (permalink / raw)
  To: barebox

Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
---
 drivers/gpio/gpio-generic.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpio/gpio-generic.c b/drivers/gpio/gpio-generic.c
index c6202fc651..01a66d6645 100644
--- a/drivers/gpio/gpio-generic.c
+++ b/drivers/gpio/gpio-generic.c
@@ -308,7 +308,7 @@ static void __iomem *bgpio_map(struct device_d *dev, const char *name,
 			       resource_size_t sane_sz, int *err)
 {
 	struct resource *r;
-	void __iomem *ret;
+	struct resource *ret;
 
 	*err = 0;
 
@@ -327,7 +327,7 @@ static void __iomem *bgpio_map(struct device_d *dev, const char *name,
 		return NULL;
 	}
 
-	return ret;
+	return IOMEM(ret->start);
 }
 
 static int bgpio_dev_probe(struct device_d *dev)
-- 
2.14.1


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

* [PATCH v2 2/2] gpio: gpio-generic: add dt support
  2017-09-07  9:34 [PATCH v2 0/2] gpio: gpio-generic: add dt support Antony Pavlov
  2017-09-07  9:34 ` [PATCH v2 1/2] gpio: gpio-generic: fix bgpio_map() Antony Pavlov
@ 2017-09-07  9:34 ` Antony Pavlov
  2017-09-08  6:27 ` [PATCH v2 0/2] " Sascha Hauer
  2 siblings, 0 replies; 4+ messages in thread
From: Antony Pavlov @ 2017-09-07  9:34 UTC (permalink / raw)
  To: barebox

Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
---
 drivers/gpio/gpio-generic.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/drivers/gpio/gpio-generic.c b/drivers/gpio/gpio-generic.c
index 01a66d6645..14b451bfff 100644
--- a/drivers/gpio/gpio-generic.c
+++ b/drivers/gpio/gpio-generic.c
@@ -410,9 +410,18 @@ static struct platform_device_id bgpio_id_table[] = {
 	{ }
 };
 
+static struct of_device_id __maybe_unused bgpio_of_match[] = {
+	{
+		.compatible = "wd,mbl-gpio",
+	}, {
+		/* sentinel */
+	}
+};
+
 static struct driver_d bgpio_driver = {
 	.name		= "basic-mmio-gpio",
 	.id_table	= bgpio_id_table,
+	.of_compatible	= DRV_OF_COMPAT(bgpio_of_match),
 	.probe		= bgpio_dev_probe,
 	.remove		= bgpio_dev_remove,
 };
-- 
2.14.1


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

* Re: [PATCH v2 0/2] gpio: gpio-generic: add dt support
  2017-09-07  9:34 [PATCH v2 0/2] gpio: gpio-generic: add dt support Antony Pavlov
  2017-09-07  9:34 ` [PATCH v2 1/2] gpio: gpio-generic: fix bgpio_map() Antony Pavlov
  2017-09-07  9:34 ` [PATCH v2 2/2] gpio: gpio-generic: add dt support Antony Pavlov
@ 2017-09-08  6:27 ` Sascha Hauer
  2 siblings, 0 replies; 4+ messages in thread
From: Sascha Hauer @ 2017-09-08  6:27 UTC (permalink / raw)
  To: Antony Pavlov; +Cc: barebox

On Thu, Sep 07, 2017 at 12:34:36PM +0300, Antony Pavlov wrote:
> Changes since v1:
> 
>   * fix 'gpio: gpio-generic: fix bgpio_map()' according to Sascha's remark
>     see http://lists.infradead.org/pipermail/barebox/2017-September/031044.html for details.
> 
> 
> Antony Pavlov (2):
>   gpio: gpio-generic: fix bgpio_map()
>   gpio: gpio-generic: add dt support
> 
>  drivers/gpio/gpio-generic.c | 13 +++++++++++--
>  1 file changed, 11 insertions(+), 2 deletions(-)
> 

Applied, thanks

Sascha

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

end of thread, other threads:[~2017-09-08  6:27 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-09-07  9:34 [PATCH v2 0/2] gpio: gpio-generic: add dt support Antony Pavlov
2017-09-07  9:34 ` [PATCH v2 1/2] gpio: gpio-generic: fix bgpio_map() Antony Pavlov
2017-09-07  9:34 ` [PATCH v2 2/2] gpio: gpio-generic: add dt support Antony Pavlov
2017-09-08  6:27 ` [PATCH v2 0/2] " Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox