From: "Jayachandran C" <jayachandranc-oSioyQM9ZPnuBjGU1YDckgC/G2K4zDHf@public.gmane.org>
To: linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
w.sang-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org,
ben-linux-elnMNo+KYs3YtjvyW6yDsg@public.gmane.org
Cc: Ganesan Ramalingam
<ganesanr-dY08KVG/lbpWk0Htik3J/w@public.gmane.org>,
Jayachandran C
<jayachandranc-oSioyQM9ZPnuBjGU1YDckgC/G2K4zDHf@public.gmane.org>
Subject: [PATCH 1/2] i2c-ocore: register OF i2c devices
Date: Tue, 8 May 2012 18:55:28 +0530 [thread overview]
Message-ID: <1336483529-19140-2-git-send-email-jayachandranc@netlogicmicro.com> (raw)
In-Reply-To: <1336483529-19140-1-git-send-email-jayachandranc-oSioyQM9ZPnuBjGU1YDckgC/G2K4zDHf@public.gmane.org>
From: Ganesan Ramalingam <ganesanr-dY08KVG/lbpWk0Htik3J/w@public.gmane.org>
Call of_i2c_register_devices() in probe function to register i2c devices
specified in the device tree or OF.
Signed-off-by: Ganesan Ramalingam <ganesanr-dY08KVG/lbpWk0Htik3J/w@public.gmane.org>
Signed-off-by: Jayachandran C <jayachandranc-oSioyQM9ZPnuBjGU1YDckgC/G2K4zDHf@public.gmane.org>
---
drivers/i2c/busses/i2c-ocores.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/i2c/busses/i2c-ocores.c b/drivers/i2c/busses/i2c-ocores.c
index 18068de..ebd2700 100644
--- a/drivers/i2c/busses/i2c-ocores.c
+++ b/drivers/i2c/busses/i2c-ocores.c
@@ -55,6 +55,7 @@
#include <linux/i2c-ocores.h>
#include <linux/slab.h>
#include <linux/io.h>
+#include <linux/of_i2c.h>
struct ocores_i2c {
void __iomem *base;
@@ -343,7 +344,9 @@ static int __devinit ocores_i2c_probe(struct platform_device *pdev)
if (pdata) {
for (i = 0; i < pdata->num_devices; i++)
i2c_new_device(&i2c->adap, pdata->devices + i);
- }
+ } else
+ of_i2c_register_devices(&i2c->adap);
+
return 0;
}
--
1.7.9.5
next prev parent reply other threads:[~2012-05-08 13:25 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-08 13:25 [PATCH 0/2] i2c: open cores I2C changes for XLP Jayachandran C
[not found] ` <1336483529-19140-1-git-send-email-jayachandranc-oSioyQM9ZPnuBjGU1YDckgC/G2K4zDHf@public.gmane.org>
2012-05-08 13:25 ` Jayachandran C [this message]
[not found] ` <1336483529-19140-2-git-send-email-jayachandranc-oSioyQM9ZPnuBjGU1YDckgC/G2K4zDHf@public.gmane.org>
2012-05-12 14:52 ` [PATCH 1/2] i2c-ocore: register OF i2c devices Wolfram Sang
[not found] ` <20120512145205.GL20673-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2012-05-28 21:31 ` Peter Korsgaard
2012-05-08 13:25 ` [PATCH 2/2] i2c-ocore: support 16 and 32-bit wide registers Jayachandran C
[not found] ` <1336483529-19140-3-git-send-email-jayachandranc-oSioyQM9ZPnuBjGU1YDckgC/G2K4zDHf@public.gmane.org>
2012-05-08 16:58 ` Shubhrajyoti Datta
[not found] ` <CAM=Q2cuYCQu1McDD=otyyBFSG8Tw974Y146tAswZ3dD+USkiTw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-05-12 5:37 ` Jayachandran C.
2012-05-12 14:56 ` Wolfram Sang
[not found] ` <20120512145648.GM20673-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2012-05-13 11:39 ` Jayachandran C.
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=1336483529-19140-2-git-send-email-jayachandranc@netlogicmicro.com \
--to=jayachandranc-osioyqm9zpnubjgu1ydckgc/g2k4zdhf@public.gmane.org \
--cc=ben-linux-elnMNo+KYs3YtjvyW6yDsg@public.gmane.org \
--cc=ganesanr-dY08KVG/lbpWk0Htik3J/w@public.gmane.org \
--cc=linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=w.sang-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.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;
as well as URLs for NNTP newsgroup(s).