gpio: gpio-generic: add dt support
v2 cover gpio: gpio-generic: add dt support
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(-)
Signature · 7 lines
2.14.1 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
PATCH v2 1/2 gpio: gpio-generic: fix bgpio_map()
Signed-off-by Antony Pavlov <[email protected]>
--- drivers/gpio/gpio-generic.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpio/gpio-generic.c +2 -2
@@ -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)
Signature · 7 lines
2.14.1 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
PATCH v2 2/2 gpio: gpio-generic: add dt support
In reply to Antony PavlovSigned-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.14.1 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
Sascha Hauer
AppliedQuoted 6 lines · Antony Pavlov
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.
Quoted 7 lines
Antony Pavlov (2):
gpio: gpio-generic: fixbgpio_map()
gpio: gpio-generic: add dt supportdrivers/gpio/gpio-generic.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-)
Applied, thanks
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