diff options
author | Darius Augulis <augulis.darius@gmail.com> | 2010-10-19 03:09:59 -0400 |
---|---|---|
committer | Kukjin Kim <kgene.kim@samsung.com> | 2010-10-20 18:42:45 -0400 |
commit | bbd7ac63a6bfdb7bd10471441b431b283e96edad (patch) | |
tree | eec122e07fdddd3d77e8daac501d77cfd687b3a8 /arch/arm/mach-s3c64xx/mach-mini6410.c | |
parent | 2abca87cb691485fdff348c279e5a928e51ceb5d (diff) |
ARM: S3C64XX: add backlight control for mach-mini6410
Add support for platform-lcd device for mach-mini6410
Signed-off-by: Darius Augulis <augulis.darius@gmail.com>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Diffstat (limited to 'arch/arm/mach-s3c64xx/mach-mini6410.c')
-rw-r--r-- | arch/arm/mach-s3c64xx/mach-mini6410.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/arch/arm/mach-s3c64xx/mach-mini6410.c b/arch/arm/mach-s3c64xx/mach-mini6410.c index 441b71a9b19c..0e3516ee1086 100644 --- a/arch/arm/mach-s3c64xx/mach-mini6410.c +++ b/arch/arm/mach-s3c64xx/mach-mini6410.c | |||
@@ -40,6 +40,7 @@ | |||
40 | #include <plat/fb.h> | 40 | #include <plat/fb.h> |
41 | #include <plat/nand.h> | 41 | #include <plat/nand.h> |
42 | #include <plat/regs-serial.h> | 42 | #include <plat/regs-serial.h> |
43 | #include <video/platform_lcd.h> | ||
43 | 44 | ||
44 | #define UCON (S3C2410_UCON_DEFAULT | S3C2410_UCON_UCLK) | 45 | #define UCON (S3C2410_UCON_DEFAULT | S3C2410_UCON_UCLK) |
45 | #define ULCON (S3C2410_LCON_CS8 | S3C2410_LCON_PNONE | S3C2410_LCON_STOPB) | 46 | #define ULCON (S3C2410_LCON_CS8 | S3C2410_LCON_PNONE | S3C2410_LCON_STOPB) |
@@ -182,6 +183,25 @@ static struct s3c_fb_platdata mini6410_lcd_pdata __initdata = { | |||
182 | .vidcon1 = VIDCON1_INV_HSYNC | VIDCON1_INV_VSYNC, | 183 | .vidcon1 = VIDCON1_INV_HSYNC | VIDCON1_INV_VSYNC, |
183 | }; | 184 | }; |
184 | 185 | ||
186 | static void mini6410_lcd_power_set(struct plat_lcd_data *pd, | ||
187 | unsigned int power) | ||
188 | { | ||
189 | if (power) | ||
190 | gpio_direction_output(S3C64XX_GPE(0), 1); | ||
191 | else | ||
192 | gpio_direction_output(S3C64XX_GPE(0), 0); | ||
193 | } | ||
194 | |||
195 | static struct plat_lcd_data mini6410_lcd_power_data = { | ||
196 | .set_power = mini6410_lcd_power_set, | ||
197 | }; | ||
198 | |||
199 | static struct platform_device mini6410_lcd_powerdev = { | ||
200 | .name = "platform-lcd", | ||
201 | .dev.parent = &s3c_device_fb.dev, | ||
202 | .dev.platform_data = &mini6410_lcd_power_data, | ||
203 | }; | ||
204 | |||
185 | static struct platform_device *mini6410_devices[] __initdata = { | 205 | static struct platform_device *mini6410_devices[] __initdata = { |
186 | &mini6410_device_eth, | 206 | &mini6410_device_eth, |
187 | &s3c_device_hsmmc0, | 207 | &s3c_device_hsmmc0, |
@@ -189,6 +209,7 @@ static struct platform_device *mini6410_devices[] __initdata = { | |||
189 | &s3c_device_ohci, | 209 | &s3c_device_ohci, |
190 | &s3c_device_nand, | 210 | &s3c_device_nand, |
191 | &s3c_device_fb, | 211 | &s3c_device_fb, |
212 | &mini6410_lcd_powerdev, | ||
192 | }; | 213 | }; |
193 | 214 | ||
194 | static void __init mini6410_map_io(void) | 215 | static void __init mini6410_map_io(void) |