Commit 8689de73 authored by Banajit Goswami's avatar Banajit Goswami Committed by Kukjin Kim

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: default avatarBanajit Goswami <banajit.g@samsung.com>
Signed-off-by: default avatarKukjin Kim <kgene.kim@samsung.com>
parent f00207b2
...@@ -127,8 +127,10 @@ config MACH_SMDKV310 ...@@ -127,8 +127,10 @@ config MACH_SMDKV310
select S3C_DEV_HSMMC1 select S3C_DEV_HSMMC1
select S3C_DEV_HSMMC2 select S3C_DEV_HSMMC2
select S3C_DEV_HSMMC3 select S3C_DEV_HSMMC3
select SAMSUNG_DEV_BACKLIGHT
select SAMSUNG_DEV_KEYPAD select SAMSUNG_DEV_KEYPAD
select EXYNOS4_DEV_PD select EXYNOS4_DEV_PD
select SAMSUNG_DEV_PWM
select EXYNOS4_DEV_SYSMMU select EXYNOS4_DEV_SYSMMU
select EXYNOS4_SETUP_I2C1 select EXYNOS4_SETUP_I2C1
select EXYNOS4_SETUP_KEYPAD select EXYNOS4_SETUP_KEYPAD
......
...@@ -16,6 +16,7 @@ ...@@ -16,6 +16,7 @@
#include <linux/io.h> #include <linux/io.h>
#include <linux/i2c.h> #include <linux/i2c.h>
#include <linux/input.h> #include <linux/input.h>
#include <linux/pwm_backlight.h>
#include <asm/mach/arch.h> #include <asm/mach/arch.h>
#include <asm/mach-types.h> #include <asm/mach-types.h>
...@@ -29,6 +30,8 @@ ...@@ -29,6 +30,8 @@
#include <plat/sdhci.h> #include <plat/sdhci.h>
#include <plat/iic.h> #include <plat/iic.h>
#include <plat/pd.h> #include <plat/pd.h>
#include <plat/gpio-cfg.h>
#include <plat/backlight.h>
#include <mach/map.h> #include <mach/map.h>
...@@ -209,6 +212,17 @@ static void __init smdkv310_smsc911x_init(void) ...@@ -209,6 +212,17 @@ static void __init smdkv310_smsc911x_init(void)
(0x1 << S5P_SROM_BCX__TACS__SHIFT), S5P_SROM_BC1); (0x1 << S5P_SROM_BCX__TACS__SHIFT), S5P_SROM_BC1);
} }
/* LCD Backlight data */
static struct samsung_bl_gpio_info smdkv310_bl_gpio_info = {
.no = EXYNOS4_GPD0(1),
.func = S3C_GPIO_SFN(2),
};
static struct platform_pwm_backlight_data smdkv310_bl_data = {
.pwm_id = 1,
.pwm_period_ns = 1000,
};
static void __init smdkv310_map_io(void) static void __init smdkv310_map_io(void)
{ {
s5p_init_io(NULL, 0, S5P_VA_CHIPID); s5p_init_io(NULL, 0, S5P_VA_CHIPID);
...@@ -230,6 +244,8 @@ static void __init smdkv310_machine_init(void) ...@@ -230,6 +244,8 @@ static void __init smdkv310_machine_init(void)
samsung_keypad_set_platdata(&smdkv310_keypad_data); samsung_keypad_set_platdata(&smdkv310_keypad_data);
samsung_bl_set(&smdkv310_bl_gpio_info, &smdkv310_bl_data);
platform_add_devices(smdkv310_devices, ARRAY_SIZE(smdkv310_devices)); platform_add_devices(smdkv310_devices, ARRAY_SIZE(smdkv310_devices));
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment