[PATCH 08/15] ARM: MXS: ocotp: Add devicetree support

Sascha Hauer s.hauer at pengutronix.de
Tue Jan 27 23:32:12 PST 2015


Add the device tree compatible strings.

Signed-off-by: Sascha Hauer <s.hauer at pengutronix.de>
---
 arch/arm/mach-mxs/ocotp.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/arch/arm/mach-mxs/ocotp.c b/arch/arm/mach-mxs/ocotp.c
index abdd445..2029b90 100644
--- a/arch/arm/mach-mxs/ocotp.c
+++ b/arch/arm/mach-mxs/ocotp.c
@@ -207,9 +207,18 @@ static int mxs_ocotp_probe(struct device_d *dev)
 	return 0;
 }
 
+static __maybe_unused struct of_device_id mxs_ocotp_compatible[] = {
+	{
+		.compatible = "fsl,ocotp",
+	}, {
+		/* sentinel */
+	}
+};
+
 static struct driver_d mxs_ocotp_driver = {
 	.name	= DRIVERNAME,
 	.probe	= mxs_ocotp_probe,
+	.of_compatible = DRV_OF_COMPAT(mxs_ocotp_compatible),
 };
 
 static int mxs_ocotp_init(void)
-- 
2.1.4




More information about the barebox mailing list