aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-s3c64xx/mach-smartq5.c
diff options
context:
space:
mode:
authorBen Dooks <ben-linux@fluff.org>2010-08-14 11:34:38 -0400
committerBen Dooks <ben-linux@fluff.org>2010-08-14 11:34:38 -0400
commita739260d4e3d88c5c810b14231dbdce73665b0b2 (patch)
tree352aeed2d9dad32503eb465eee450e048e309576 /arch/arm/mach-s3c64xx/mach-smartq5.c
parentd92342df2a06baa8f5d7bf609b0bc0dc87067e82 (diff)
parent001ca74f185f32bd8383146f9ffedd2de9b882ed (diff)
Merge branch 'for-2636/s3c64xx' into for-linus/samsung-2635
Diffstat (limited to 'arch/arm/mach-s3c64xx/mach-smartq5.c')
-rw-r--r--arch/arm/mach-s3c64xx/mach-smartq5.c36
1 files changed, 4 insertions, 32 deletions
diff --git a/arch/arm/mach-s3c64xx/mach-smartq5.c b/arch/arm/mach-s3c64xx/mach-smartq5.c
index 1d0326ead90f..70bcbcac4f0f 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",
@@ -136,10 +110,10 @@ static struct s3c_fb_pd_win smartq5_fb_win0 = {
136 .win_mode = { 110 .win_mode = {
137 .pixclock = 1000000000000ULL / 111 .pixclock = 1000000000000ULL /
138 ((40+1+216+800)*(10+1+35+480)*80), 112 ((40+1+216+800)*(10+1+35+480)*80),
139 .left_margin = 40, 113 .left_margin = 216,
140 .right_margin = 216, 114 .right_margin = 40,
141 .upper_margin = 10, 115 .upper_margin = 35,
142 .lower_margin = 35, 116 .lower_margin = 10,
143 .hsync_len = 1, 117 .hsync_len = 1,
144 .vsync_len = 1, 118 .vsync_len = 1,
145 .xres = 800, 119 .xres = 800,
@@ -160,7 +134,6 @@ static struct s3c_fb_platdata smartq5_lcd_pdata __initdata = {
160static struct platform_device *smartq5_devices[] __initdata = { 134static struct platform_device *smartq5_devices[] __initdata = {
161 &smartq5_leds_device, 135 &smartq5_leds_device,
162 &smartq5_buttons_device, 136 &smartq5_buttons_device,
163 &smartq5_lcd_control_device,
164}; 137};
165 138
166static void __init smartq5_machine_init(void) 139static void __init smartq5_machine_init(void)
@@ -168,7 +141,6 @@ static void __init smartq5_machine_init(void)
168 s3c_fb_set_platdata(&smartq5_lcd_pdata); 141 s3c_fb_set_platdata(&smartq5_lcd_pdata);
169 142
170 smartq_machine_init(); 143 smartq_machine_init();
171 smartq5_lcd_setup_gpio();
172 144
173 platform_add_devices(smartq5_devices, ARRAY_SIZE(smartq5_devices)); 145 platform_add_devices(smartq5_devices, ARRAY_SIZE(smartq5_devices));
174} 146}