* [PATCH 4/8] i2c: omap: Fix missing device tree flags for omap2
[not found] ` <1384396537-3486-1-git-send-email-tony-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.org>
@ 2013-11-14 2:35 ` Tony Lindgren
[not found] ` <1384396537-3486-5-git-send-email-tony-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.org>
0 siblings, 1 reply; 11+ messages in thread
From: Tony Lindgren @ 2013-11-14 2:35 UTC (permalink / raw)
To: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
linux-omap-u79uwXL29TY76Z2rM5mHXA
Cc: Wolfram Sang, linux-i2c-u79uwXL29TY76Z2rM5mHXA
As we claim to support device tree for mach-omap2, we
should have the necessary flags in the driver to make it
usable.
Cc: Wolfram Sang <wsa-z923LK4zBo2bacvFa/9K2g@public.gmane.org>
Cc: linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Signed-off-by: Tony Lindgren <tony-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.org>
---
If this looks OK, I'd like to merge this as a fix via arm-soc tree
along with the other patches in this series as my later patches
depend on patches in this series.
---
drivers/i2c/busses/i2c-omap.c | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)
diff --git a/drivers/i2c/busses/i2c-omap.c b/drivers/i2c/busses/i2c-omap.c
index 9967a6f..f04afd1 100644
--- a/drivers/i2c/busses/i2c-omap.c
+++ b/drivers/i2c/busses/i2c-omap.c
@@ -1037,6 +1037,20 @@ static const struct i2c_algorithm omap_i2c_algo = {
};
#ifdef CONFIG_OF
+static struct omap_i2c_bus_platform_data omap2420_pdata = {
+ .rev = OMAP_I2C_IP_VERSION_1,
+ .flags = OMAP_I2C_FLAG_NO_FIFO |
+ OMAP_I2C_FLAG_SIMPLE_CLOCK |
+ OMAP_I2C_FLAG_16BIT_DATA_REG |
+ OMAP_I2C_FLAG_BUS_SHIFT_2,
+};
+
+static struct omap_i2c_bus_platform_data omap2430_pdata = {
+ .rev = OMAP_I2C_IP_VERSION_1,
+ .flags = OMAP_I2C_FLAG_BUS_SHIFT_2 |
+ OMAP_I2C_FLAG_FORCE_19200_INT_CLK,
+};
+
static struct omap_i2c_bus_platform_data omap3_pdata = {
.rev = OMAP_I2C_IP_VERSION_1,
.flags = OMAP_I2C_FLAG_BUS_SHIFT_2,
@@ -1055,6 +1069,14 @@ static const struct of_device_id omap_i2c_of_match[] = {
.compatible = "ti,omap3-i2c",
.data = &omap3_pdata,
},
+ {
+ .compatible = "ti,omap2430-i2c",
+ .data = &omap2430_pdata,
+ },
+ {
+ .compatible = "ti,omap2420-i2c",
+ .data = &omap2420_pdata,
+ },
{ },
};
MODULE_DEVICE_TABLE(of, omap_i2c_of_match);
--
1.8.1.1
^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [PATCH 4/8] i2c: omap: Fix missing device tree flags for omap2
[not found] ` <1384396537-3486-5-git-send-email-tony-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.org>
@ 2013-11-14 6:58 ` Wolfram Sang
2013-11-14 17:34 ` Tony Lindgren
2013-11-14 11:07 ` Mark Rutland
1 sibling, 1 reply; 11+ messages in thread
From: Wolfram Sang @ 2013-11-14 6:58 UTC (permalink / raw)
To: Tony Lindgren
Cc: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
linux-omap-u79uwXL29TY76Z2rM5mHXA,
linux-i2c-u79uwXL29TY76Z2rM5mHXA
[-- Attachment #1: Type: text/plain, Size: 600 bytes --]
On Wed, Nov 13, 2013 at 06:35:33PM -0800, Tony Lindgren wrote:
> As we claim to support device tree for mach-omap2, we
> should have the necessary flags in the driver to make it
> usable.
>
> Cc: Wolfram Sang <wsa-z923LK4zBo2bacvFa/9K2g@public.gmane.org>
> Cc: linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> Signed-off-by: Tony Lindgren <tony-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.org>
Acked-by: Wolfram Sang <wsa-z923LK4zBo2bacvFa/9K2g@public.gmane.org>
It would have been helpful if the message "PATCH [0/x]" would have been
sent to the i2c-list also.
Thanks,
Wolfram
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 4/8] i2c: omap: Fix missing device tree flags for omap2
[not found] ` <1384396537-3486-5-git-send-email-tony-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.org>
2013-11-14 6:58 ` Wolfram Sang
@ 2013-11-14 11:07 ` Mark Rutland
2013-11-14 17:30 ` Tony Lindgren
1 sibling, 1 reply; 11+ messages in thread
From: Mark Rutland @ 2013-11-14 11:07 UTC (permalink / raw)
To: Tony Lindgren
Cc: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
linux-omap-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Wolfram Sang
On Thu, Nov 14, 2013 at 02:35:33AM +0000, Tony Lindgren wrote:
> As we claim to support device tree for mach-omap2, we
> should have the necessary flags in the driver to make it
> usable.
>
> Cc: Wolfram Sang <wsa-z923LK4zBo2bacvFa/9K2g@public.gmane.org>
> Cc: linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> Signed-off-by: Tony Lindgren <tony-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.org>
> ---
>
> If this looks OK, I'd like to merge this as a fix via arm-soc tree
> along with the other patches in this series as my later patches
> depend on patches in this series.
>
> ---
> drivers/i2c/busses/i2c-omap.c | 22 ++++++++++++++++++++++
> 1 file changed, 22 insertions(+)
[...]
> + {
> + .compatible = "ti,omap2430-i2c",
> + .data = &omap2430_pdata,
> + },
> + {
> + .compatible = "ti,omap2420-i2c",
> + .data = &omap2420_pdata,
Please update Documentation/devicetree/bindings/i2c/i2c-omap.txt
Otherwise, this is fine.
Thanks,
Mark.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 4/8] i2c: omap: Fix missing device tree flags for omap2
2013-11-14 11:07 ` Mark Rutland
@ 2013-11-14 17:30 ` Tony Lindgren
0 siblings, 0 replies; 11+ messages in thread
From: Tony Lindgren @ 2013-11-14 17:30 UTC (permalink / raw)
To: Mark Rutland
Cc: linux-arm-kernel@lists.infradead.org, linux-omap@vger.kernel.org,
linux-i2c@vger.kernel.org, Wolfram Sang
* Mark Rutland <mark.rutland@arm.com> [131114 03:08]:
>
> Please update Documentation/devicetree/bindings/i2c/i2c-omap.txt
>
> Otherwise, this is fine.
Here's this one with updated documentation.
Regards,
Tony
From: Tony Lindgren <tony@atomide.com>
Date: Wed, 13 Nov 2013 16:36:37 -0800
Subject: [PATCH] i2c: omap: Fix missing device tree flags for omap2
As we claim to support device tree for mach-omap2, we
should have the necessary flags in the driver to make it
usable.
Cc: linux-i2c@vger.kernel.org
Acked-by: Wolfram Sang <wsa@the-dreams.de>
Signed-off-by: Tony Lindgren <tony@atomide.com>
--- a/Documentation/devicetree/bindings/i2c/i2c-omap.txt
+++ b/Documentation/devicetree/bindings/i2c/i2c-omap.txt
@@ -1,7 +1,8 @@
I2C for OMAP platforms
Required properties :
-- compatible : Must be "ti,omap3-i2c" or "ti,omap4-i2c"
+- compatible : Must be "ti,omap2420-i2c", "ti,omap2430-i2c", "ti,omap3-i2c"
+ or "ti,omap4-i2c"
- ti,hwmods : Must be "i2c<n>", n being the instance number (1-based)
- #address-cells = <1>;
- #size-cells = <0>;
--- a/drivers/i2c/busses/i2c-omap.c
+++ b/drivers/i2c/busses/i2c-omap.c
@@ -1037,6 +1037,20 @@ static const struct i2c_algorithm omap_i2c_algo = {
};
#ifdef CONFIG_OF
+static struct omap_i2c_bus_platform_data omap2420_pdata = {
+ .rev = OMAP_I2C_IP_VERSION_1,
+ .flags = OMAP_I2C_FLAG_NO_FIFO |
+ OMAP_I2C_FLAG_SIMPLE_CLOCK |
+ OMAP_I2C_FLAG_16BIT_DATA_REG |
+ OMAP_I2C_FLAG_BUS_SHIFT_2,
+};
+
+static struct omap_i2c_bus_platform_data omap2430_pdata = {
+ .rev = OMAP_I2C_IP_VERSION_1,
+ .flags = OMAP_I2C_FLAG_BUS_SHIFT_2 |
+ OMAP_I2C_FLAG_FORCE_19200_INT_CLK,
+};
+
static struct omap_i2c_bus_platform_data omap3_pdata = {
.rev = OMAP_I2C_IP_VERSION_1,
.flags = OMAP_I2C_FLAG_BUS_SHIFT_2,
@@ -1055,6 +1069,14 @@ static const struct of_device_id omap_i2c_of_match[] = {
.compatible = "ti,omap3-i2c",
.data = &omap3_pdata,
},
+ {
+ .compatible = "ti,omap2430-i2c",
+ .data = &omap2430_pdata,
+ },
+ {
+ .compatible = "ti,omap2420-i2c",
+ .data = &omap2420_pdata,
+ },
{ },
};
MODULE_DEVICE_TABLE(of, omap_i2c_of_match);
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 4/8] i2c: omap: Fix missing device tree flags for omap2
2013-11-14 6:58 ` Wolfram Sang
@ 2013-11-14 17:34 ` Tony Lindgren
[not found] ` <20131114173429.GF10317-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.org>
0 siblings, 1 reply; 11+ messages in thread
From: Tony Lindgren @ 2013-11-14 17:34 UTC (permalink / raw)
To: Wolfram Sang; +Cc: linux-arm-kernel, linux-omap, linux-i2c
* Wolfram Sang <wsa@the-dreams.de> [131113 22:59]:
> On Wed, Nov 13, 2013 at 06:35:33PM -0800, Tony Lindgren wrote:
> > As we claim to support device tree for mach-omap2, we
> > should have the necessary flags in the driver to make it
> > usable.
> >
> > Cc: Wolfram Sang <wsa@the-dreams.de>
> > Cc: linux-i2c@vger.kernel.org
> > Signed-off-by: Tony Lindgren <tony@atomide.com>
>
> Acked-by: Wolfram Sang <wsa@the-dreams.de>
>
> It would have been helpful if the message "PATCH [0/x]" would have been
> sent to the i2c-list also.
Thanks, next time I'll try check the cc list in the cover letter
manually after running git format patch. I guess there's no way
to deal with that in an automated way.
Here's a link to the whole thread for reference:
http://www.spinics.net/lists/arm-kernel/msg286246.html
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 4/8] i2c: omap: Fix missing device tree flags for omap2
[not found] ` <20131114173429.GF10317-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.org>
@ 2013-11-14 17:49 ` Wolfram Sang
2013-11-14 17:53 ` Tony Lindgren
0 siblings, 1 reply; 11+ messages in thread
From: Wolfram Sang @ 2013-11-14 17:49 UTC (permalink / raw)
To: Tony Lindgren
Cc: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
linux-omap-u79uwXL29TY76Z2rM5mHXA,
linux-i2c-u79uwXL29TY76Z2rM5mHXA
[-- Attachment #1: Type: text/plain, Size: 754 bytes --]
> > It would have been helpful if the message "PATCH [0/x]" would have been
> > sent to the i2c-list also.
>
> Thanks, next time I'll try check the cc list in the cover letter
> manually after running git format patch. I guess there's no way
> to deal with that in an automated way.
I use this hackish script as --cc-cmd with git:
#! /bin/sh
#
# cocci_cc - send cover letter to all mailing lists referenced in a patch series
# done by Wolfram Sang in 2012 - WTFPLv2
name=${1##*/}
num=${name%%-*}
if [ "$num" = "0000" ]; then
dir=${1%/*}
for f in $dir/*; do
patchname=${f##*/}
[ "${patchname%%-*}" = "0000" ] && continue
scripts/get_maintainer.pl --no-m $f
done | sort -u
else
scripts/get_maintainer.pl $1
fi
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 4/8] i2c: omap: Fix missing device tree flags for omap2
2013-11-14 17:49 ` Wolfram Sang
@ 2013-11-14 17:53 ` Tony Lindgren
0 siblings, 0 replies; 11+ messages in thread
From: Tony Lindgren @ 2013-11-14 17:53 UTC (permalink / raw)
To: Wolfram Sang; +Cc: linux-omap, linux-i2c, linux-arm-kernel
* Wolfram Sang <wsa@the-dreams.de> [131114 09:49]:
>
> > > It would have been helpful if the message "PATCH [0/x]" would have been
> > > sent to the i2c-list also.
> >
> > Thanks, next time I'll try check the cc list in the cover letter
> > manually after running git format patch. I guess there's no way
> > to deal with that in an automated way.
>
> I use this hackish script as --cc-cmd with git:
>
> #! /bin/sh
> #
> # cocci_cc - send cover letter to all mailing lists referenced in a patch series
> # done by Wolfram Sang in 2012 - WTFPLv2
>
> name=${1##*/}
> num=${name%%-*}
>
> if [ "$num" = "0000" ]; then
> dir=${1%/*}
> for f in $dir/*; do
> patchname=${f##*/}
> [ "${patchname%%-*}" = "0000" ] && continue
> scripts/get_maintainer.pl --no-m $f
> done | sort -u
> else
> scripts/get_maintainer.pl $1
> fi
>
Cool thanks :) I'll give it a try next time.
Tony
^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH 9/8] i2c: Fix device tree binding for i2c-cbus-gpio
[not found] <1384396537-3486-1-git-send-email-tony@atomide.com>
[not found] ` <1384396537-3486-1-git-send-email-tony-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.org>
@ 2013-11-14 23:08 ` Tony Lindgren
[not found] ` <20131114230842.GU10317-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.org>
1 sibling, 1 reply; 11+ messages in thread
From: Tony Lindgren @ 2013-11-14 23:08 UTC (permalink / raw)
To: linux-arm-kernel, linux-omap; +Cc: linux-i2c, Aaro Koskinen, Wolfram Sang
Looks like we're missing two lines needed to make it
work properly with device tree.
Cc: linux-i2c@vger.kernel.org
Cc: Aaro Koskinen <aaro.koskinen@iki.fi>
Cc: Wolfram Sang <wsa@the-dreams.de>
Signed-off-by: Tony Lindgren <tony@atomide.com>
---
Wolfram, I found one more bug booting omaps with device tree.
--- a/drivers/i2c/busses/i2c-cbus-gpio.c
+++ b/drivers/i2c/busses/i2c-cbus-gpio.c
@@ -246,6 +246,7 @@ static int cbus_i2c_probe(struct platform_device *pdev)
adapter->owner = THIS_MODULE;
adapter->class = I2C_CLASS_HWMON;
adapter->dev.parent = &pdev->dev;
+ adapter->dev.of_node = pdev->dev.of_node;
adapter->nr = pdev->id;
adapter->timeout = HZ;
adapter->algo = &cbus_i2c_algo;
@@ -289,6 +290,7 @@ static struct platform_driver cbus_i2c_driver = {
.driver = {
.owner = THIS_MODULE,
.name = "i2c-cbus-gpio",
+ .of_match_table = of_match_ptr(i2c_cbus_dt_ids),
},
};
module_platform_driver(cbus_i2c_driver);
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 9/8] i2c: Fix device tree binding for i2c-cbus-gpio
[not found] ` <20131114230842.GU10317-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.org>
@ 2013-11-15 18:49 ` Aaro Koskinen
2013-11-15 22:26 ` Wolfram Sang
1 sibling, 0 replies; 11+ messages in thread
From: Aaro Koskinen @ 2013-11-15 18:49 UTC (permalink / raw)
To: Tony Lindgren
Cc: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
linux-omap-u79uwXL29TY76Z2rM5mHXA,
linux-i2c-u79uwXL29TY76Z2rM5mHXA, Wolfram Sang
Hi,
On Thu, Nov 14, 2013 at 03:08:42PM -0800, Tony Lindgren wrote:
> Looks like we're missing two lines needed to make it
> work properly with device tree.
>
> Cc: linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> Cc: Aaro Koskinen <aaro.koskinen-X3B1VOXEql0@public.gmane.org>
You can change this to: Tested-by: <aaro.koskinen-X3B1VOXEql0@public.gmane.org>
I booted DT-N800 with Tony's patches, and it works.
Thanks,
A.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 9/8] i2c: Fix device tree binding for i2c-cbus-gpio
[not found] ` <20131114230842.GU10317-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.org>
2013-11-15 18:49 ` Aaro Koskinen
@ 2013-11-15 22:26 ` Wolfram Sang
2013-11-15 22:30 ` Tony Lindgren
1 sibling, 1 reply; 11+ messages in thread
From: Wolfram Sang @ 2013-11-15 22:26 UTC (permalink / raw)
To: Tony Lindgren
Cc: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
linux-omap-u79uwXL29TY76Z2rM5mHXA,
linux-i2c-u79uwXL29TY76Z2rM5mHXA, Aaro Koskinen
[-- Attachment #1: Type: text/plain, Size: 461 bytes --]
On Thu, Nov 14, 2013 at 03:08:42PM -0800, Tony Lindgren wrote:
> Looks like we're missing two lines needed to make it
> work properly with device tree.
>
> Cc: linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> Cc: Aaro Koskinen <aaro.koskinen-X3B1VOXEql0@public.gmane.org>
> Cc: Wolfram Sang <wsa-z923LK4zBo2bacvFa/9K2g@public.gmane.org>
> Signed-off-by: Tony Lindgren <tony-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.org>
Applied to for-next, thanks!
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 9/8] i2c: Fix device tree binding for i2c-cbus-gpio
2013-11-15 22:26 ` Wolfram Sang
@ 2013-11-15 22:30 ` Tony Lindgren
0 siblings, 0 replies; 11+ messages in thread
From: Tony Lindgren @ 2013-11-15 22:30 UTC (permalink / raw)
To: Wolfram Sang
Cc: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
linux-omap-u79uwXL29TY76Z2rM5mHXA,
linux-i2c-u79uwXL29TY76Z2rM5mHXA, Aaro Koskinen
* Wolfram Sang <wsa-z923LK4zBo2bacvFa/9K2g@public.gmane.org> [131115 14:27]:
> On Thu, Nov 14, 2013 at 03:08:42PM -0800, Tony Lindgren wrote:
> > Looks like we're missing two lines needed to make it
> > work properly with device tree.
> >
> > Cc: linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> > Cc: Aaro Koskinen <aaro.koskinen-X3B1VOXEql0@public.gmane.org>
> > Cc: Wolfram Sang <wsa-z923LK4zBo2bacvFa/9K2g@public.gmane.org>
> > Signed-off-by: Tony Lindgren <tony-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.org>
>
> Applied to for-next, thanks!
Thanks, will drop this one from my fixes series.
Tony
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2013-11-15 22:30 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <1384396537-3486-1-git-send-email-tony@atomide.com>
[not found] ` <1384396537-3486-1-git-send-email-tony-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.org>
2013-11-14 2:35 ` [PATCH 4/8] i2c: omap: Fix missing device tree flags for omap2 Tony Lindgren
[not found] ` <1384396537-3486-5-git-send-email-tony-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.org>
2013-11-14 6:58 ` Wolfram Sang
2013-11-14 17:34 ` Tony Lindgren
[not found] ` <20131114173429.GF10317-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.org>
2013-11-14 17:49 ` Wolfram Sang
2013-11-14 17:53 ` Tony Lindgren
2013-11-14 11:07 ` Mark Rutland
2013-11-14 17:30 ` Tony Lindgren
2013-11-14 23:08 ` [PATCH 9/8] i2c: Fix device tree binding for i2c-cbus-gpio Tony Lindgren
[not found] ` <20131114230842.GU10317-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.org>
2013-11-15 18:49 ` Aaro Koskinen
2013-11-15 22:26 ` Wolfram Sang
2013-11-15 22:30 ` Tony Lindgren
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).