linux-i2c.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH RESEND] i2c: Add Device Tree support to versatile-i2c driver
@ 2012-02-23 18:17 Pawel Moll
       [not found] ` <1330021041-29782-1-git-send-email-pawel.moll-5wv7dgnIgG8@public.gmane.org>
  0 siblings, 1 reply; 4+ messages in thread
From: Pawel Moll @ 2012-02-23 18:17 UTC (permalink / raw)
  To: ben-linux-elnMNo+KYs3YtjvyW6yDsg, w.sang-bIcnvbaLZ9MEGnE8C9+IrQ
  Cc: linux-i2c-u79uwXL29TY76Z2rM5mHXA, Pawel Moll

This patch adds Device Tree binding ("arm,versatile-i2c") and
basic support (bus population) to versatile-i2c driver.

Signed-off-by: Pawel Moll <pawel.moll-5wv7dgnIgG8@public.gmane.org>
---
 drivers/i2c/busses/i2c-versatile.c |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)

Ben, Wolfram,

Could I just gently remind about this small patch?

It's been a while since I posted it for 3.2, then 3.3,
(http://thread.gmane.org/gmane.linux.drivers.i2c/9108)
but nothing happened. Could we get it in for 3.4 then?

Thanks!

Pawel

diff --git a/drivers/i2c/busses/i2c-versatile.c b/drivers/i2c/busses/i2c-versatile.c
index 6055601..7bfdf40 100644
--- a/drivers/i2c/busses/i2c-versatile.c
+++ b/drivers/i2c/busses/i2c-versatile.c
@@ -16,6 +16,7 @@
 #include <linux/platform_device.h>
 #include <linux/slab.h>
 #include <linux/io.h>
+#include <linux/of_i2c.h>
 
 #define I2C_CONTROL	0x00
 #define I2C_CONTROLS	0x00
@@ -99,6 +100,7 @@ static int i2c_versatile_probe(struct platform_device *dev)
 	strlcpy(i2c->adap.name, "Versatile I2C adapter", sizeof(i2c->adap.name));
 	i2c->adap.algo_data = &i2c->algo;
 	i2c->adap.dev.parent = &dev->dev;
+	i2c->adap.dev.of_node = dev->dev.of_node;
 	i2c->algo = i2c_versatile_algo;
 	i2c->algo.data = i2c;
 
@@ -111,6 +113,7 @@ static int i2c_versatile_probe(struct platform_device *dev)
 		ret = i2c_bit_add_bus(&i2c->adap);
 	if (ret >= 0) {
 		platform_set_drvdata(dev, i2c);
+		of_i2c_register_devices(&i2c->adap);
 		return 0;
 	}
 
@@ -133,12 +136,19 @@ static int i2c_versatile_remove(struct platform_device *dev)
 	return 0;
 }
 
+static struct of_device_id i2c_versatile_match[] = {
+	{ .compatible = "arm,versatile-i2c", },
+	{},
+};
+MODULE_DEVICE_TABLE(of, i2c_versatile_match);
+
 static struct platform_driver i2c_versatile_driver = {
 	.probe		= i2c_versatile_probe,
 	.remove		= i2c_versatile_remove,
 	.driver		= {
 		.name	= "versatile-i2c",
 		.owner	= THIS_MODULE,
+		.of_match_table = i2c_versatile_match,
 	},
 };
 
-- 
1.7.5.4

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH RESEND] i2c: Add Device Tree support to versatile-i2c driver
       [not found] ` <1330021041-29782-1-git-send-email-pawel.moll-5wv7dgnIgG8@public.gmane.org>
@ 2012-02-23 20:17   ` Wolfram Sang
  2012-02-24 10:58   ` Wolfram Sang
  1 sibling, 0 replies; 4+ messages in thread
From: Wolfram Sang @ 2012-02-23 20:17 UTC (permalink / raw)
  To: Pawel Moll
  Cc: ben-linux-elnMNo+KYs3YtjvyW6yDsg,
	linux-i2c-u79uwXL29TY76Z2rM5mHXA

[-- Attachment #1: Type: text/plain, Size: 834 bytes --]

On Thu, Feb 23, 2012 at 06:17:21PM +0000, Pawel Moll wrote:
> This patch adds Device Tree binding ("arm,versatile-i2c") and
> basic support (bus population) to versatile-i2c driver.
> 
> Signed-off-by: Pawel Moll <pawel.moll-5wv7dgnIgG8@public.gmane.org>
> ---
>  drivers/i2c/busses/i2c-versatile.c |   10 ++++++++++
>  1 files changed, 10 insertions(+), 0 deletions(-)
> 
> Ben, Wolfram,
> 
> Could I just gently remind about this small patch?
> 
> It's been a while since I posted it for 3.2, then 3.3,
> (http://thread.gmane.org/gmane.linux.drivers.i2c/9108)
> but nothing happened. Could we get it in for 3.4 then?

Thanks for resending. I'll check it.

-- 
Pengutronix e.K.                           | Wolfram Sang                |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH RESEND] i2c: Add Device Tree support to versatile-i2c driver
       [not found] ` <1330021041-29782-1-git-send-email-pawel.moll-5wv7dgnIgG8@public.gmane.org>
  2012-02-23 20:17   ` Wolfram Sang
@ 2012-02-24 10:58   ` Wolfram Sang
       [not found]     ` <20120224105804.GA2479-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
  1 sibling, 1 reply; 4+ messages in thread
From: Wolfram Sang @ 2012-02-24 10:58 UTC (permalink / raw)
  To: Pawel Moll
  Cc: ben-linux-elnMNo+KYs3YtjvyW6yDsg,
	linux-i2c-u79uwXL29TY76Z2rM5mHXA

[-- Attachment #1: Type: text/plain, Size: 382 bytes --]


> +static struct of_device_id i2c_versatile_match[] = {
> +	{ .compatible = "arm,versatile-i2c", },
> +	{},
> +};
> +MODULE_DEVICE_TABLE(of, i2c_versatile_match);

const here, but I fixed it up already.

Thanks.

-- 
Pengutronix e.K.                           | Wolfram Sang                |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH RESEND] i2c: Add Device Tree support to versatile-i2c driver
       [not found]     ` <20120224105804.GA2479-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
@ 2012-02-24 14:52       ` Pawel Moll
  0 siblings, 0 replies; 4+ messages in thread
From: Pawel Moll @ 2012-02-24 14:52 UTC (permalink / raw)
  To: Wolfram Sang
  Cc: ben-linux-elnMNo+KYs3YtjvyW6yDsg@public.gmane.org,
	linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org

On Fri, 2012-02-24 at 10:58 +0000, Wolfram Sang wrote:
> > +static struct of_device_id i2c_versatile_match[] = {
> > +	{ .compatible = "arm,versatile-i2c", },
> > +	{},
> > +};
> > +MODULE_DEVICE_TABLE(of, i2c_versatile_match);
> 
> const here, but I fixed it up already.

Sure thing, thanks!

Paweł

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-02-24 14:52 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-02-23 18:17 [PATCH RESEND] i2c: Add Device Tree support to versatile-i2c driver Pawel Moll
     [not found] ` <1330021041-29782-1-git-send-email-pawel.moll-5wv7dgnIgG8@public.gmane.org>
2012-02-23 20:17   ` Wolfram Sang
2012-02-24 10:58   ` Wolfram Sang
     [not found]     ` <20120224105804.GA2479-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2012-02-24 14:52       ` Pawel Moll

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).