gpio: gpio-generic: add dt support
cover gpio: gpio-generic: add dt support
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(-)
Signature · 7 lines
2.13.3 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
PATCH 2/2 gpio: gpio-generic: add dt support
Signed-off-by Antony Pavlov <[email protected]>
--- drivers/gpio/gpio-generic.c | 9 +++++++++ 1 file changed, 9 insertions(+)
drivers/gpio/gpio-generic.c +9 -0
@@ -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, };
Signature · 7 lines
2.13.3 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
PATCH 1/2 gpio: gpio-generic: fix bgpio_map()
In reply to Antony PavlovSigned-off-by Antony Pavlov <[email protected]>
--- drivers/gpio/gpio-generic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpio/gpio-generic.c +1 -1
@@ -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)
Signature · 7 lines
2.13.3 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
Re: [PATCH 1/2] gpio: gpio-generic: fix bgpio_map()
Quoted 10 lines · Antony Pavlov
Signed-off-by Antony Pavlov <[email protected]>--- drivers/gpio/gpio-generic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/gpio/gpio-generic.c +0
-0
drivers/gpio/gpio-generic.c static void __iomem *bgpio_map(struct device_d *dev, const char *name, · line 331
Quoted 6 lines
drivers/gpio/gpio-generic.c +1
-1@@ -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
Signature · 9 lines
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 [email protected] http://lists.infradead.org/mailman/listinfo/barebox