Re: [PATCH 7/7] omap3 evm, beagle and overo use the generic twl4030 script

2008-10-14 Thread David Brownell
On Monday 13 October 2008, Peter 'p2' De Schrijver wrote:
   +extern struct twl4030_power_data generic3430_t2scripts_data;
  
  Such extern decls should as a rule be in header files...
  
  In this case the rule is appropriate, since you've got the
  same decl in three different places.  That's about two times
  more often than I'm comfortable making exceptions to such a
  rule ... :)
 
 Please suggest an appropriate header file. I couldn't find one and
 creating a header file for a single extern declaration ?

Maybe arch/arm/mach-omap2/pm.h would be the most natural fit.

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 7/7] omap3 evm, beagle and overo use the generic twl4030 script

2008-10-13 Thread Peter 'p2' De Schrijver
On Fri, Oct 10, 2008 at 10:50:29AM -0700, ext David Brownell wrote:
 On Friday 10 October 2008, Peter 'p2' De Schrijver wrote:
  +extern struct twl4030_power_data generic3430_t2scripts_data;
 
 Such extern decls should as a rule be in header files...
 
 In this case the rule is appropriate, since you've got the
 same decl in three different places.  That's about two times
 more often than I'm comfortable making exceptions to such a
 rule ... :)

Please suggest an appropriate header file. I couldn't find one and
creating a header file for a single extern declaration ?

Cheers,

Peter.

-- 
goa is a state of mind
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 7/7] omap3 evm, beagle and overo use the generic twl4030 script

2008-10-13 Thread Peter 'p2' De Schrijver
Make omap3 evm, beagle and overo use the generic twl4030 script.

Signed-off-by: Peter 'p2' De Schrijver [EMAIL PROTECTED]
---
 arch/arm/mach-omap2/Makefile|9 ++---
 arch/arm/mach-omap2/board-omap3beagle.c |4 ++--
 arch/arm/mach-omap2/board-omap3evm.c|4 ++--
 arch/arm/mach-omap2/board-overo.c   |4 ++--
 4 files changed, 12 insertions(+), 9 deletions(-)

diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile
index 33de217..ed0cd7a 100644
--- a/arch/arm/mach-omap2/Makefile
+++ b/arch/arm/mach-omap2/Makefile
@@ -58,10 +58,12 @@ obj-$(CONFIG_MACH_OMAP_3430SDP) += 
board-3430sdp.o \
 obj-$(CONFIG_MACH_OMAP3EVM)+= board-omap3evm.o \
   hsmmc.o \
   usb-musb.o usb-ehci.o \
-  board-omap3evm-flash.o
+  board-omap3evm-flash.o \
+  twl4030-generic-scripts.o
 obj-$(CONFIG_MACH_OMAP3_BEAGLE)+= board-omap3beagle.o \
   usb-musb.o usb-ehci.o \
-  hsmmc.o
+  hsmmc.o \
+  twl4030-generic-scripts.o
 obj-$(CONFIG_MACH_OMAP_LDP)+= board-ldp.o \
   hsmmc.o \
   usb-musb.o
@@ -77,7 +79,8 @@ obj-$(CONFIG_MACH_NOKIA_N810) += board-n810.o
 obj-$(CONFIG_MACH_OVERO)   += board-overo.o \
   hsmmc.o \
   usb-musb.o \
-  usb-ehci.o
+  usb-ehci.o \
+  twl4030-generic-scripts.o
 
 # TUSB 6010 chips
 obj-$(CONFIG_MACH_OMAP2_TUSB6010)  += usb-tusb6010.o
diff --git a/arch/arm/mach-omap2/board-omap3beagle.c 
b/arch/arm/mach-omap2/board-omap3beagle.c
index 19702c7..cc9506b 100644
--- a/arch/arm/mach-omap2/board-omap3beagle.c
+++ b/arch/arm/mach-omap2/board-omap3beagle.c
@@ -24,8 +24,6 @@
 #include linux/input.h
 #include linux/gpio_keys.h
 
-#include linux/i2c/twl4030.h
-
 #include linux/mtd/mtd.h
 #include linux/mtd/partitions.h
 #include linux/mtd/nand.h
@@ -45,6 +43,7 @@
 #include mach/nand.h
 #include mach/mux.h
 
+#include twl4030-generic-scripts.h
 
 #define GPMC_CS0_BASE  0x60
 #define GPMC_CS_SIZE   0x30
@@ -149,6 +148,7 @@ static struct twl4030_platform_data beagle_twldata = {
/* platform_data for children goes here */
.usb= beagle_usb_data,
.gpio   = beagle_gpio_data,
+   .power  = generic3430_t2scripts_data,
 };
 
 static struct i2c_board_info __initdata beagle_i2c_boardinfo[] = {
diff --git a/arch/arm/mach-omap2/board-omap3evm.c 
b/arch/arm/mach-omap2/board-omap3evm.c
index 3538067..a72772f 100644
--- a/arch/arm/mach-omap2/board-omap3evm.c
+++ b/arch/arm/mach-omap2/board-omap3evm.c
@@ -20,8 +20,6 @@
 #include linux/clk.h
 #include linux/input.h
 
-#include linux/i2c/twl4030.h
-
 #include linux/spi/spi.h
 #include linux/spi/ads7846.h
 #include linux/i2c/twl4030.h
@@ -41,6 +39,7 @@
 #include mach/mcspi.h
 
 #include sdram-micron-mt46h32m32lf-6.h
+#include twl4030-generic-scripts.h
 
 static struct resource omap3evm_smc911x_resources[] = {
[0] =   {
@@ -139,6 +138,7 @@ static struct twl4030_platform_data omap3evm_twldata = {
.keypad = omap3evm_kp_data,
.madc   = omap3evm_madc_data,
.usb= omap3evm_usb_data,
+   .power  = generic3430_t2scripts_data,
.gpio   = omap3evm_gpio_data,
 };
 
diff --git a/arch/arm/mach-omap2/board-overo.c 
b/arch/arm/mach-omap2/board-overo.c
index 4e2781a..b0e5cec 100644
--- a/arch/arm/mach-omap2/board-overo.c
+++ b/arch/arm/mach-omap2/board-overo.c
@@ -27,8 +27,6 @@
 #include linux/kernel.h
 #include linux/platform_device.h
 
-#include linux/i2c/twl4030.h
-
 #include linux/mtd/mtd.h
 #include linux/mtd/nand.h
 #include linux/mtd/partitions.h
@@ -50,6 +48,7 @@
 #include mach/usb-musb.h
 
 #include sdram-micron-mt46h32m32lf-6.h
+#include twl4030-generic-scripts.h
 
 #define NAND_BLOCK_SIZE SZ_128K
 #define GPMC_CS0_BASE  0x60
@@ -160,6 +159,7 @@ static struct twl4030_platform_data overo_twldata = {
.irq_end= TWL4030_IRQ_END,
.gpio   = overo_gpio_data,
.usb= overo_usb_data,
+   .power  = generic3430_t2scripts_data,
 };
 
 static struct i2c_board_info __initdata overo_i2c_boardinfo[] = {
-- 
1.5.6.3

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 7/7] omap3 evm, beagle and overo use the generic twl4030 script

2008-10-10 Thread Peter 'p2' De Schrijver
Make omap3 evm, beagle and overo use the generic twl4030 script.

Signed-off-by: Peter 'p2' De Schrijver [EMAIL PROTECTED]
---
 arch/arm/mach-omap2/Makefile|9 ++---
 arch/arm/mach-omap2/board-omap3beagle.c |3 +++
 arch/arm/mach-omap2/board-omap3evm.c|3 +++
 arch/arm/mach-omap2/board-overo.c   |3 +++
 4 files changed, 15 insertions(+), 3 deletions(-)

diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile
index 33de217..ed0cd7a 100644
--- a/arch/arm/mach-omap2/Makefile
+++ b/arch/arm/mach-omap2/Makefile
@@ -58,10 +58,12 @@ obj-$(CONFIG_MACH_OMAP_3430SDP) += 
board-3430sdp.o \
 obj-$(CONFIG_MACH_OMAP3EVM)+= board-omap3evm.o \
   hsmmc.o \
   usb-musb.o usb-ehci.o \
-  board-omap3evm-flash.o
+  board-omap3evm-flash.o \
+  twl4030-generic-scripts.o
 obj-$(CONFIG_MACH_OMAP3_BEAGLE)+= board-omap3beagle.o \
   usb-musb.o usb-ehci.o \
-  hsmmc.o
+  hsmmc.o \
+  twl4030-generic-scripts.o
 obj-$(CONFIG_MACH_OMAP_LDP)+= board-ldp.o \
   hsmmc.o \
   usb-musb.o
@@ -77,7 +79,8 @@ obj-$(CONFIG_MACH_NOKIA_N810) += board-n810.o
 obj-$(CONFIG_MACH_OVERO)   += board-overo.o \
   hsmmc.o \
   usb-musb.o \
-  usb-ehci.o
+  usb-ehci.o \
+  twl4030-generic-scripts.o
 
 # TUSB 6010 chips
 obj-$(CONFIG_MACH_OMAP2_TUSB6010)  += usb-tusb6010.o
diff --git a/arch/arm/mach-omap2/board-omap3beagle.c 
b/arch/arm/mach-omap2/board-omap3beagle.c
index 19702c7..1579a5e 100644
--- a/arch/arm/mach-omap2/board-omap3beagle.c
+++ b/arch/arm/mach-omap2/board-omap3beagle.c
@@ -51,6 +51,8 @@
 
 #define NAND_BLOCK_SIZESZ_128K
 
+extern struct twl4030_power_data generic3430_t2scripts_data;
+
 static struct mtd_partition omap3beagle_nand_partitions[] = {
/* All the partition sizes are listed in terms of NAND block size */
{
@@ -149,6 +151,7 @@ static struct twl4030_platform_data beagle_twldata = {
/* platform_data for children goes here */
.usb= beagle_usb_data,
.gpio   = beagle_gpio_data,
+   .power  = generic3430_t2scripts_data,
 };
 
 static struct i2c_board_info __initdata beagle_i2c_boardinfo[] = {
diff --git a/arch/arm/mach-omap2/board-omap3evm.c 
b/arch/arm/mach-omap2/board-omap3evm.c
index 3538067..dd7d1b7 100644
--- a/arch/arm/mach-omap2/board-omap3evm.c
+++ b/arch/arm/mach-omap2/board-omap3evm.c
@@ -42,6 +42,8 @@
 
 #include sdram-micron-mt46h32m32lf-6.h
 
+extern struct twl4030_power_data generic3430_t2scripts_data;
+
 static struct resource omap3evm_smc911x_resources[] = {
[0] =   {
.start  = OMAP3EVM_ETHR_START,
@@ -139,6 +141,7 @@ static struct twl4030_platform_data omap3evm_twldata = {
.keypad = omap3evm_kp_data,
.madc   = omap3evm_madc_data,
.usb= omap3evm_usb_data,
+   .power  = generic3430_t2scripts_data,
.gpio   = omap3evm_gpio_data,
 };
 
diff --git a/arch/arm/mach-omap2/board-overo.c 
b/arch/arm/mach-omap2/board-overo.c
index 4e2781a..4d2203f 100644
--- a/arch/arm/mach-omap2/board-overo.c
+++ b/arch/arm/mach-omap2/board-overo.c
@@ -55,6 +55,8 @@
 #define GPMC_CS0_BASE  0x60
 #define GPMC_CS_SIZE   0x30
 
+extern struct twl4030_power_data generic3430_t2scripts_data;
+
 static struct mtd_partition overo_nand_partitions[] = {
{
.name   = xloader,
@@ -160,6 +162,7 @@ static struct twl4030_platform_data overo_twldata = {
.irq_end= TWL4030_IRQ_END,
.gpio   = overo_gpio_data,
.usb= overo_usb_data,
+   .power  = generic3430_t2scripts_data,
 };
 
 static struct i2c_board_info __initdata overo_i2c_boardinfo[] = {
-- 
1.5.6.3

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 7/7] omap3 evm, beagle and overo use the generic twl4030 script

2008-10-10 Thread David Brownell
On Friday 10 October 2008, Peter 'p2' De Schrijver wrote:
 +extern struct twl4030_power_data generic3430_t2scripts_data;

Such extern decls should as a rule be in header files...

In this case the rule is appropriate, since you've got the
same decl in three different places.  That's about two times
more often than I'm comfortable making exceptions to such a
rule ... :)

- Dave

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html