[PATCH v2 1/1] pxa168: added initial support for TPO TD043MTEA1 LCD display on Aspenite

Previous thread: [PATCH v2] input: add multitouch slot support to w8001. by Peter Hutterer on Wednesday, August 25, 2010 - 7:01 pm. (3 messages)

Next thread: pwp test by "潘卫平(Peter Pan)" on Wednesday, August 25, 2010 - 7:07 pm. (1 message)
From: Mark F. Brown
Date: Wednesday, August 25, 2010 - 7:04 pm

Signed-off-by: Mark F. Brown <mark.brown314@gmail.com>
---
 arch/arm/mach-mmp/aspenite.c            |   60 +++++++++++++++++++++++++++++++
 arch/arm/mach-mmp/include/mach/pxa168.h |    8 ++++
 arch/arm/mach-mmp/pxa168.c              |    4 ++
 drivers/video/pxa168fb.c                |    4 +-
 4 files changed, 74 insertions(+), 2 deletions(-)

diff --git a/arch/arm/mach-mmp/aspenite.c b/arch/arm/mach-mmp/aspenite.c
index 0629394..9e1bd6b 100644
--- a/arch/arm/mach-mmp/aspenite.c
+++ b/arch/arm/mach-mmp/aspenite.c
@@ -23,6 +23,7 @@
 #include <mach/mfp-pxa168.h>
 #include <mach/pxa168.h>
 #include <mach/gpio.h>
+#include <video/pxa168fb.h>
 
 #include "common.h"
 
@@ -66,6 +67,36 @@ static unsigned long common_pin_config[] __initdata = {
 	GPIO115_I2S_BCLK,
 	GPIO116_I2S_RXD,
 	GPIO117_I2S_TXD,
+
+	/* LCD */
+	GPIO56_LCD_FCLK_RD,
+	GPIO57_LCD_LCLK_A0,
+	GPIO58_LCD_PCLK_WR,
+	GPIO59_LCD_DENA_BIAS,
+	GPIO60_LCD_DD0,
+	GPIO61_LCD_DD1,
+	GPIO62_LCD_DD2,
+	GPIO63_LCD_DD3,
+	GPIO64_LCD_DD4,
+	GPIO65_LCD_DD5,
+	GPIO66_LCD_DD6,
+	GPIO67_LCD_DD7,
+	GPIO68_LCD_DD8,
+	GPIO69_LCD_DD9,
+	GPIO70_LCD_DD10,
+	GPIO71_LCD_DD11,
+	GPIO72_LCD_DD12,
+	GPIO73_LCD_DD13,
+	GPIO74_LCD_DD14,
+	GPIO75_LCD_DD15,
+	GPIO76_LCD_DD16,
+	GPIO77_LCD_DD17,
+	GPIO78_LCD_DD18,
+	GPIO79_LCD_DD19,
+	GPIO80_LCD_DD20,
+	GPIO81_LCD_DD21,
+	GPIO82_LCD_DD22,
+	GPIO83_LCD_DD23,
 };
 
 static struct smc91x_platdata smc91x_info = {
@@ -134,6 +165,34 @@ static struct i2c_board_info aspenite_i2c_info[] __initdata = {
 	{ I2C_BOARD_INFO("wm8753", 0x1b), },
 };
 
+static struct fb_videomode video_modes[] = {
+	[0] = {
+		.pixclock	= 30120,
+		.refresh	= 60,
+		.xres		= 800,
+		.yres		= 480,
+		.hsync_len	= 1,
+		.left_margin	= 215,
+		.right_margin	= 40,
+		.vsync_len	= 1,
+		.upper_margin	= 34,
+		.lower_margin	= 10,
+		.sync		= FB_SYNC_VERT_HIGH_ACT | FB_SYNC_HOR_HIGH_ACT,
+	},
+};
+
+struct pxa168fb_mach_info aspenite_lcd_info = {
+	.id			= "Graphic Frame",
+	.modes			= ...
From: Marek Vasut
Date: Wednesday, August 25, 2010 - 7:26 pm

----------------------------------------------
^--- one patch above
SNIP, please split into two patches
v--- another patch below



Cheers
--

From: Mark F. Brown
Date: Wednesday, August 25, 2010 - 8:44 pm

Hi Marek,

1) I removed the __init because it was causing a section mismatch
warning wth this kernel. Since pxa168fb_probe() is calling
pxa168fb_init_mode(), I cannot declare pxa168fb_init_mode() as an
__init function. If pxa168fb_probe gets called after the __init
section is wiped then it will attempt to run the deleted
pxa168fb_init_mode() code.

WARNING: vmlinux.o(.data+0x17984): Section mismatch in reference from
the variable pxa168fb_driver to the function
.init.text:pxa168fb_probe()
The variable pxa168fb_driver references
the function __init pxa168fb_probe()
If the reference is valid then annotate the
variable with __init* or __refdata (see linux/init.h) or name the variable:
*_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console,


2) What is the logic behind the delineation between patch files? I
cannot build patch #1 without patch #2 based on how you defined the
split. I need all of it in order to function.

-- Mark
--

From: Haojian Zhuang
Date: Wednesday, August 25, 2010 - 8:57 pm

Patch #2 should be the first one since it's related to framebuffer
driver. The next one should be platform file.
--

From: Marek Vasut
Date: Wednesday, August 25, 2010 - 9:02 pm

Hi,



Create small patches that do not break stuff and are easy to review. By adding 
small touches, you actually create a nice whole picture in the end :)

What I'd like to see is you to keep aspenite.c additions separate from cpu-wide 
additions etc. This eventually also simplifies bisection if something goes 
wrong.

--

From: Mark F. Brown
Date: Wednesday, August 25, 2010 - 9:04 pm

Makes sense!

Will do!

-- Mark

--

Previous thread: [PATCH v2] input: add multitouch slot support to w8001. by Peter Hutterer on Wednesday, August 25, 2010 - 7:01 pm. (3 messages)

Next thread: pwp test by "潘卫平(Peter Pan)" on Wednesday, August 25, 2010 - 7:07 pm. (1 message)