summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGiridhar Maruthy <giridhar.maruthy@linaro.org>2011-08-31 15:58:52 +0900
committerKukjin Kim <kgene.kim@samsung.com>2011-10-03 08:42:22 +0900
commit9edff0f79f5b98e6abfabfa27b31d155e3c994e1 (patch)
treeaab66bee21154b8bc45174526769c4529d6acc86
parent6f8eb324a395da5bd0c0b113944f2906272e14bd (diff)
ARM: EXYNOS4: Add PWM backlight support on ORIGEN
This patch adds support for LCD backlight using PWM timer on ORIGEN board. Signed-off-by: Giridhar Maruthy <giridhar.maruthy@linaro.org> Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
-rw-r--r--arch/arm/mach-exynos4/Kconfig2
-rw-r--r--arch/arm/mach-exynos4/mach-origen.c16
2 files changed, 18 insertions, 0 deletions
diff --git a/arch/arm/mach-exynos4/Kconfig b/arch/arm/mach-exynos4/Kconfig
index 9c920b2acc3..86cf4fd47b3 100644
--- a/arch/arm/mach-exynos4/Kconfig
+++ b/arch/arm/mach-exynos4/Kconfig
@@ -229,6 +229,8 @@ config MACH_ORIGEN
select S5P_DEV_FIMC2
select S5P_DEV_FIMC3
select S5P_DEV_USB_EHCI
+ select SAMSUNG_DEV_BACKLIGHT
+ select SAMSUNG_DEV_PWM
select EXYNOS4_SETUP_SDHCI
select EXYNOS4_SETUP_USB_PHY
help
diff --git a/arch/arm/mach-exynos4/mach-origen.c b/arch/arm/mach-exynos4/mach-origen.c
index 7ac71878767..937db75688d 100644
--- a/arch/arm/mach-exynos4/mach-origen.c
+++ b/arch/arm/mach-exynos4/mach-origen.c
@@ -14,6 +14,7 @@
#include <linux/platform_device.h>
#include <linux/io.h>
#include <linux/input.h>
+#include <linux/pwm_backlight.h>
#include <asm/mach/arch.h>
#include <asm/mach-types.h>
@@ -26,6 +27,8 @@
#include <plat/iic.h>
#include <plat/ehci.h>
#include <plat/clock.h>
+#include <plat/gpio-cfg.h>
+#include <plat/backlight.h>
#include <mach/map.h>
@@ -102,6 +105,17 @@ static struct platform_device *origen_devices[] __initdata = {
&s5p_device_fimc3,
};
+/* LCD Backlight data */
+static struct samsung_bl_gpio_info origen_bl_gpio_info = {
+ .no = EXYNOS4_GPD0(0),
+ .func = S3C_GPIO_SFN(2),
+};
+
+static struct platform_pwm_backlight_data origen_bl_data = {
+ .pwm_id = 0,
+ .pwm_period_ns = 1000,
+};
+
static void __init origen_map_io(void)
{
s5p_init_io(NULL, 0, S5P_VA_CHIPID);
@@ -117,6 +131,8 @@ static void __init origen_machine_init(void)
clk_xusbxti.rate = 24000000;
platform_add_devices(origen_devices, ARRAY_SIZE(origen_devices));
+
+ samsung_bl_set(&origen_bl_gpio_info, &origen_bl_data);
}
MACHINE_START(ORIGEN, "ORIGEN")