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:26 -0400 |
commit | fef469f7c28268a9bfa8b4e440fbd8055ccc68c0 (patch) | |
tree | ba65727d853841c0a52994b848814d892d7d1c59 /arch/arm/mach-exynos4/mach-smdkc210.c | |
parent | 8689de73a805781ddfb1b26df28ca127a548d235 (diff) |
ARM: EXYNOS4: Add PWM backlight support on SMDKC210
This patch adds support for LCD backlight using PWM timer for
Samsung SMDKC210 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/mach-smdkc210.c')
-rw-r--r-- | arch/arm/mach-exynos4/mach-smdkc210.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/arch/arm/mach-exynos4/mach-smdkc210.c b/arch/arm/mach-exynos4/mach-smdkc210.c index e645f7a955f0..f606ea75bf43 100644 --- a/arch/arm/mach-exynos4/mach-smdkc210.c +++ b/arch/arm/mach-exynos4/mach-smdkc210.c | |||
@@ -15,6 +15,7 @@ | |||
15 | #include <linux/smsc911x.h> | 15 | #include <linux/smsc911x.h> |
16 | #include <linux/io.h> | 16 | #include <linux/io.h> |
17 | #include <linux/i2c.h> | 17 | #include <linux/i2c.h> |
18 | #include <linux/pwm_backlight.h> | ||
18 | 19 | ||
19 | #include <asm/mach/arch.h> | 20 | #include <asm/mach/arch.h> |
20 | #include <asm/mach-types.h> | 21 | #include <asm/mach-types.h> |
@@ -27,6 +28,8 @@ | |||
27 | #include <plat/sdhci.h> | 28 | #include <plat/sdhci.h> |
28 | #include <plat/iic.h> | 29 | #include <plat/iic.h> |
29 | #include <plat/pd.h> | 30 | #include <plat/pd.h> |
31 | #include <plat/gpio-cfg.h> | ||
32 | #include <plat/backlight.h> | ||
30 | 33 | ||
31 | #include <mach/map.h> | 34 | #include <mach/map.h> |
32 | 35 | ||
@@ -191,6 +194,17 @@ static void __init smdkc210_smsc911x_init(void) | |||
191 | (0x1 << S5P_SROM_BCX__TACS__SHIFT), S5P_SROM_BC1); | 194 | (0x1 << S5P_SROM_BCX__TACS__SHIFT), S5P_SROM_BC1); |
192 | } | 195 | } |
193 | 196 | ||
197 | /* LCD Backlight data */ | ||
198 | static struct samsung_bl_gpio_info smdkc210_bl_gpio_info = { | ||
199 | .no = EXYNOS4_GPD0(1), | ||
200 | .func = S3C_GPIO_SFN(2), | ||
201 | }; | ||
202 | |||
203 | static struct platform_pwm_backlight_data smdkc210_bl_data = { | ||
204 | .pwm_id = 1, | ||
205 | .pwm_period_ns = 1000, | ||
206 | }; | ||
207 | |||
194 | static void __init smdkc210_map_io(void) | 208 | static void __init smdkc210_map_io(void) |
195 | { | 209 | { |
196 | s5p_init_io(NULL, 0, S5P_VA_CHIPID); | 210 | s5p_init_io(NULL, 0, S5P_VA_CHIPID); |
@@ -210,6 +224,8 @@ static void __init smdkc210_machine_init(void) | |||
210 | s3c_sdhci2_set_platdata(&smdkc210_hsmmc2_pdata); | 224 | s3c_sdhci2_set_platdata(&smdkc210_hsmmc2_pdata); |
211 | s3c_sdhci3_set_platdata(&smdkc210_hsmmc3_pdata); | 225 | s3c_sdhci3_set_platdata(&smdkc210_hsmmc3_pdata); |
212 | 226 | ||
227 | samsung_bl_set(&smdkc210_bl_gpio_info, &smdkc210_bl_data); | ||
228 | |||
213 | platform_add_devices(smdkc210_devices, ARRAY_SIZE(smdkc210_devices)); | 229 | platform_add_devices(smdkc210_devices, ARRAY_SIZE(smdkc210_devices)); |
214 | } | 230 | } |
215 | 231 | ||