Re: [PATCH v3 06/17] OMAP2,3 DSS2 Move DSS driver register from board file to devices.c

2011-01-05 Thread Tomi Valkeinen
Hi,

On Mon, 2011-01-03 at 18:20 +0530, ext Guruswamy Senthilvadivu wrote:
 From: Senthilvadivu Guruswamy svad...@ti.com
 
 omap_display_init function is introduced in devices.c to do the DSS driver
 registration.  So replace platform_device_register or platform_add_devices of
 DSS with omap_display_init().

This and two previous patches are missing a color in the subject.

I'm also ok with Kevin's suggestion to put display code in separate
file. There's other stuff to add there also at some point, like changing
pinmuxing.

Also, I think it would be cleaner to first add the new code to devices.c
(or display.c) and display.h in one patch, then in another patch change
the board files to use this new display init.

 Tomi


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


Re: [PATCH v3 06/17] OMAP2,3 DSS2 Move DSS driver register from board file to devices.c

2011-01-05 Thread Semwal, Sumit
Hi Tomi,

On Wed, Jan 5, 2011 at 4:21 PM, Tomi Valkeinen tomi.valkei...@nokia.com wrote:
 Hi,

 On Mon, 2011-01-03 at 18:20 +0530, ext Guruswamy Senthilvadivu wrote:
 From: Senthilvadivu Guruswamy svad...@ti.com

 omap_display_init function is introduced in devices.c to do the DSS driver
 registration.  So replace platform_device_register or platform_add_devices of
 DSS with omap_display_init().

 This and two previous patches are missing a color in the subject.

 I'm also ok with Kevin's suggestion to put display code in separate
 file. There's other stuff to add there also at some point, like changing
 pinmuxing.

 Also, I think it would be cleaner to first add the new code to devices.c
 (or display.c) and display.h in one patch, then in another patch change
 the board files to use this new display init.
Since Senthil is going to be out for some time, I am in the process of
updating this patch-set based on Kevin's, Tony's and your comment. I
should be able to give you the updated set pretty soon.

Best regards,
~Sumit.

  Tomi


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

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


Re: [PATCH v3 06/17] OMAP2,3 DSS2 Move DSS driver register from board file to devices.c

2011-01-04 Thread Kevin Hilman
Guruswamy Senthilvadivu svad...@ti.com writes:

 From: Senthilvadivu Guruswamy svad...@ti.com

 omap_display_init function is introduced in devices.c to do the DSS driver
 registration.  So replace platform_device_register or platform_add_devices of
 DSS with omap_display_init().

 Signed-off-by: Senthilvadivu Guruswamy svad...@ti.com

Minor nit: rather than continuing to grow devices.c, how about creating
a new display.c that handles this.

Kevin

 ---
  arch/arm/mach-omap2/board-3430sdp.c   |   14 +---
  arch/arm/mach-omap2/board-am3517evm.c |   16 +-
  arch/arm/mach-omap2/board-cm-t35.c|   10 +
  arch/arm/mach-omap2/board-devkit8000.c|   10 +
  arch/arm/mach-omap2/board-igep0020.c  |   10 +
  arch/arm/mach-omap2/board-omap3beagle.c   |   10 +
  arch/arm/mach-omap2/board-omap3evm.c  |   14 +---
  arch/arm/mach-omap2/board-omap3pandora.c  |   10 +
  arch/arm/mach-omap2/board-omap3stalker.c  |   10 +
  arch/arm/mach-omap2/board-rx51-video.c|   15 +
  arch/arm/mach-omap2/devices.c |   32 
 +
  arch/arm/plat-omap/include/plat/display.h |4 +++
  12 files changed, 46 insertions(+), 109 deletions(-)

 diff --git a/arch/arm/mach-omap2/board-3430sdp.c 
 b/arch/arm/mach-omap2/board-3430sdp.c
 index 29e56a2..e1a3318 100644
 --- a/arch/arm/mach-omap2/board-3430sdp.c
 +++ b/arch/arm/mach-omap2/board-3430sdp.c
 @@ -301,21 +301,9 @@ static struct omap_dss_board_info sdp3430_dss_data = {
   .default_device = sdp3430_lcd_device,
  };
  
 -static struct platform_device sdp3430_dss_device = {
 - .name   = omap_display,
 - .id = -1,
 - .dev= {
 - .platform_data = sdp3430_dss_data,
 - },
 -};
 -
  static struct regulator_consumer_supply sdp3430_vdda_dac_supply =
   REGULATOR_SUPPLY(vdda_dac, omap_display);
  
 -static struct platform_device *sdp3430_devices[] __initdata = {
 - sdp3430_dss_device,
 -};
 -
  static struct omap_board_config_kernel sdp3430_config[] __initdata = {
  };
  
 @@ -790,7 +778,7 @@ static void __init omap_3430sdp_init(void)
  {
   omap3_mux_init(board_mux, OMAP_PACKAGE_CBB);
   omap3430_i2c_init();
 - platform_add_devices(sdp3430_devices, ARRAY_SIZE(sdp3430_devices));
 + omap_display_init(sdp3430_dss_data);
   if (omap_rev()  OMAP3430_REV_ES1_0)
   ts_gpio = SDP3430_TS_GPIO_IRQ_SDPV2;
   else
 diff --git a/arch/arm/mach-omap2/board-am3517evm.c 
 b/arch/arm/mach-omap2/board-am3517evm.c
 index 2b37dcf..782d270 100644
 --- a/arch/arm/mach-omap2/board-am3517evm.c
 +++ b/arch/arm/mach-omap2/board-am3517evm.c
 @@ -367,24 +367,12 @@ static struct omap_dss_board_info am3517_evm_dss_data = 
 {
   .default_device = am3517_evm_lcd_device,
  };
  
 -static struct platform_device am3517_evm_dss_device = {
 - .name   = omap_display,
 - .id = -1,
 - .dev= {
 - .platform_data  = am3517_evm_dss_data,
 - },
 -};
 -
  /*
   * Board initialization
   */
  static struct omap_board_config_kernel am3517_evm_config[] __initdata = {
  };
  
 -static struct platform_device *am3517_evm_devices[] __initdata = {
 - am3517_evm_dss_device,
 -};
 -
  static void __init am3517_evm_init_irq(void)
  {
   omap_board_config = am3517_evm_config;
 @@ -484,9 +472,7 @@ static void __init am3517_evm_init(void)
   omap3_mux_init(board_mux, OMAP_PACKAGE_CBB);
  
   am3517_evm_i2c_init();
 - platform_add_devices(am3517_evm_devices,
 - ARRAY_SIZE(am3517_evm_devices));
 -
 + omap_display_init(am3517_evm_dss_data);
   omap_serial_init();
  
   /* Configure GPIO for EHCI port */
 diff --git a/arch/arm/mach-omap2/board-cm-t35.c 
 b/arch/arm/mach-omap2/board-cm-t35.c
 index 307e93a..c5e80ad 100644
 --- a/arch/arm/mach-omap2/board-cm-t35.c
 +++ b/arch/arm/mach-omap2/board-cm-t35.c
 @@ -390,14 +390,6 @@ static struct omap_dss_board_info cm_t35_dss_data = {
   .default_device = cm_t35_dvi_device,
  };
  
 -static struct platform_device cm_t35_dss_device = {
 - .name   = omap_display,
 - .id = -1,
 - .dev= {
 - .platform_data = cm_t35_dss_data,
 - },
 -};
 -
  static struct omap2_mcspi_device_config tdo24m_mcspi_config = {
   .turbo_mode = 0,
   .single_channel = 1,/* 0: slave, 1: master */
 @@ -457,7 +449,7 @@ static void __init cm_t35_init_display(void)
   msleep(50);
   gpio_set_value(lcd_en_gpio, 1);
  
 - err = platform_device_register(cm_t35_dss_device);
 + err = omap_display_init(cm_t35_dss_data);
   if (err) {
   pr_err(CM-T35: failed to register DSS device\n);
   goto err_dev_reg;
 diff --git a/arch/arm/mach-omap2/board-devkit8000.c 
 b/arch/arm/mach-omap2/board-devkit8000.c
 index f948435..78f2951 100644
 --- 

[PATCH v3 06/17] OMAP2,3 DSS2 Move DSS driver register from board file to devices.c

2011-01-03 Thread Guruswamy Senthilvadivu
From: Senthilvadivu Guruswamy svad...@ti.com

omap_display_init function is introduced in devices.c to do the DSS driver
registration.  So replace platform_device_register or platform_add_devices of
DSS with omap_display_init().

Signed-off-by: Senthilvadivu Guruswamy svad...@ti.com
---
 arch/arm/mach-omap2/board-3430sdp.c   |   14 +---
 arch/arm/mach-omap2/board-am3517evm.c |   16 +-
 arch/arm/mach-omap2/board-cm-t35.c|   10 +
 arch/arm/mach-omap2/board-devkit8000.c|   10 +
 arch/arm/mach-omap2/board-igep0020.c  |   10 +
 arch/arm/mach-omap2/board-omap3beagle.c   |   10 +
 arch/arm/mach-omap2/board-omap3evm.c  |   14 +---
 arch/arm/mach-omap2/board-omap3pandora.c  |   10 +
 arch/arm/mach-omap2/board-omap3stalker.c  |   10 +
 arch/arm/mach-omap2/board-rx51-video.c|   15 +
 arch/arm/mach-omap2/devices.c |   32 +
 arch/arm/plat-omap/include/plat/display.h |4 +++
 12 files changed, 46 insertions(+), 109 deletions(-)

diff --git a/arch/arm/mach-omap2/board-3430sdp.c 
b/arch/arm/mach-omap2/board-3430sdp.c
index 29e56a2..e1a3318 100644
--- a/arch/arm/mach-omap2/board-3430sdp.c
+++ b/arch/arm/mach-omap2/board-3430sdp.c
@@ -301,21 +301,9 @@ static struct omap_dss_board_info sdp3430_dss_data = {
.default_device = sdp3430_lcd_device,
 };
 
-static struct platform_device sdp3430_dss_device = {
-   .name   = omap_display,
-   .id = -1,
-   .dev= {
-   .platform_data = sdp3430_dss_data,
-   },
-};
-
 static struct regulator_consumer_supply sdp3430_vdda_dac_supply =
REGULATOR_SUPPLY(vdda_dac, omap_display);
 
-static struct platform_device *sdp3430_devices[] __initdata = {
-   sdp3430_dss_device,
-};
-
 static struct omap_board_config_kernel sdp3430_config[] __initdata = {
 };
 
@@ -790,7 +778,7 @@ static void __init omap_3430sdp_init(void)
 {
omap3_mux_init(board_mux, OMAP_PACKAGE_CBB);
omap3430_i2c_init();
-   platform_add_devices(sdp3430_devices, ARRAY_SIZE(sdp3430_devices));
+   omap_display_init(sdp3430_dss_data);
if (omap_rev()  OMAP3430_REV_ES1_0)
ts_gpio = SDP3430_TS_GPIO_IRQ_SDPV2;
else
diff --git a/arch/arm/mach-omap2/board-am3517evm.c 
b/arch/arm/mach-omap2/board-am3517evm.c
index 2b37dcf..782d270 100644
--- a/arch/arm/mach-omap2/board-am3517evm.c
+++ b/arch/arm/mach-omap2/board-am3517evm.c
@@ -367,24 +367,12 @@ static struct omap_dss_board_info am3517_evm_dss_data = {
.default_device = am3517_evm_lcd_device,
 };
 
-static struct platform_device am3517_evm_dss_device = {
-   .name   = omap_display,
-   .id = -1,
-   .dev= {
-   .platform_data  = am3517_evm_dss_data,
-   },
-};
-
 /*
  * Board initialization
  */
 static struct omap_board_config_kernel am3517_evm_config[] __initdata = {
 };
 
-static struct platform_device *am3517_evm_devices[] __initdata = {
-   am3517_evm_dss_device,
-};
-
 static void __init am3517_evm_init_irq(void)
 {
omap_board_config = am3517_evm_config;
@@ -484,9 +472,7 @@ static void __init am3517_evm_init(void)
omap3_mux_init(board_mux, OMAP_PACKAGE_CBB);
 
am3517_evm_i2c_init();
-   platform_add_devices(am3517_evm_devices,
-   ARRAY_SIZE(am3517_evm_devices));
-
+   omap_display_init(am3517_evm_dss_data);
omap_serial_init();
 
/* Configure GPIO for EHCI port */
diff --git a/arch/arm/mach-omap2/board-cm-t35.c 
b/arch/arm/mach-omap2/board-cm-t35.c
index 307e93a..c5e80ad 100644
--- a/arch/arm/mach-omap2/board-cm-t35.c
+++ b/arch/arm/mach-omap2/board-cm-t35.c
@@ -390,14 +390,6 @@ static struct omap_dss_board_info cm_t35_dss_data = {
.default_device = cm_t35_dvi_device,
 };
 
-static struct platform_device cm_t35_dss_device = {
-   .name   = omap_display,
-   .id = -1,
-   .dev= {
-   .platform_data = cm_t35_dss_data,
-   },
-};
-
 static struct omap2_mcspi_device_config tdo24m_mcspi_config = {
.turbo_mode = 0,
.single_channel = 1,/* 0: slave, 1: master */
@@ -457,7 +449,7 @@ static void __init cm_t35_init_display(void)
msleep(50);
gpio_set_value(lcd_en_gpio, 1);
 
-   err = platform_device_register(cm_t35_dss_device);
+   err = omap_display_init(cm_t35_dss_data);
if (err) {
pr_err(CM-T35: failed to register DSS device\n);
goto err_dev_reg;
diff --git a/arch/arm/mach-omap2/board-devkit8000.c 
b/arch/arm/mach-omap2/board-devkit8000.c
index f948435..78f2951 100644
--- a/arch/arm/mach-omap2/board-devkit8000.c
+++ b/arch/arm/mach-omap2/board-devkit8000.c
@@ -188,14 +188,6 @@ static struct omap_dss_board_info devkit8000_dss_data = {
.default_device = devkit8000_lcd_device,
 };
 
-static