[PATCH 2/2] gpio: gpio-generic: add dt support
Antony Pavlov
antonynpavlov at gmail.com
Tue Sep 5 00:22:37 PDT 2017
Signed-off-by: Antony Pavlov <antonynpavlov at 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
More information about the barebox
mailing list