From d5815cc57db90ee063140548e7b57b577de28f16 Mon Sep 17 00:00:00 2001 From: hhb Date: Wed, 23 Mar 2011 17:02:31 +0800 Subject: [PATCH] modify lcd driver --- arch/arm/mach-rk29/board-rk29-phonesdk.c | 38 +++++++++++++++++++++++- arch/arm/mach-rk29/include/mach/board.h | 1 - drivers/input/touchscreen/Kconfig | 30 ++----------------- drivers/input/touchscreen/Makefile | 1 + drivers/video/display/screen/Kconfig | 6 ++++ drivers/video/display/screen/Makefile | 5 ++++ drivers/video/display/screen/screen.h | 10 +++---- 7 files changed, 56 insertions(+), 35 deletions(-) diff --git a/arch/arm/mach-rk29/board-rk29-phonesdk.c b/arch/arm/mach-rk29/board-rk29-phonesdk.c index 3e4a2b858546..135d03201a01 100755 --- a/arch/arm/mach-rk29/board-rk29-phonesdk.c +++ b/arch/arm/mach-rk29/board-rk29-phonesdk.c @@ -322,7 +322,7 @@ static struct platform_device rk29_v4l2_output_devce = { .name = "rk29_vout", }; -/*HANNSTAR_P1003 touch*/ +/* HANNSTAR_P1003 touch I2C */ #if defined (CONFIG_HANNSTAR_P1003) #define TOUCH_RESET_PIN RK29_PIN6_PC3 #define TOUCH_INT_PIN RK29_PIN4_PD5 @@ -379,6 +379,8 @@ static struct gt801_platform_data gt801_info = { }; #endif +/* EETI_EGALAX touch I2C */ + #if defined (CONFIG_EETI_EGALAX) #define TOUCH_RESET_PIN RK29_PIN6_PC3 #define TOUCH_INT_PIN RK29_PIN4_PD5 @@ -413,6 +415,31 @@ static struct eeti_egalax_platform_data eeti_egalax_info = { }; #endif + +/* GT801 touch I2C */ +#if defined (CONFIG_GT801) +#include +#define TOUCH_RESET_PIN RK29_PIN6_PC3 +#define TOUCH_INT_PIN RK29_PIN4_PD5 + +static struct gt801_platform_data gt801_info = { + .model = 801, + .swap_xy = 0, + .x_min = 0, + .x_max = 480, + .y_min = 0, + .y_max = 800, + .gpio_reset = TOUCH_RESET_PIN, + .gpio_reset_active_low = 1, + .gpio_pendown = TOUCH_INT_PIN, + .pendown_iomux_name = GPIO4D5_CPUTRACECTL_NAME, + .resetpin_iomux_name = "FFF", + .pendown_iomux_mode = GPIO4H_GPIO4D5, + .resetpin_iomux_mode = 0, + .get_pendown_state = NULL, +}; +#endif + /*MMA8452 gsensor*/ #if defined (CONFIG_GS_MMA8452) #define MMA8452_INT_PIN RK29_PIN6_PC4 @@ -1434,6 +1461,15 @@ static struct i2c_board_info __initdata board_i2c2_devices[] = { .platform_data = >801_info, }, #endif +#if defined (CONFIG_GT801) + { + .type = "gt801_touch", + .addr = 0x55, + .flags = 0, + .irq = RK29_PIN4_PD5, + .platform_data = >801_info, + }, +#endif #if defined (CONFIG_MFD_WM831X_I2C) { .type = "wm8310", diff --git a/arch/arm/mach-rk29/include/mach/board.h b/arch/arm/mach-rk29/include/mach/board.h index 1470268b9887..abe5778cf62a 100755 --- a/arch/arm/mach-rk29/include/mach/board.h +++ b/arch/arm/mach-rk29/include/mach/board.h @@ -194,7 +194,6 @@ struct it7260_platform_data { void (*exit_platform_hw)(void); }; - struct akm8975_platform_data { char layouts[3][3]; char project_name[64]; diff --git a/drivers/input/touchscreen/Kconfig b/drivers/input/touchscreen/Kconfig index 425f28ba19dc..8bb1b247b4ad 100755 --- a/drivers/input/touchscreen/Kconfig +++ b/drivers/input/touchscreen/Kconfig @@ -13,7 +13,7 @@ if INPUT_TOUCHSCREEN config TOUCHSCREEN_XPT2046_SPI tristate "XPT2046 based touchscreens:SPI Interface" - depends on SPIM_RK29 + depends on SPIM_RK2818 || SPIM_RK29 config TOUCHSCREEN_XPT2046_NORMAL_SPI tristate "normal mode" @@ -63,31 +63,6 @@ config TOUCHSCREEN_XPT2046_SPI tristate "320X480 resolution" depends on TOUCHSCREEN_XPT2046_CBN_SPI -#choice -# prompt "XPT2046 based touchscreens: SPI Interface" -# default TOUCHSCREEN_XPT2046_CBN_SPI - -# config TOUCHSCREEN_XPT2046_SPI_NOCHOOSE -# bool "DO NOT CHOOSE TOUCHSCREEN_XPT2046" - -# config TOUCHSCREEN_XPT2046_SPI -# bool "800X480 TOUCHSCREEN" -# depends on SPIM_RK2818 || SPIM_RK29 - -# config TOUCHSCREEN_XPT2046_CBN_SPI -# bool "800X480 CALIBRATION TOUCHSCREEN" -# depends on SPIM_RK2818 || SPIM_RK29 - -# config TOUCHSCREEN_XPT2046_320X480_SPI -# bool "320X480 TOUCHSCREEN" -# depends on SPIM_RK2818 || SPIM_RK29 - -# config TOUCHSCREEN_XPT2046_320X480_CBN_SPI -# bool "320X480 CALIBRATION TOUCHSCREEN" -# depends on SPIM_RK2818 || SPIM_RK29 -#endchoice - - config TOUCHSCREEN_ADS7846 tristate "ADS7846/TSC2046 and ADS7843 based touchscreens" depends on SPI_MASTER @@ -119,8 +94,6 @@ config TOUCHSCREEN_AD7877 To compile this driver as a module, choose M here: the module will be called ad7877. - - config RK28_I2C_TS_NTP070 tristate "NTP070 based touchscreens: NTP070 Interface" depends on I2C_RK2818 @@ -745,4 +718,5 @@ config TOUCHSCREEN_IT7260 config TOUCHSCREEN_GT801_IIC tristate "GT801_IIC based touchscreens" depends on I2C2_RK29 + endif diff --git a/drivers/input/touchscreen/Makefile b/drivers/input/touchscreen/Makefile index 71076518e8e9..1681c0ead5b3 100644 --- a/drivers/input/touchscreen/Makefile +++ b/drivers/input/touchscreen/Makefile @@ -54,3 +54,4 @@ obj-$(CONFIG_SINTEK_3FA16) += sintek_3FA16.o obj-$(CONFIG_EETI_EGALAX) += eeti_egalax_i2c.o obj-$(CONFIG_ATMEL_MXT224) += atmel_mxt224.o obj-$(CONFIG_TOUCHSCREEN_GT801_IIC) += gt801_ts.o + diff --git a/drivers/video/display/screen/Kconfig b/drivers/video/display/screen/Kconfig index 36b9c2f54b08..e72253a93fe9 100755 --- a/drivers/video/display/screen/Kconfig +++ b/drivers/video/display/screen/Kconfig @@ -13,6 +13,8 @@ config LCD_HL070VM4AU bool "RGB_HL070VM4AU" config LCD_HSD070IDW1 bool "RGB Hannstar800x480" +config LCD_RGB_TFT480800_25_E + bool "RGB TFT480800_25_E" config LCD_HSD100PXN bool "RGB Hannstar HSD100PXN(1024X768)" config LCD_B101AW06 @@ -35,6 +37,10 @@ config LCD_MCU_TFT480800_25_E bool "MCU TFT480800_25_E" config LCD_ILI9803_CPT4_3 bool "RGB lcd_ILI9803_CPT4_3" +config LCD_IPS1P5680_V1_E + bool "MCU IPS1P5680_V1_E" +config LCD_MCU_TFT480800_25_E + bool "MCU TFT480800_25_E" config LCD_ANX7150_720P bool "anx7150 720p for default panel" ---help--- diff --git a/drivers/video/display/screen/Makefile b/drivers/video/display/screen/Makefile index 6040ec96142c..5c91e5ab9896 100755 --- a/drivers/video/display/screen/Makefile +++ b/drivers/video/display/screen/Makefile @@ -3,6 +3,7 @@ obj-$(CONFIG_TV_NULL) += tv_null.o obj-$(CONFIG_HDMI_NULL) += hdmi_null.o + obj-$(CONFIG_LCD_TD043MGEA1) += lcd_td043mgea1.o obj-$(CONFIG_LCD_HSD070IDW1) += lcd_hsd800x480.o obj-$(CONFIG_LCD_HL070VM4AU) += lcd_hl070vm4.o @@ -13,6 +14,10 @@ obj-$(CONFIG_LCD_A060SE02) += lcd_a060se02.o obj-$(CONFIG_LCD_S1D13521) += lcd_s1d13521.o obj-$(CONFIG_LCD_NT35582) += lcd_nt35582.o obj-$(CONFIG_LCD_NT35580) += lcd_nt35580.o +obj-$(CONFIG_LCD_IPS1P5680_V1_E) += lcd_ips1p5680_v1_e.o +obj-$(CONFIG_LCD_RGB_TFT480800_25_E) += lcd_rgb_tft480800_25_e.o +obj-$(CONFIG_LCD_MCU_TFT480800_25_E) += lcd_mcu_tft480800_25_e.o +obj-$(CONFIG_LCD_LS035Y8DX02A) += lcd_ls035y8dx02a.o obj-$(CONFIG_HDMI_ANX7150) += hdmi_anx7150.o diff --git a/drivers/video/display/screen/screen.h b/drivers/video/display/screen/screen.h index fb9c3f08e567..c5682c3d56e6 100755 --- a/drivers/video/display/screen/screen.h +++ b/drivers/video/display/screen/screen.h @@ -34,7 +34,7 @@ typedef enum _MCU_STATUS { } MCU_STATUS; -/* Sceen description */ +/* Screen description */ struct rk29fb_screen { /* screen type & out face */ u16 type; @@ -77,10 +77,10 @@ struct rk29fb_screen { /* Operation function*/ int (*init)(void); - int (*standby)(u8 enable); - int (*refresh)(u8 arg); - int (*scandir)(u16 dir); - int (*disparea)(u8 area); + int (*standby)(u32 enable); + int (*refresh)(u32 arg); + int (*scandir)(u32 dir); + int (*disparea)(u32 area); }; -- 2.34.1