]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
ARM: S3C64XX: Add PWM backlight support on SMDK6410
authorBanajit Goswami <banajit.g@samsung.com>
Wed, 20 Jul 2011 14:45:22 +0000 (23:45 +0900)
committerKukjin Kim <kgene.kim@samsung.com>
Wed, 20 Jul 2011 17:10:52 +0000 (02:10 +0900)
This patch adds support for LCD backlight using PWM timer for
Samsung SMDK6410 board.

Signed-off-by: Banajit Goswami <banajit.g@samsung.com>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
arch/arm/mach-s3c64xx/Kconfig
arch/arm/mach-s3c64xx/mach-smdk6410.c

index e4177e22557b5eac7e9638c0de3c93b2ae689f7e..fdc89fc3b46493ae502282454013d4c7b1e77814 100644 (file)
@@ -142,6 +142,7 @@ config MACH_SMDK6410
        select S3C_DEV_USB_HOST
        select S3C_DEV_USB_HSOTG
        select S3C_DEV_WDT
+       select SAMSUNG_DEV_BACKLIGHT
        select SAMSUNG_DEV_KEYPAD
        select SAMSUNG_DEV_PWM
        select HAVE_S3C2410_WATCHDOG if WATCHDOG
index e0521e0fa762e375078d0c9ae5659290314e6460..2aa28a20fd0777198201bc408dfffcf4ab5e9122 100644 (file)
@@ -71,6 +71,7 @@
 #include <plat/adc.h>
 #include <plat/ts.h>
 #include <plat/keypad.h>
+#include <plat/backlight.h>
 
 #define UCON S3C2410_UCON_DEFAULT | S3C2410_UCON_UCLK
 #define ULCON S3C2410_LCON_CS8 | S3C2410_LCON_PNONE | S3C2410_LCON_STOPB
@@ -329,8 +330,6 @@ static struct platform_device *smdk6410_devices[] __initdata = {
        &s3c_device_rtc,
        &s3c_device_ts,
        &s3c_device_wdt,
-       &s3c_device_timer[1],
-       &smdk6410_backlight_device,
 };
 
 #ifdef CONFIG_REGULATOR
@@ -665,6 +664,16 @@ static struct s3c2410_ts_mach_info s3c_ts_platform __initdata = {
        .oversampling_shift     = 2,
 };
 
+/* LCD Backlight data */
+static struct samsung_bl_gpio_info smdk6410_bl_gpio_info = {
+       .no = S3C64XX_GPF(15),
+       .func = S3C_GPIO_SFN(2),
+};
+
+static struct platform_pwm_backlight_data smdk6410_bl_data = {
+       .pwm_id = 1,
+};
+
 static void __init smdk6410_map_io(void)
 {
        u32 tmp;
@@ -726,6 +735,8 @@ static void __init smdk6410_machine_init(void)
 
        s3c_ide_set_platdata(&smdk6410_ide_pdata);
 
+       samsung_bl_set(&smdk6410_bl_gpio_info, &smdk6410_bl_data);
+
        platform_add_devices(smdk6410_devices, ARRAY_SIZE(smdk6410_devices));
 }