* [PATCH 0/2] gpio: gpio-generic: add dt support
@ 2017-09-05 7:22 Antony Pavlov
2017-09-05 7:22 ` [PATCH 1/2] gpio: gpio-generic: fix bgpio_map() Antony Pavlov
2017-09-05 7:22 ` [PATCH 2/2] gpio: gpio-generic: add dt support Antony Pavlov
0 siblings, 2 replies; 4+ messages in thread
From: Antony Pavlov @ 2017-09-05 7:22 UTC (permalink / raw)
To: barebox
Antony Pavlov (2):
gpio: gpio-generic: fix bgpio_map()
gpio: gpio-generic: add dt support
drivers/gpio/gpio-generic.c | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
--
2.13.3
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH 1/2] gpio: gpio-generic: fix bgpio_map()
2017-09-05 7:22 [PATCH 0/2] gpio: gpio-generic: add dt support Antony Pavlov
@ 2017-09-05 7:22 ` Antony Pavlov
2017-09-06 12:37 ` Sascha Hauer
2017-09-05 7:22 ` [PATCH 2/2] gpio: gpio-generic: add dt support Antony Pavlov
1 sibling, 1 reply; 4+ messages in thread
From: Antony Pavlov @ 2017-09-05 7:22 UTC (permalink / raw)
To: barebox
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
---
drivers/gpio/gpio-generic.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpio/gpio-generic.c b/drivers/gpio/gpio-generic.c
index c6202fc651..164aaed97a 100644
--- a/drivers/gpio/gpio-generic.c
+++ b/drivers/gpio/gpio-generic.c
@@ -327,7 +327,7 @@ static void __iomem *bgpio_map(struct device_d *dev, const char *name,
return NULL;
}
- return ret;
+ return IOMEM(r->start);
}
static int bgpio_dev_probe(struct device_d *dev)
--
2.13.3
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH 2/2] gpio: gpio-generic: add dt support
2017-09-05 7:22 [PATCH 0/2] gpio: gpio-generic: add dt support Antony Pavlov
2017-09-05 7:22 ` [PATCH 1/2] gpio: gpio-generic: fix bgpio_map() Antony Pavlov
@ 2017-09-05 7:22 ` Antony Pavlov
1 sibling, 0 replies; 4+ messages in thread
From: Antony Pavlov @ 2017-09-05 7:22 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 164aaed97a..4d8f14c879 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.13.3
_______________________________________________
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 1/2] gpio: gpio-generic: fix bgpio_map()
2017-09-05 7:22 ` [PATCH 1/2] gpio: gpio-generic: fix bgpio_map() Antony Pavlov
@ 2017-09-06 12:37 ` Sascha Hauer
0 siblings, 0 replies; 4+ messages in thread
From: Sascha Hauer @ 2017-09-06 12:37 UTC (permalink / raw)
To: Antony Pavlov; +Cc: barebox
On Tue, Sep 05, 2017 at 10:22:36AM +0300, Antony Pavlov wrote:
> Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
> ---
> drivers/gpio/gpio-generic.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpio/gpio-generic.c b/drivers/gpio/gpio-generic.c
> index c6202fc651..164aaed97a 100644
> --- a/drivers/gpio/gpio-generic.c
> +++ b/drivers/gpio/gpio-generic.c
> @@ -327,7 +327,7 @@ static void __iomem *bgpio_map(struct device_d *dev, const char *name,
> return NULL;
> }
>
> - return ret;
> + return IOMEM(r->start);
> }
This still looks wrong. We have:
void __iomem *ret;
...
ret = request_iomem_region(dev_name(dev), r->start, r->end);
request_iomem_region() returns a struct resource * from which you should
return the start element.
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-06 12:37 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-09-05 7:22 [PATCH 0/2] gpio: gpio-generic: add dt support Antony Pavlov
2017-09-05 7:22 ` [PATCH 1/2] gpio: gpio-generic: fix bgpio_map() Antony Pavlov
2017-09-06 12:37 ` Sascha Hauer
2017-09-05 7:22 ` [PATCH 2/2] gpio: gpio-generic: add dt support Antony Pavlov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox