[PATCH 2/2] gpio: gpio-generic: add dt support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Antony Pavlov <antonynpavlov@xxxxxxxxx>
---
 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@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox



[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux