Skip to contentSkip to conversation

i2c: fix build breakage introduced by OF helpers

PATCH In review Jochen Friedrich 4 participants 8 messages Apr 18, 2008 – Apr 19, 2008

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 i2c: fix build breakage introduced by OF helpers

Fix build breakage introduced in commit "[POWERPC] i2c: OF helpers for the i2c API".
If i2c-core is compiled as module, the helper needs to be compiled as module, as well. Rename i2c.c to of_i2c.c to avoid name space conflict.

---
 drivers/of/Kconfig             |    2 +-
 drivers/of/Makefile            |    2 +-
 drivers/of/{i2c.c => of_i2c.c} |    0 
 3 files changed, 2 insertions(+), 2 deletions(-)
 rename drivers/of/{i2c.c => of_i2c.c} (100%)
drivers/of/Kconfig +1 -1
index 7c30531..0e39f00 100644
@@ -9,7 +9,7 @@ config OF_GPIO
 	  OpenFirmware GPIO accessors
 
 config OF_I2C
-	def_bool y
+	def_tristate I2C
 	depends on OF && I2C
 	help
 	  OpenFirmware I2C accessors
drivers/of/Makefile +1 -1
index a07b953..548772e 100644
@@ -1,4 +1,4 @@
 obj-y = base.o
 obj-$(CONFIG_OF_DEVICE) += device.o platform.o
 obj-$(CONFIG_OF_GPIO)   += gpio.o
-obj-$(CONFIG_OF_I2C)	+= i2c.o
+obj-$(CONFIG_OF_I2C)	+= of_i2c.o
drivers/of/of_i2c.c renamed from drivers/of/i2c.c +0 -0
similarity index 100%
rename from drivers/of/i2c.c
rename to drivers/of/of_i2c.c
Signature · 7 lines
1.5.5


_______________________________________________
i2c mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/i2c
#1 lore raw
Quoted 5 lines · Jochen Friedrich

Fix build breakage introduced in commit "[POWERPC] i2c: OF helpers for the i2c API".
If i2c-core is compiled as module, the helper needs to be compiled as module, as well. Rename i2c.c to of_i2c.c to avoid name space conflict.

Actually, since only powerpc has irq_of_parse_and_map, I'm now inclined to think that drivers/of/i2c.c should live under arch/powerpc for now, or at the least its option should depend on PPC_OF.

Paul.

#2 lore raw

From: Paul Mackerras <[email protected]>
Date: Sat, 19 Apr 2008 14:04:32 +1000

Quoted 11 lines
Quoted 5 lines · Jochen Friedrich

Fix build breakage introduced in commit "[POWERPC] i2c: OF helpers for the i2c API".
If i2c-core is compiled as module, the helper needs to be compiled as module, as well. Rename i2c.c to of_i2c.c to avoid name space conflict.

Actually, since only powerpc has irq_of_parse_and_map, I'm now inclined to think that drivers/of/i2c.c should live under arch/powerpc for now, or at the least its option should depend on PPC_OF.

I specifically asked for this to not be PPC only so that I can make use of this infrastructure on sparc64 for I2C devices.

It's OK if this breaks the sparc64 allmodconfig build, I'll take care of this once it's merged in.

Please merge the PPC tree to Linus soon, so that I can merge in my sparc64 NUMA bits which depend upon the LMB changesets in the PPC tree.

Thanks.

#3 lore raw
Quoted 11 lines · David Miller

From: Paul Mackerras <[email protected]>
Date: Sat, 19 Apr 2008 14:04:32 +1000

Quoted 8 lines
Quoted 5 lines · Jochen Friedrich

Fix build breakage introduced in commit "[POWERPC] i2c: OF helpers for the i2c API".
If i2c-core is compiled as module, the helper needs to be compiled as module, as well. Rename i2c.c to of_i2c.c to avoid name space conflict.

Quoted 6 lines
Quoted 3 lines

Actually, since only powerpc has irq_of_parse_and_map, I'm now inclined to think that drivers/of/i2c.c should live under arch/powerpc for now, or at the least its option should depend on PPC_OF.

I specifically asked for this to not be PPC only so that I can make use of this infrastructure on sparc64 for I2C devices.

OK.

Quoted 2 lines

It's OK if this breaks the sparc64 allmodconfig build, I'll take care of this once it's merged in.

It breaks the sparc32 allmodconfig build, which seems to be a concern. How do you suggest we fix that?

Quoted 3 lines

Please merge the PPC tree to Linus soon, so that I can merge in my sparc64 NUMA bits which depend upon the LMB changesets in the PPC tree.

Sure, it's just this sparc32 breakage which is holding me up.

Paul.

_______________________________________________
i2c mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/i2c

#4 lore raw

From: Paul Mackerras <[email protected]>
Date: Sat, 19 Apr 2008 15:22:37 +1000

Quoted 9 lines
Quoted 5 lines · David Miller

From: Paul Mackerras <[email protected]>
Date: Sat, 19 Apr 2008 14:04:32 +1000

It's OK if this breaks the sparc64 allmodconfig build, I'll take care of this once it's merged in.

It breaks the sparc32 allmodconfig build, which seems to be a concern. How do you suggest we fix that?

I'll fix both sparc64 and sparc32 builds when I merge my sparc tree in.

#5 lore raw
Quoted 7 lines · David Miller

From: Paul Mackerras <[email protected]>
Date: Sat, 19 Apr 2008 15:22:37 +1000

Quoted 4 lines
Quoted 3 lines · David Miller

From: Paul Mackerras <[email protected]>
Date: Sat, 19 Apr 2008 14:04:32 +1000

Quoted 8 lines
Quoted 5 lines
Quoted 2 lines

It's OK if this breaks the sparc64 allmodconfig build, I'll take care of this once it's merged in.

It breaks the sparc32 allmodconfig build, which seems to be a concern. How do you suggest we fix that?

I'll fix both sparc64 and sparc32 builds when I merge my sparc tree in.

Guys, you're doing things the wrong way around. Breaking things to fix them later is not OK, it's a pain for testers and also when bisecting the kernel. Everything should still work after merging the powerpc tree. Dave, if you need to loosen the dependency, you should do it yourself _after_ having changed whatever needs to be in the sparc32 and sparc64 trees so that loosening the dependency doesn't break anything. As far as I can see it's only a matter of changing one line in a Kconfig file, that's not exactly difficult to do it in the right order.

Thanks,

Signature · 1 line
Jean Delvare
#6 lore raw

From: Jean Delvare <[email protected]>
Date: Sat, 19 Apr 2008 11:09:34 +0200

Quoted 8 lines

Guys, you're doing things the wrong way around. Breaking things to fix them later is not OK, it's a pain for testers and also when bisecting the kernel. Everything should still work after merging the powerpc tree. Dave, if you need to loosen the dependency, you should do it yourself _after_ having changed whatever needs to be in the sparc32 and sparc64 trees so that loosening the dependency doesn't break anything. As far as I can see it's only a matter of changing one line in a Kconfig file, that's not exactly difficult to do it in the right order.

Fair enough.

At least don't move this stuff under arch/powerpc as paulus originally had suggested.

#7 lore raw
In reply to Jean Delvare
Quoted 8 lines · Jean Delvare

Guys, you're doing things the wrong way around. Breaking things to fix them later is not OK, it's a pain for testers and also when bisecting the kernel. Everything should still work after merging the powerpc tree. Dave, if you need to loosen the dependency, you should do it yourself _after_ having changed whatever needs to be in the sparc32 and sparc64 trees so that loosening the dependency doesn't break anything. As far as I can see it's only a matter of changing one line in a Kconfig file, that's not exactly difficult to do it in the right order.

You're right. I'll put in a dependency on PPC_OF for now and Dave can take it out once sparc32/64 have irq_of_parse_and_map etc.

Paul.