aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-s3c64xx/mach-smartq5.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-s3c64xx/mach-smartq5.c')
-rw-r--r--arch/arm/mach-s3c64xx/mach-smartq5.c39
1 files changed, 5 insertions, 34 deletions
diff --git a/arch/arm/mach-s3c64xx/mach-smartq5.c b/arch/arm/mach-s3c64xx/mach-smartq5.c
index 1d0326ead90f..a4d59b076e3d 100644
--- a/arch/arm/mach-s3c64xx/mach-smartq5.c
+++ b/arch/arm/mach-s3c64xx/mach-smartq5.c
@@ -12,7 +12,6 @@
12#include <linux/fb.h> 12#include <linux/fb.h>
13#include <linux/gpio.h> 13#include <linux/gpio.h>
14#include <linux/gpio_keys.h> 14#include <linux/gpio_keys.h>
15#include <linux/i2c-gpio.h>
16#include <linux/init.h> 15#include <linux/init.h>
17#include <linux/input.h> 16#include <linux/input.h>
18#include <linux/leds.h> 17#include <linux/leds.h>
@@ -33,31 +32,6 @@
33 32
34#include "mach-smartq.h" 33#include "mach-smartq.h"
35 34
36static void __init smartq5_lcd_setup_gpio(void)
37{
38 gpio_request(S3C64XX_GPM(0), "LCD SCEN pin");
39 gpio_request(S3C64XX_GPM(1), "LCD SCL pin");
40 gpio_request(S3C64XX_GPM(2), "LCD SDA pin");
41 gpio_request(S3C64XX_GPM(3), "LCD power");
42
43 /* turn power off */
44 gpio_direction_output(S3C64XX_GPM(0), 1);
45 gpio_direction_input(S3C64XX_GPM(1));
46 gpio_direction_input(S3C64XX_GPM(2));
47 gpio_direction_output(S3C64XX_GPM(3), 0);
48}
49
50static struct i2c_gpio_platform_data smartq5_lcd_control = {
51 .sda_pin = S3C64XX_GPM(2),
52 .scl_pin = S3C64XX_GPM(1),
53};
54
55static struct platform_device smartq5_lcd_control_device = {
56 .name = "i2c-gpio",
57 .id = 1,
58 .dev.platform_data = &smartq5_lcd_control,
59};
60
61static struct gpio_led smartq5_leds[] __initdata = { 35static struct gpio_led smartq5_leds[] __initdata = {
62 { 36 {
63 .name = "smartq5:green", 37 .name = "smartq5:green",
@@ -134,16 +108,15 @@ static struct platform_device smartq5_buttons_device = {
134 108
135static struct s3c_fb_pd_win smartq5_fb_win0 = { 109static struct s3c_fb_pd_win smartq5_fb_win0 = {
136 .win_mode = { 110 .win_mode = {
137 .pixclock = 1000000000000ULL / 111 .left_margin = 216,
138 ((40+1+216+800)*(10+1+35+480)*80), 112 .right_margin = 40,
139 .left_margin = 40, 113 .upper_margin = 35,
140 .right_margin = 216, 114 .lower_margin = 10,
141 .upper_margin = 10,
142 .lower_margin = 35,
143 .hsync_len = 1, 115 .hsync_len = 1,
144 .vsync_len = 1, 116 .vsync_len = 1,
145 .xres = 800, 117 .xres = 800,
146 .yres = 480, 118 .yres = 480,
119 .refresh = 80,
147 }, 120 },
148 .max_bpp = 32, 121 .max_bpp = 32,
149 .default_bpp = 16, 122 .default_bpp = 16,
@@ -160,7 +133,6 @@ static struct s3c_fb_platdata smartq5_lcd_pdata __initdata = {
160static struct platform_device *smartq5_devices[] __initdata = { 133static struct platform_device *smartq5_devices[] __initdata = {
161 &smartq5_leds_device, 134 &smartq5_leds_device,
162 &smartq5_buttons_device, 135 &smartq5_buttons_device,
163 &smartq5_lcd_control_device,
164}; 136};
165 137
166static void __init smartq5_machine_init(void) 138static void __init smartq5_machine_init(void)
@@ -168,7 +140,6 @@ static void __init smartq5_machine_init(void)
168 s3c_fb_set_platdata(&smartq5_lcd_pdata); 140 s3c_fb_set_platdata(&smartq5_lcd_pdata);
169 141
170 smartq_machine_init(); 142 smartq_machine_init();
171 smartq5_lcd_setup_gpio();
172 143
173 platform_add_devices(smartq5_devices, ARRAY_SIZE(smartq5_devices)); 144 platform_add_devices(smartq5_devices, ARRAY_SIZE(smartq5_devices));
174} 145}