From: Sascha Hauer <s.hauer@pengutronix.de>
To: barebox@lists.infradead.org
Subject: [PATCH 5/5] i2c: fsl: Add devicetree probe support
Date: Mon, 20 May 2013 22:11:24 +0200 [thread overview]
Message-ID: <1369080684-11138-6-git-send-email-s.hauer@pengutronix.de> (raw)
In-Reply-To: <1369080684-11138-1-git-send-email-s.hauer@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
drivers/i2c/busses/i2c-imx.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/drivers/i2c/busses/i2c-imx.c b/drivers/i2c/busses/i2c-imx.c
index 9fcfd5c..c607bcb 100644
--- a/drivers/i2c/busses/i2c-imx.c
+++ b/drivers/i2c/busses/i2c-imx.c
@@ -545,6 +545,7 @@ static int __init i2c_fsl_probe(struct device_d *pdev)
i2c_fsl->adapter.master_xfer = i2c_fsl_xfer;
i2c_fsl->adapter.nr = pdev->id;
i2c_fsl->adapter.dev.parent = pdev;
+ i2c_fsl->adapter.dev.device_node = pdev->device_node;
i2c_fsl->base = dev_request_mem_region(pdev, 0);
i2c_fsl->dfsrr = -1;
@@ -572,8 +573,17 @@ fail:
return ret;
}
+static __maybe_unused struct of_device_id imx_i2c_dt_ids[] = {
+ {
+ .compatible = "fsl,imx21-i2c",
+ }, {
+ /* sentinel */
+ }
+};
+
static struct driver_d i2c_fsl_driver = {
.probe = i2c_fsl_probe,
.name = DRIVER_NAME,
+ .of_compatible = DRV_OF_COMPAT(imx_i2c_dt_ids),
};
device_platform_driver(i2c_fsl_driver);
--
1.8.2.rc2
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
prev parent reply other threads:[~2013-05-20 20:11 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-20 20:11 Sascha Hauer
2013-05-20 20:11 ` [PATCH 1/5] i2c: Add missing result check Sascha Hauer
2013-05-20 20:11 ` [PATCH 2/5] i2c: remove dead code Sascha Hauer
2013-05-20 20:11 ` [PATCH 3/5] i2c: Add support for dynamic i2c bus numbers Sascha Hauer
2013-05-20 22:27 ` [SPAM] " Jean-Christophe PLAGNIOL-VILLARD
2013-05-21 6:49 ` Sascha Hauer
2013-05-20 20:11 ` [PATCH 4/5] i2c: Add devicetree support Sascha Hauer
2013-05-20 20:11 ` Sascha Hauer [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1369080684-11138-6-git-send-email-s.hauer@pengutronix.de \
--to=s.hauer@pengutronix.de \
--cc=barebox@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox