diff options
author | Banajit Goswami <banajit.g@samsung.com> | 2011-07-20 10:45:22 -0400 |
---|---|---|
committer | Kukjin Kim <kgene.kim@samsung.com> | 2011-07-20 13:10:52 -0400 |
commit | 96d78686d4c4f2922a23de2e16d145f7355e0605 (patch) | |
tree | a8eba9d67bfff5814d220dc8aab43666c9ccfeb0 /arch/arm/mach-s3c64xx | |
parent | 543601f526bbe02d209d2f8c30b9ce59d8e70a41 (diff) |
ARM: S3C64XX: Add PWM backlight support on SMDK6410
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>
Diffstat (limited to 'arch/arm/mach-s3c64xx')
-rw-r--r-- | arch/arm/mach-s3c64xx/Kconfig | 1 | ||||
-rw-r--r-- | arch/arm/mach-s3c64xx/mach-smdk6410.c | 15 |
2 files changed, 14 insertions, 2 deletions
diff --git a/arch/arm/mach-s3c64xx/Kconfig b/arch/arm/mach-s3c64xx/Kconfig index e4177e22557b..fdc89fc3b464 100644 --- a/arch/arm/mach-s3c64xx/Kconfig +++ b/arch/arm/mach-s3c64xx/Kconfig | |||
@@ -142,6 +142,7 @@ config MACH_SMDK6410 | |||
142 | select S3C_DEV_USB_HOST | 142 | select S3C_DEV_USB_HOST |
143 | select S3C_DEV_USB_HSOTG | 143 | select S3C_DEV_USB_HSOTG |
144 | select S3C_DEV_WDT | 144 | select S3C_DEV_WDT |
145 | select SAMSUNG_DEV_BACKLIGHT | ||
145 | select SAMSUNG_DEV_KEYPAD | 146 | select SAMSUNG_DEV_KEYPAD |
146 | select SAMSUNG_DEV_PWM | 147 | select SAMSUNG_DEV_PWM |
147 | select HAVE_S3C2410_WATCHDOG if WATCHDOG | 148 | select HAVE_S3C2410_WATCHDOG if WATCHDOG |
diff --git a/arch/arm/mach-s3c64xx/mach-smdk6410.c b/arch/arm/mach-s3c64xx/mach-smdk6410.c index e0521e0fa762..2aa28a20fd07 100644 --- a/arch/arm/mach-s3c64xx/mach-smdk6410.c +++ b/arch/arm/mach-s3c64xx/mach-smdk6410.c | |||
@@ -71,6 +71,7 @@ | |||
71 | #include <plat/adc.h> | 71 | #include <plat/adc.h> |
72 | #include <plat/ts.h> | 72 | #include <plat/ts.h> |
73 | #include <plat/keypad.h> | 73 | #include <plat/keypad.h> |
74 | #include <plat/backlight.h> | ||
74 | 75 | ||
75 | #define UCON S3C2410_UCON_DEFAULT | S3C2410_UCON_UCLK | 76 | #define UCON S3C2410_UCON_DEFAULT | S3C2410_UCON_UCLK |
76 | #define ULCON S3C2410_LCON_CS8 | S3C2410_LCON_PNONE | S3C2410_LCON_STOPB | 77 | #define ULCON S3C2410_LCON_CS8 | S3C2410_LCON_PNONE | S3C2410_LCON_STOPB |
@@ -329,8 +330,6 @@ static struct platform_device *smdk6410_devices[] __initdata = { | |||
329 | &s3c_device_rtc, | 330 | &s3c_device_rtc, |
330 | &s3c_device_ts, | 331 | &s3c_device_ts, |
331 | &s3c_device_wdt, | 332 | &s3c_device_wdt, |
332 | &s3c_device_timer[1], | ||
333 | &smdk6410_backlight_device, | ||
334 | }; | 333 | }; |
335 | 334 | ||
336 | #ifdef CONFIG_REGULATOR | 335 | #ifdef CONFIG_REGULATOR |
@@ -665,6 +664,16 @@ static struct s3c2410_ts_mach_info s3c_ts_platform __initdata = { | |||
665 | .oversampling_shift = 2, | 664 | .oversampling_shift = 2, |
666 | }; | 665 | }; |
667 | 666 | ||
667 | /* LCD Backlight data */ | ||
668 | static struct samsung_bl_gpio_info smdk6410_bl_gpio_info = { | ||
669 | .no = S3C64XX_GPF(15), | ||
670 | .func = S3C_GPIO_SFN(2), | ||
671 | }; | ||
672 | |||
673 | static struct platform_pwm_backlight_data smdk6410_bl_data = { | ||
674 | .pwm_id = 1, | ||
675 | }; | ||
676 | |||
668 | static void __init smdk6410_map_io(void) | 677 | static void __init smdk6410_map_io(void) |
669 | { | 678 | { |
670 | u32 tmp; | 679 | u32 tmp; |
@@ -726,6 +735,8 @@ static void __init smdk6410_machine_init(void) | |||
726 | 735 | ||
727 | s3c_ide_set_platdata(&smdk6410_ide_pdata); | 736 | s3c_ide_set_platdata(&smdk6410_ide_pdata); |
728 | 737 | ||
738 | samsung_bl_set(&smdk6410_bl_gpio_info, &smdk6410_bl_data); | ||
739 | |||
729 | platform_add_devices(smdk6410_devices, ARRAY_SIZE(smdk6410_devices)); | 740 | platform_add_devices(smdk6410_devices, ARRAY_SIZE(smdk6410_devices)); |
730 | } | 741 | } |
731 | 742 | ||