* I2C device board info
@ 2009-07-18 10:56 Russell King - ARM Linux
[not found] ` <20090718105600.GA29887-l+eeeJia6m9vn6HldHNs0ANdhmdF6hFW@public.gmane.org>
0 siblings, 1 reply; 9+ messages in thread
From: Russell King - ARM Linux @ 2009-07-18 10:56 UTC (permalink / raw)
To: Sascha Hauer, Ben Dooks; +Cc: linux-i2c-u79uwXL29TY76Z2rM5mHXA
Sascha,
I've noticed the following in i2c_board_info initializers:
arch/arm/mach-mx2/pcm038.c: I2C_BOARD_INFO("rtc-pcf8563", 0x51),
arch/arm/mach-mx2/pcm038.c- .type = "pcf8563"
However, I2C_BOARD_INFO is defined as:
#define I2C_BOARD_INFO(dev_type, dev_addr) \
.type = dev_type, .addr = (dev_addr)
so you're initializing .type twice. Only one of these will be used,
so you may want to correct these entries. (Looking at Realview, the
one which is used is the second - so in the above case, .type will
be initialized with current gcc to "pcf8563" not "rtc-pcf8563".)
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: I2C device board info
[not found] ` <20090718105600.GA29887-l+eeeJia6m9vn6HldHNs0ANdhmdF6hFW@public.gmane.org>
@ 2009-07-18 13:08 ` Jean Delvare
[not found] ` <20090718150803.68fea223-ig7AzVSIIG7kN2dkZ6Wm7A@public.gmane.org>
2009-07-20 6:20 ` Sascha Hauer
1 sibling, 1 reply; 9+ messages in thread
From: Jean Delvare @ 2009-07-18 13:08 UTC (permalink / raw)
To: Russell King - ARM Linux
Cc: Sascha Hauer, Ben Dooks, linux-i2c-u79uwXL29TY76Z2rM5mHXA
Hi Russell,
On Sat, 18 Jul 2009 11:56:00 +0100, Russell King - ARM Linux wrote:
> Sascha,
>
> I've noticed the following in i2c_board_info initializers:
>
> arch/arm/mach-mx2/pcm038.c: I2C_BOARD_INFO("rtc-pcf8563", 0x51),
> arch/arm/mach-mx2/pcm038.c- .type = "pcf8563"
>
> However, I2C_BOARD_INFO is defined as:
>
> #define I2C_BOARD_INFO(dev_type, dev_addr) \
> .type = dev_type, .addr = (dev_addr)
>
> so you're initializing .type twice. Only one of these will be used,
> so you may want to correct these entries. (Looking at Realview, the
> one which is used is the second - so in the above case, .type will
> be initialized with current gcc to "pcf8563" not "rtc-pcf8563".)
Most probably for historical reasons - the initial implementation of
I2C_BOARD_INFO did define the driver name, and setting the device type
was optional. Apparently the above piece of code was forgotten when
I2C_BOARD_INFO() was modified.
The correct type name for this chip is "pcf8563" so the two lines above
should be turned into:
I2C_BOARD_INFO("pcf8563", 0x51),
Note that this is not an isolated case, although this one is worse
because I2C_BOARD_INFO() and .type do not agree on the chip name. But
there are several redundant .type definitions in arch/arm/mach-* and
one in arch/blackfin/mach-bf527. Time to fix them?
--
Jean Delvare
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: I2C device board info
[not found] ` <20090718150803.68fea223-ig7AzVSIIG7kN2dkZ6Wm7A@public.gmane.org>
@ 2009-07-18 13:12 ` Russell King - ARM Linux
[not found] ` <20090718131237.GB4120-l+eeeJia6m9vn6HldHNs0ANdhmdF6hFW@public.gmane.org>
0 siblings, 1 reply; 9+ messages in thread
From: Russell King - ARM Linux @ 2009-07-18 13:12 UTC (permalink / raw)
To: Jean Delvare; +Cc: Sascha Hauer, Ben Dooks, linux-i2c-u79uwXL29TY76Z2rM5mHXA
On Sat, Jul 18, 2009 at 03:08:03PM +0200, Jean Delvare wrote:
> Note that this is not an isolated case, although this one is worse
> because I2C_BOARD_INFO() and .type do not agree on the chip name. But
> there are several redundant .type definitions in arch/arm/mach-* and
> one in arch/blackfin/mach-bf527. Time to fix them?
That is my intention - I'm preparing patches for Realview and Versatile.
This will only leave the MX* series of platforms in arch/arm doing this,
which fall into Sascha's domain.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: I2C device board info
[not found] ` <20090718131237.GB4120-l+eeeJia6m9vn6HldHNs0ANdhmdF6hFW@public.gmane.org>
@ 2009-07-18 13:29 ` Jean Delvare
[not found] ` <20090718152918.09912dea-ig7AzVSIIG7kN2dkZ6Wm7A@public.gmane.org>
0 siblings, 1 reply; 9+ messages in thread
From: Jean Delvare @ 2009-07-18 13:29 UTC (permalink / raw)
To: Russell King - ARM Linux
Cc: Sascha Hauer, Ben Dooks, linux-i2c-u79uwXL29TY76Z2rM5mHXA
On Sat, 18 Jul 2009 14:12:37 +0100, Russell King - ARM Linux wrote:
> On Sat, Jul 18, 2009 at 03:08:03PM +0200, Jean Delvare wrote:
> > Note that this is not an isolated case, although this one is worse
> > because I2C_BOARD_INFO() and .type do not agree on the chip name. But
> > there are several redundant .type definitions in arch/arm/mach-* and
> > one in arch/blackfin/mach-bf527. Time to fix them?
>
> That is my intention - I'm preparing patches for Realview and Versatile.
> This will only leave the MX* series of platforms in arch/arm doing this,
> which fall into Sascha's domain.
OK, thank you. I'll send a patch for the blackfin ones then.
--
Jean Delvare
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: I2C device board info
[not found] ` <20090718152918.09912dea-ig7AzVSIIG7kN2dkZ6Wm7A@public.gmane.org>
@ 2009-07-18 13:57 ` Russell King - ARM Linux
[not found] ` <20090718135713.GC4120-l+eeeJia6m9vn6HldHNs0ANdhmdF6hFW@public.gmane.org>
0 siblings, 1 reply; 9+ messages in thread
From: Russell King - ARM Linux @ 2009-07-18 13:57 UTC (permalink / raw)
To: Jean Delvare; +Cc: Sascha Hauer, Ben Dooks, linux-i2c-u79uwXL29TY76Z2rM5mHXA
On Sat, Jul 18, 2009 at 03:29:18PM +0200, Jean Delvare wrote:
> On Sat, 18 Jul 2009 14:12:37 +0100, Russell King - ARM Linux wrote:
> > On Sat, Jul 18, 2009 at 03:08:03PM +0200, Jean Delvare wrote:
> > > Note that this is not an isolated case, although this one is worse
> > > because I2C_BOARD_INFO() and .type do not agree on the chip name. But
> > > there are several redundant .type definitions in arch/arm/mach-* and
> > > one in arch/blackfin/mach-bf527. Time to fix them?
> >
> > That is my intention - I'm preparing patches for Realview and Versatile.
> > This will only leave the MX* series of platforms in arch/arm doing this,
> > which fall into Sascha's domain.
>
> OK, thank you. I'll send a patch for the blackfin ones then.
Can I get an ack for this please?
Thanks.
Subject: ARM: Realview & Versatile: Fix i2c_board_info definitions
Fix i2c_board_info definitions - we were defining the 'type' field
of these structures twice since the first argument of I2C_BOARD_INFO
sets this field. Move the second definition into I2C_BOARD_INFO().
Signed-off-by: Russell King <rmk+kernel-lFZ/pmaqli7XmaaqVzeoHQ@public.gmane.org>
---
arch/arm/mach-realview/core.c | 3 +--
arch/arm/mach-versatile/core.c | 3 +--
2 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/arch/arm/mach-realview/core.c b/arch/arm/mach-realview/core.c
index ab615e7..dc3519c 100644
--- a/arch/arm/mach-realview/core.c
+++ b/arch/arm/mach-realview/core.c
@@ -208,8 +208,7 @@ struct platform_device realview_i2c_device = {
static struct i2c_board_info realview_i2c_board_info[] = {
{
- I2C_BOARD_INFO("rtc-ds1307", 0xd0 >> 1),
- .type = "ds1338",
+ I2C_BOARD_INFO("ds1338", 0xd0 >> 1),
},
};
diff --git a/arch/arm/mach-versatile/core.c b/arch/arm/mach-versatile/core.c
index afc0f87..975eae4 100644
--- a/arch/arm/mach-versatile/core.c
+++ b/arch/arm/mach-versatile/core.c
@@ -343,8 +343,7 @@ static struct platform_device versatile_i2c_device = {
static struct i2c_board_info versatile_i2c_board_info[] = {
{
- I2C_BOARD_INFO("rtc-ds1307", 0xd0 >> 1),
- .type = "ds1338",
+ I2C_BOARD_INFO("ds1338", 0xd0 >> 1),
},
};
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: I2C device board info
[not found] ` <20090718135713.GC4120-l+eeeJia6m9vn6HldHNs0ANdhmdF6hFW@public.gmane.org>
@ 2009-07-18 14:39 ` Jean Delvare
2009-07-18 15:45 ` Ben Dooks
1 sibling, 0 replies; 9+ messages in thread
From: Jean Delvare @ 2009-07-18 14:39 UTC (permalink / raw)
To: Russell King - ARM Linux
Cc: Sascha Hauer, Ben Dooks, linux-i2c-u79uwXL29TY76Z2rM5mHXA
On Sat, 18 Jul 2009 14:57:13 +0100, Russell King - ARM Linux wrote:
> On Sat, Jul 18, 2009 at 03:29:18PM +0200, Jean Delvare wrote:
> > On Sat, 18 Jul 2009 14:12:37 +0100, Russell King - ARM Linux wrote:
> > > That is my intention - I'm preparing patches for Realview and Versatile.
> > > This will only leave the MX* series of platforms in arch/arm doing this,
> > > which fall into Sascha's domain.
> >
> > OK, thank you. I'll send a patch for the blackfin ones then.
>
> Can I get an ack for this please?
>
> Thanks.
>
> Subject: ARM: Realview & Versatile: Fix i2c_board_info definitions
>
> Fix i2c_board_info definitions - we were defining the 'type' field
> of these structures twice since the first argument of I2C_BOARD_INFO
> sets this field. Move the second definition into I2C_BOARD_INFO().
>
> Signed-off-by: Russell King <rmk+kernel-lFZ/pmaqli7XmaaqVzeoHQ@public.gmane.org>
> ---
> arch/arm/mach-realview/core.c | 3 +--
> arch/arm/mach-versatile/core.c | 3 +--
> 2 files changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/arch/arm/mach-realview/core.c b/arch/arm/mach-realview/core.c
> index ab615e7..dc3519c 100644
> --- a/arch/arm/mach-realview/core.c
> +++ b/arch/arm/mach-realview/core.c
> @@ -208,8 +208,7 @@ struct platform_device realview_i2c_device = {
>
> static struct i2c_board_info realview_i2c_board_info[] = {
> {
> - I2C_BOARD_INFO("rtc-ds1307", 0xd0 >> 1),
> - .type = "ds1338",
> + I2C_BOARD_INFO("ds1338", 0xd0 >> 1),
> },
> };
>
> diff --git a/arch/arm/mach-versatile/core.c b/arch/arm/mach-versatile/core.c
> index afc0f87..975eae4 100644
> --- a/arch/arm/mach-versatile/core.c
> +++ b/arch/arm/mach-versatile/core.c
> @@ -343,8 +343,7 @@ static struct platform_device versatile_i2c_device = {
>
> static struct i2c_board_info versatile_i2c_board_info[] = {
> {
> - I2C_BOARD_INFO("rtc-ds1307", 0xd0 >> 1),
> - .type = "ds1338",
> + I2C_BOARD_INFO("ds1338", 0xd0 >> 1),
> },
> };
>
Acked-by: Jean Delvare <khali-PUYAD+kWke1g9hUCZPvPmw@public.gmane.org>
--
Jean Delvare
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: I2C device board info
[not found] ` <20090718135713.GC4120-l+eeeJia6m9vn6HldHNs0ANdhmdF6hFW@public.gmane.org>
2009-07-18 14:39 ` Jean Delvare
@ 2009-07-18 15:45 ` Ben Dooks
1 sibling, 0 replies; 9+ messages in thread
From: Ben Dooks @ 2009-07-18 15:45 UTC (permalink / raw)
To: Russell King - ARM Linux
Cc: Jean Delvare, Sascha Hauer, Ben Dooks,
linux-i2c-u79uwXL29TY76Z2rM5mHXA
On Sat, Jul 18, 2009 at 02:57:13PM +0100, Russell King - ARM Linux wrote:
> On Sat, Jul 18, 2009 at 03:29:18PM +0200, Jean Delvare wrote:
> > On Sat, 18 Jul 2009 14:12:37 +0100, Russell King - ARM Linux wrote:
> > > On Sat, Jul 18, 2009 at 03:08:03PM +0200, Jean Delvare wrote:
> > > > Note that this is not an isolated case, although this one is worse
> > > > because I2C_BOARD_INFO() and .type do not agree on the chip name. But
> > > > there are several redundant .type definitions in arch/arm/mach-* and
> > > > one in arch/blackfin/mach-bf527. Time to fix them?
> > >
> > > That is my intention - I'm preparing patches for Realview and Versatile.
> > > This will only leave the MX* series of platforms in arch/arm doing this,
> > > which fall into Sascha's domain.
> >
> > OK, thank you. I'll send a patch for the blackfin ones then.
>
> Can I get an ack for this please?
>
> Thanks.
>
> Subject: ARM: Realview & Versatile: Fix i2c_board_info definitions
>
> Fix i2c_board_info definitions - we were defining the 'type' field
> of these structures twice since the first argument of I2C_BOARD_INFO
> sets this field. Move the second definition into I2C_BOARD_INFO().
>
> Signed-off-by: Russell King <rmk+kernel-lFZ/pmaqli7XmaaqVzeoHQ@public.gmane.org>
Acked-by: Ben Dooks <ben-linux-elnMNo+KYs3YtjvyW6yDsg@public.gmane.org>
> ---
> arch/arm/mach-realview/core.c | 3 +--
> arch/arm/mach-versatile/core.c | 3 +--
> 2 files changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/arch/arm/mach-realview/core.c b/arch/arm/mach-realview/core.c
> index ab615e7..dc3519c 100644
> --- a/arch/arm/mach-realview/core.c
> +++ b/arch/arm/mach-realview/core.c
> @@ -208,8 +208,7 @@ struct platform_device realview_i2c_device = {
>
> static struct i2c_board_info realview_i2c_board_info[] = {
> {
> - I2C_BOARD_INFO("rtc-ds1307", 0xd0 >> 1),
> - .type = "ds1338",
> + I2C_BOARD_INFO("ds1338", 0xd0 >> 1),
> },
> };
>
> diff --git a/arch/arm/mach-versatile/core.c b/arch/arm/mach-versatile/core.c
> index afc0f87..975eae4 100644
> --- a/arch/arm/mach-versatile/core.c
> +++ b/arch/arm/mach-versatile/core.c
> @@ -343,8 +343,7 @@ static struct platform_device versatile_i2c_device = {
>
> static struct i2c_board_info versatile_i2c_board_info[] = {
> {
> - I2C_BOARD_INFO("rtc-ds1307", 0xd0 >> 1),
> - .type = "ds1338",
> + I2C_BOARD_INFO("ds1338", 0xd0 >> 1),
> },
> };
>
--
--
Ben
Q: What's a light-year?
A: One-third less calories than a regular year.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: I2C device board info
[not found] ` <20090718105600.GA29887-l+eeeJia6m9vn6HldHNs0ANdhmdF6hFW@public.gmane.org>
2009-07-18 13:08 ` Jean Delvare
@ 2009-07-20 6:20 ` Sascha Hauer
[not found] ` <20090720062034.GV2714-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
1 sibling, 1 reply; 9+ messages in thread
From: Sascha Hauer @ 2009-07-20 6:20 UTC (permalink / raw)
To: Russell King - ARM Linux; +Cc: Ben Dooks, linux-i2c-u79uwXL29TY76Z2rM5mHXA
On Sat, Jul 18, 2009 at 11:56:00AM +0100, Russell King - ARM Linux wrote:
> Sascha,
>
> I've noticed the following in i2c_board_info initializers:
>
> arch/arm/mach-mx2/pcm038.c: I2C_BOARD_INFO("rtc-pcf8563", 0x51),
> arch/arm/mach-mx2/pcm038.c- .type = "pcf8563"
>
> However, I2C_BOARD_INFO is defined as:
>
> #define I2C_BOARD_INFO(dev_type, dev_addr) \
> .type = dev_type, .addr = (dev_addr)
>
> so you're initializing .type twice. Only one of these will be used,
> so you may want to correct these entries. (Looking at Realview, the
> one which is used is the second - so in the above case, .type will
> be initialized with current gcc to "pcf8563" not "rtc-pcf8563".)
>
Ok, here we go:
>From 89b5958a911ddcf1079e0dd6bbf2287f04c358d9 Mon Sep 17 00:00:00 2001
From: Sascha Hauer <s.hauer-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
Date: Mon, 20 Jul 2009 08:18:47 +0200
Subject: [PATCH] ARM: mxc: Fix i2c_board_info definitions
Fix i2c_board_info definitions - we were defining the 'type' field
of these structures twice since the first argument of I2C_BOARD_INFO
sets this field. Move the second definition into I2C_BOARD_INFO().
Signed-off-by: Sascha Hauer <s.hauer-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
---
arch/arm/mach-mx1/mx1ads.c | 6 ++----
arch/arm/mach-mx2/eukrea_cpuimx27.c | 3 +--
arch/arm/mach-mx2/pcm038.c | 12 ++++--------
arch/arm/mach-mx3/pcm037.c | 3 +--
arch/arm/mach-mx3/pcm043.c | 3 +--
5 files changed, 9 insertions(+), 18 deletions(-)
diff --git a/arch/arm/mach-mx1/mx1ads.c b/arch/arm/mach-mx1/mx1ads.c
index 6af064d..30f04e5 100644
--- a/arch/arm/mach-mx1/mx1ads.c
+++ b/arch/arm/mach-mx1/mx1ads.c
@@ -104,12 +104,10 @@ static struct imxi2c_platform_data mx1ads_i2c_data = {
static struct i2c_board_info mx1ads_i2c_devices[] = {
{
- I2C_BOARD_INFO("pcf857x", 0x22),
- .type = "pcf8575",
+ I2C_BOARD_INFO("pcf8575", 0x22),
.platform_data = &pcf857x_data[0],
}, {
- I2C_BOARD_INFO("pcf857x", 0x24),
- .type = "pcf8575",
+ I2C_BOARD_INFO("pcf8575", 0x24),
.platform_data = &pcf857x_data[1],
},
};
diff --git a/arch/arm/mach-mx2/eukrea_cpuimx27.c b/arch/arm/mach-mx2/eukrea_cpuimx27.c
index a2c4181..7b18760 100644
--- a/arch/arm/mach-mx2/eukrea_cpuimx27.c
+++ b/arch/arm/mach-mx2/eukrea_cpuimx27.c
@@ -135,8 +135,7 @@ static struct imxi2c_platform_data eukrea_cpuimx27_i2c_1_data = {
static struct i2c_board_info eukrea_cpuimx27_i2c_devices[] = {
{
- I2C_BOARD_INFO("rtc-pcf8563", 0x51),
- .type = "pcf8563"
+ I2C_BOARD_INFO("pcf8563", 0x51),
},
};
diff --git a/arch/arm/mach-mx2/pcm038.c b/arch/arm/mach-mx2/pcm038.c
index 638d078..9a3483c 100644
--- a/arch/arm/mach-mx2/pcm038.c
+++ b/arch/arm/mach-mx2/pcm038.c
@@ -186,17 +186,13 @@ static struct at24_platform_data board_eeprom = {
};
static struct i2c_board_info pcm038_i2c_devices[] = {
- [0] = {
+ {
I2C_BOARD_INFO("at24", 0x52), /* E0=0, E1=1, E2=0 */
.platform_data = &board_eeprom,
- },
- [1] = {
- I2C_BOARD_INFO("rtc-pcf8563", 0x51),
- .type = "pcf8563"
- },
- [2] = {
+ }, {
+ I2C_BOARD_INFO("pcf8563", 0x51),
+ }, {
I2C_BOARD_INFO("lm75", 0x4a),
- .type = "lm75"
}
};
diff --git a/arch/arm/mach-mx3/pcm037.c b/arch/arm/mach-mx3/pcm037.c
index 6a3a1a9..d307887 100644
--- a/arch/arm/mach-mx3/pcm037.c
+++ b/arch/arm/mach-mx3/pcm037.c
@@ -266,8 +266,7 @@ static struct i2c_board_info pcm037_i2c_devices[] = {
I2C_BOARD_INFO("at24", 0x52), /* E0=0, E1=1, E2=0 */
.platform_data = &board_eeprom,
}, {
- I2C_BOARD_INFO("rtc-pcf8563", 0x51),
- .type = "pcf8563",
+ I2C_BOARD_INFO("pcf8563", 0x51),
}
};
#endif
diff --git a/arch/arm/mach-mx3/pcm043.c b/arch/arm/mach-mx3/pcm043.c
index 7c7d3cc..e43276e 100644
--- a/arch/arm/mach-mx3/pcm043.c
+++ b/arch/arm/mach-mx3/pcm043.c
@@ -133,8 +133,7 @@ static struct i2c_board_info pcm043_i2c_devices[] = {
I2C_BOARD_INFO("at24", 0x52), /* E0=0, E1=1, E2=0 */
.platform_data = &board_eeprom,
}, {
- I2C_BOARD_INFO("rtc-pcf8563", 0x51),
- .type = "pcf8563",
+ I2C_BOARD_INFO("pcf8563", 0x51),
}
};
#endif
--
1.6.3.3
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: I2C device board info
[not found] ` <20090720062034.GV2714-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
@ 2009-07-20 7:34 ` Jean Delvare
0 siblings, 0 replies; 9+ messages in thread
From: Jean Delvare @ 2009-07-20 7:34 UTC (permalink / raw)
To: Sascha Hauer
Cc: Russell King - ARM Linux, Ben Dooks,
linux-i2c-u79uwXL29TY76Z2rM5mHXA
On Mon, 20 Jul 2009 08:20:34 +0200, Sascha Hauer wrote:
> On Sat, Jul 18, 2009 at 11:56:00AM +0100, Russell King - ARM Linux wrote:
> > Sascha,
> >
> > I've noticed the following in i2c_board_info initializers:
> >
> > arch/arm/mach-mx2/pcm038.c: I2C_BOARD_INFO("rtc-pcf8563", 0x51),
> > arch/arm/mach-mx2/pcm038.c- .type = "pcf8563"
> >
> > However, I2C_BOARD_INFO is defined as:
> >
> > #define I2C_BOARD_INFO(dev_type, dev_addr) \
> > .type = dev_type, .addr = (dev_addr)
> >
> > so you're initializing .type twice. Only one of these will be used,
> > so you may want to correct these entries. (Looking at Realview, the
> > one which is used is the second - so in the above case, .type will
> > be initialized with current gcc to "pcf8563" not "rtc-pcf8563".)
> >
>
> Ok, here we go:
>
> From 89b5958a911ddcf1079e0dd6bbf2287f04c358d9 Mon Sep 17 00:00:00 2001
> From: Sascha Hauer <s.hauer-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
> Date: Mon, 20 Jul 2009 08:18:47 +0200
> Subject: [PATCH] ARM: mxc: Fix i2c_board_info definitions
>
> Fix i2c_board_info definitions - we were defining the 'type' field
> of these structures twice since the first argument of I2C_BOARD_INFO
> sets this field. Move the second definition into I2C_BOARD_INFO().
>
> Signed-off-by: Sascha Hauer <s.hauer-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
> ---
> arch/arm/mach-mx1/mx1ads.c | 6 ++----
> arch/arm/mach-mx2/eukrea_cpuimx27.c | 3 +--
> arch/arm/mach-mx2/pcm038.c | 12 ++++--------
> arch/arm/mach-mx3/pcm037.c | 3 +--
> arch/arm/mach-mx3/pcm043.c | 3 +--
> 5 files changed, 9 insertions(+), 18 deletions(-)
>
> diff --git a/arch/arm/mach-mx1/mx1ads.c b/arch/arm/mach-mx1/mx1ads.c
> index 6af064d..30f04e5 100644
> --- a/arch/arm/mach-mx1/mx1ads.c
> +++ b/arch/arm/mach-mx1/mx1ads.c
> @@ -104,12 +104,10 @@ static struct imxi2c_platform_data mx1ads_i2c_data = {
>
> static struct i2c_board_info mx1ads_i2c_devices[] = {
> {
> - I2C_BOARD_INFO("pcf857x", 0x22),
> - .type = "pcf8575",
> + I2C_BOARD_INFO("pcf8575", 0x22),
> .platform_data = &pcf857x_data[0],
> }, {
> - I2C_BOARD_INFO("pcf857x", 0x24),
> - .type = "pcf8575",
> + I2C_BOARD_INFO("pcf8575", 0x24),
> .platform_data = &pcf857x_data[1],
> },
> };
> diff --git a/arch/arm/mach-mx2/eukrea_cpuimx27.c b/arch/arm/mach-mx2/eukrea_cpuimx27.c
> index a2c4181..7b18760 100644
> --- a/arch/arm/mach-mx2/eukrea_cpuimx27.c
> +++ b/arch/arm/mach-mx2/eukrea_cpuimx27.c
> @@ -135,8 +135,7 @@ static struct imxi2c_platform_data eukrea_cpuimx27_i2c_1_data = {
>
> static struct i2c_board_info eukrea_cpuimx27_i2c_devices[] = {
> {
> - I2C_BOARD_INFO("rtc-pcf8563", 0x51),
> - .type = "pcf8563"
> + I2C_BOARD_INFO("pcf8563", 0x51),
> },
> };
>
> diff --git a/arch/arm/mach-mx2/pcm038.c b/arch/arm/mach-mx2/pcm038.c
> index 638d078..9a3483c 100644
> --- a/arch/arm/mach-mx2/pcm038.c
> +++ b/arch/arm/mach-mx2/pcm038.c
> @@ -186,17 +186,13 @@ static struct at24_platform_data board_eeprom = {
> };
>
> static struct i2c_board_info pcm038_i2c_devices[] = {
> - [0] = {
> + {
> I2C_BOARD_INFO("at24", 0x52), /* E0=0, E1=1, E2=0 */
> .platform_data = &board_eeprom,
> - },
> - [1] = {
> - I2C_BOARD_INFO("rtc-pcf8563", 0x51),
> - .type = "pcf8563"
> - },
> - [2] = {
> + }, {
> + I2C_BOARD_INFO("pcf8563", 0x51),
> + }, {
> I2C_BOARD_INFO("lm75", 0x4a),
> - .type = "lm75"
> }
> };
>
> diff --git a/arch/arm/mach-mx3/pcm037.c b/arch/arm/mach-mx3/pcm037.c
> index 6a3a1a9..d307887 100644
> --- a/arch/arm/mach-mx3/pcm037.c
> +++ b/arch/arm/mach-mx3/pcm037.c
> @@ -266,8 +266,7 @@ static struct i2c_board_info pcm037_i2c_devices[] = {
> I2C_BOARD_INFO("at24", 0x52), /* E0=0, E1=1, E2=0 */
> .platform_data = &board_eeprom,
> }, {
> - I2C_BOARD_INFO("rtc-pcf8563", 0x51),
> - .type = "pcf8563",
> + I2C_BOARD_INFO("pcf8563", 0x51),
> }
> };
> #endif
> diff --git a/arch/arm/mach-mx3/pcm043.c b/arch/arm/mach-mx3/pcm043.c
> index 7c7d3cc..e43276e 100644
> --- a/arch/arm/mach-mx3/pcm043.c
> +++ b/arch/arm/mach-mx3/pcm043.c
> @@ -133,8 +133,7 @@ static struct i2c_board_info pcm043_i2c_devices[] = {
> I2C_BOARD_INFO("at24", 0x52), /* E0=0, E1=1, E2=0 */
> .platform_data = &board_eeprom,
> }, {
> - I2C_BOARD_INFO("rtc-pcf8563", 0x51),
> - .type = "pcf8563",
> + I2C_BOARD_INFO("pcf8563", 0x51),
> }
> };
> #endif
Acked-by: Jean Delvare <khali-PUYAD+kWke1g9hUCZPvPmw@public.gmane.org>
--
Jean Delvare
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2009-07-20 7:34 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-18 10:56 I2C device board info Russell King - ARM Linux
[not found] ` <20090718105600.GA29887-l+eeeJia6m9vn6HldHNs0ANdhmdF6hFW@public.gmane.org>
2009-07-18 13:08 ` Jean Delvare
[not found] ` <20090718150803.68fea223-ig7AzVSIIG7kN2dkZ6Wm7A@public.gmane.org>
2009-07-18 13:12 ` Russell King - ARM Linux
[not found] ` <20090718131237.GB4120-l+eeeJia6m9vn6HldHNs0ANdhmdF6hFW@public.gmane.org>
2009-07-18 13:29 ` Jean Delvare
[not found] ` <20090718152918.09912dea-ig7AzVSIIG7kN2dkZ6Wm7A@public.gmane.org>
2009-07-18 13:57 ` Russell King - ARM Linux
[not found] ` <20090718135713.GC4120-l+eeeJia6m9vn6HldHNs0ANdhmdF6hFW@public.gmane.org>
2009-07-18 14:39 ` Jean Delvare
2009-07-18 15:45 ` Ben Dooks
2009-07-20 6:20 ` Sascha Hauer
[not found] ` <20090720062034.GV2714-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2009-07-20 7:34 ` Jean Delvare
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).