diff options
author | Rom Lemarchand <rlemarchand@sta.samsung.com> | 2011-03-09 14:43:35 -0800 |
---|---|---|
committer | Arve Hjønnevåg <arve@android.com> | 2011-11-17 17:53:21 -0800 |
commit | 21078da15ecbbf246764b29bb72ba10aac7b7b79 (patch) | |
tree | 98b0a79a14abc80e6baca5041c87995db5eb5cf0 | |
parent | cdb1052e92864dbbca308238d3e7187fee3b783e (diff) | |
download | kernel_samsung_crespo-21078da15ecbbf246764b29bb72ba10aac7b7b79.zip kernel_samsung_crespo-21078da15ecbbf246764b29bb72ba10aac7b7b79.tar.gz kernel_samsung_crespo-21078da15ecbbf246764b29bb72ba10aac7b7b79.tar.bz2 |
ARM: S5PC11X: Fix check for TFT herring devices
Fix the check for TFT herring devices, and incidentally fix a GPIO
initialization bug in the touchkey-led driver.
Change-Id: I0ac8cf84d6c2bd3ea6c94af2cd1f1e29ca005da5
Signed-off-by: Rom Lemarchand <rlemarchand@sta.samsung.com>
-rw-r--r-- | arch/arm/mach-s5pv210/herring-touchkey-led.c | 4 | ||||
-rwxr-xr-x | arch/arm/mach-s5pv210/herring.h | 1 | ||||
-rwxr-xr-x | arch/arm/mach-s5pv210/mach-herring.c | 16 |
3 files changed, 12 insertions, 9 deletions
diff --git a/arch/arm/mach-s5pv210/herring-touchkey-led.c b/arch/arm/mach-s5pv210/herring-touchkey-led.c index 1dde182..4270117 100644 --- a/arch/arm/mach-s5pv210/herring-touchkey-led.c +++ b/arch/arm/mach-s5pv210/herring-touchkey-led.c @@ -17,6 +17,8 @@ #include <linux/earlysuspend.h> #include <asm/mach-types.h> +#include "herring.h" + static int led_gpios[] = { 2, 3, 6, 7 }; static void herring_touchkey_led_onoff(int onoff) @@ -48,7 +50,7 @@ static int __init herring_init_touchkey_led(void) int i; int ret = 0; - if (!machine_is_herring() || system_rev < 0x10) + if (!machine_is_herring() || !is_tft_dev()) return 0; for (i = 0; i < ARRAY_SIZE(led_gpios); i++) { diff --git a/arch/arm/mach-s5pv210/herring.h b/arch/arm/mach-s5pv210/herring.h index fbe02782..f323291 100755 --- a/arch/arm/mach-s5pv210/herring.h +++ b/arch/arm/mach-s5pv210/herring.h @@ -14,6 +14,7 @@ extern void s3c_setup_uart_cfg_gpio(unsigned char port); #define is_cdma_wimax_dev() (!!((system_rev & 0xFFF0) == 0x20)) #define is_cdma_wimax_rev0() (!!((system_rev & 0xFFFF) == 0x20)) +#define is_tft_dev() (system_rev >= 0x30) extern struct s5p_panel_data herring_panel_data; extern struct s5p_tft_panel_data herring_sony_panel_data; diff --git a/arch/arm/mach-s5pv210/mach-herring.c b/arch/arm/mach-s5pv210/mach-herring.c index c6c8f17..ddbcdf2 100755 --- a/arch/arm/mach-s5pv210/mach-herring.c +++ b/arch/arm/mach-s5pv210/mach-herring.c @@ -969,7 +969,7 @@ static struct max8998_charger_data herring_charger = { static void set_adc_table(void) { - if (system_rev < 0x30) { + if (!is_tft_dev()) { herring_charger.adc_table = temper_table_oled; herring_charger.adc_array_size = ARRAY_SIZE(temper_table_oled); @@ -1057,7 +1057,7 @@ static void panel_cfg_gpio(struct platform_device *pdev) s3c_gpio_setpull(S5PV210_MP04(3), S3C_GPIO_PULL_NONE); /* OLED_ID */ - if (system_rev >= 0x30) { + if (is_tft_dev()) { s3c_gpio_cfgpin(GPIO_OLED_ID, S3C_GPIO_INPUT); s3c_gpio_setpull(GPIO_OLED_ID, S3C_GPIO_PULL_DOWN); } @@ -1128,7 +1128,7 @@ void lcd_cfg_gpio_early_suspend(void) gpio_set_value(GPIO_DISPLAY_SI, 0); /* OLED_ID */ - if (system_rev < 0x30) { + if (!is_tft_dev()) { s3c_gpio_cfgpin(GPIO_OLED_ID, S3C_GPIO_INPUT); s3c_gpio_setpull(GPIO_OLED_ID, S3C_GPIO_PULL_DOWN); /* gpio_set_value(GPIO_OLED_ID, 0); */ @@ -1147,7 +1147,7 @@ void lcd_cfg_gpio_late_resume(void) s3c_gpio_cfgpin(GPIO_OLED_DET, S3C_GPIO_INPUT); s3c_gpio_setpull(GPIO_OLED_DET, S3C_GPIO_PULL_NONE); /* OLED_ID */ - if (system_rev < 0x30) { + if (!is_tft_dev()) { s3c_gpio_cfgpin(GPIO_OLED_ID, S3C_GPIO_OUTPUT); s3c_gpio_setpull(GPIO_OLED_ID, S3C_GPIO_PULL_NONE); /* gpio_set_value(GPIO_OLED_ID, 0); */ @@ -2412,7 +2412,7 @@ static struct i2c_board_info i2c_devs2[] __initdata = { static void mxt224_init(void) { - if (system_rev < 0x30) + if (!is_tft_dev()) return; mxt224_data.max_y = 950; t9_config[8] = 45; @@ -4899,7 +4899,7 @@ static void __init herring_machine_init(void) setup_ram_console_mem(); s3c_usb_set_serial(); platform_add_devices(herring_devices, ARRAY_SIZE(herring_devices)); - if (system_rev < 0x30) + if (!is_tft_dev()) platform_device_register(&herring_i2c5_device); /* Find out S5PC110 chip version */ @@ -4968,7 +4968,7 @@ static void __init herring_machine_init(void) if (system_rev == 0x04) i2c_register_board_info(5, i2c_devs5, ARRAY_SIZE(i2c_devs5)); i2c_register_board_info(6, i2c_devs6, ARRAY_SIZE(i2c_devs6)); - if (system_rev < 0x30) { + if (!is_tft_dev()) { /* Touch Key */ touch_keypad_gpio_init(); i2c_register_board_info(10, i2c_devs10, ARRAY_SIZE(i2c_devs10)); @@ -5000,7 +5000,7 @@ static void __init herring_machine_init(void) i2c_register_board_info(15, i2c_devs15, ARRAY_SIZE(i2c_devs15)); } - if (system_rev < 0x30) { + if (!is_tft_dev()) { spi_register_board_info(spi_board_info, ARRAY_SIZE(spi_board_info)); s3cfb_set_platdata(&tl2796_data); |