mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Antony Pavlov <antonynpavlov@gmail.com>
To: barebox@lists.infradead.org
Subject: [PATCH 2/4] i2c: versatile: add devicetree support
Date: Fri, 20 Jun 2014 01:28:38 +0400	[thread overview]
Message-ID: <1403213320-28750-3-git-send-email-antonynpavlov@gmail.com> (raw)
In-Reply-To: <1403213320-28750-1-git-send-email-antonynpavlov@gmail.com>

Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
---
 drivers/i2c/busses/i2c-versatile.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/drivers/i2c/busses/i2c-versatile.c b/drivers/i2c/busses/i2c-versatile.c
index d395e1d..4fead61 100644
--- a/drivers/i2c/busses/i2c-versatile.c
+++ b/drivers/i2c/busses/i2c-versatile.c
@@ -84,6 +84,7 @@ static int i2c_versatile_probe(struct device_d *dev)
 
 	i2c->adap.algo_data = &i2c->algo;
 	i2c->adap.dev.parent = dev;
+	i2c->adap.dev.device_node = dev->device_node;
 	i2c->algo = i2c_versatile_algo;
 	i2c->algo.data = i2c;
 
@@ -99,8 +100,14 @@ static int i2c_versatile_probe(struct device_d *dev)
 	return ret;
 }
 
+static struct of_device_id i2c_versatile_match[] = {
+	{ .compatible = "arm,versatile-i2c", },
+	{},
+};
+
 static struct driver_d i2c_versatile_driver = {
 	.name	= "versatile-i2c",
 	.probe	= i2c_versatile_probe,
+	.of_compatible = DRV_OF_COMPAT(i2c_versatile_match),
 };
 device_platform_driver(i2c_versatile_driver);
-- 
1.9.2


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  parent reply	other threads:[~2014-06-19 21:29 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-19 21:28 [PATCH 0/4] ARM: versatile: switch to " Antony Pavlov
2014-06-19 21:28 ` [PATCH 1/4] ARM: versatile: drop redundant <mach/gpio.h> Antony Pavlov
2014-06-19 21:28 ` Antony Pavlov [this message]
2014-06-19 21:28 ` [PATCH 3/4] ARM: versatile: switch to devicetree support Antony Pavlov
2014-06-19 21:28 ` [PATCH 4/4] ARM: versatilepb_defconfig: enable " Antony Pavlov
2014-06-23  6:46 ` [PATCH 0/4] ARM: versatile: switch to " Sascha Hauer

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=1403213320-28750-3-git-send-email-antonynpavlov@gmail.com \
    --to=antonynpavlov@gmail.com \
    --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