diff options
author | Banajit Goswami <banajit.g@samsung.com> | 2011-07-20 10:45:21 -0400 |
---|---|---|
committer | Kukjin Kim <kgene.kim@samsung.com> | 2011-07-20 13:10:21 -0400 |
commit | 8689de73a805781ddfb1b26df28ca127a548d235 (patch) | |
tree | e89570f43a0658fd507f78dea816593c409175b6 /arch/arm/mach-exynos4 | |
parent | f00207b255f59ebedc5965c2ab0bd1cefae70f92 (diff) |
ARM: EXYNOS4: Add PWM backlight support on SMDKV310
This patch adds support for LCD backlight using PWM timer for
Samsung SMDKV310 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-exynos4')
-rw-r--r-- | arch/arm/mach-exynos4/Kconfig | 2 | ||||
-rw-r--r-- | arch/arm/mach-exynos4/mach-smdkv310.c | 16 |
2 files changed, 18 insertions, 0 deletions
diff --git a/arch/arm/mach-exynos4/Kconfig b/arch/arm/mach-exynos4/Kconfig index 1435fc31c4b2..413448f59e9b 100644 --- a/arch/arm/mach-exynos4/Kconfig +++ b/arch/arm/mach-exynos4/Kconfig | |||
@@ -127,8 +127,10 @@ config MACH_SMDKV310 | |||
127 | select S3C_DEV_HSMMC1 | 127 | select S3C_DEV_HSMMC1 |
128 | select S3C_DEV_HSMMC2 | 128 | select S3C_DEV_HSMMC2 |
129 | select S3C_DEV_HSMMC3 | 129 | select S3C_DEV_HSMMC3 |
130 | select SAMSUNG_DEV_BACKLIGHT | ||
130 | select SAMSUNG_DEV_KEYPAD | 131 | select SAMSUNG_DEV_KEYPAD |
131 | select EXYNOS4_DEV_PD | 132 | select EXYNOS4_DEV_PD |
133 | select SAMSUNG_DEV_PWM | ||
132 | select EXYNOS4_DEV_SYSMMU | 134 | select EXYNOS4_DEV_SYSMMU |
133 | select EXYNOS4_SETUP_I2C1 | 135 | select EXYNOS4_SETUP_I2C1 |
134 | select EXYNOS4_SETUP_KEYPAD | 136 | select EXYNOS4_SETUP_KEYPAD |
diff --git a/arch/arm/mach-exynos4/mach-smdkv310.c b/arch/arm/mach-exynos4/mach-smdkv310.c index edd814110da8..df1107828abd 100644 --- a/arch/arm/mach-exynos4/mach-smdkv310.c +++ b/arch/arm/mach-exynos4/mach-smdkv310.c | |||
@@ -16,6 +16,7 @@ | |||
16 | #include <linux/io.h> | 16 | #include <linux/io.h> |
17 | #include <linux/i2c.h> | 17 | #include <linux/i2c.h> |
18 | #include <linux/input.h> | 18 | #include <linux/input.h> |
19 | #include <linux/pwm_backlight.h> | ||
19 | 20 | ||
20 | #include <asm/mach/arch.h> | 21 | #include <asm/mach/arch.h> |
21 | #include <asm/mach-types.h> | 22 | #include <asm/mach-types.h> |
@@ -29,6 +30,8 @@ | |||
29 | #include <plat/sdhci.h> | 30 | #include <plat/sdhci.h> |
30 | #include <plat/iic.h> | 31 | #include <plat/iic.h> |
31 | #include <plat/pd.h> | 32 | #include <plat/pd.h> |
33 | #include <plat/gpio-cfg.h> | ||
34 | #include <plat/backlight.h> | ||
32 | 35 | ||
33 | #include <mach/map.h> | 36 | #include <mach/map.h> |
34 | 37 | ||
@@ -209,6 +212,17 @@ static void __init smdkv310_smsc911x_init(void) | |||
209 | (0x1 << S5P_SROM_BCX__TACS__SHIFT), S5P_SROM_BC1); | 212 | (0x1 << S5P_SROM_BCX__TACS__SHIFT), S5P_SROM_BC1); |
210 | } | 213 | } |
211 | 214 | ||
215 | /* LCD Backlight data */ | ||
216 | static struct samsung_bl_gpio_info smdkv310_bl_gpio_info = { | ||
217 | .no = EXYNOS4_GPD0(1), | ||
218 | .func = S3C_GPIO_SFN(2), | ||
219 | }; | ||
220 | |||
221 | static struct platform_pwm_backlight_data smdkv310_bl_data = { | ||
222 | .pwm_id = 1, | ||
223 | .pwm_period_ns = 1000, | ||
224 | }; | ||
225 | |||
212 | static void __init smdkv310_map_io(void) | 226 | static void __init smdkv310_map_io(void) |
213 | { | 227 | { |
214 | s5p_init_io(NULL, 0, S5P_VA_CHIPID); | 228 | s5p_init_io(NULL, 0, S5P_VA_CHIPID); |
@@ -230,6 +244,8 @@ static void __init smdkv310_machine_init(void) | |||
230 | 244 | ||
231 | samsung_keypad_set_platdata(&smdkv310_keypad_data); | 245 | samsung_keypad_set_platdata(&smdkv310_keypad_data); |
232 | 246 | ||
247 | samsung_bl_set(&smdkv310_bl_gpio_info, &smdkv310_bl_data); | ||
248 | |||
233 | platform_add_devices(smdkv310_devices, ARRAY_SIZE(smdkv310_devices)); | 249 | platform_add_devices(smdkv310_devices, ARRAY_SIZE(smdkv310_devices)); |
234 | } | 250 | } |
235 | 251 | ||