From patchwork Tue Aug 23 05:45:44 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sachin Kamat X-Patchwork-Id: 3612 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id DADCD23F26 for ; Tue, 23 Aug 2011 05:48:33 +0000 (UTC) Received: from mail-bw0-f52.google.com (mail-bw0-f52.google.com [209.85.214.52]) by fiordland.canonical.com (Postfix) with ESMTP id BAF17A186BF for ; Tue, 23 Aug 2011 05:48:33 +0000 (UTC) Received: by bkbzs2 with SMTP id zs2so6606055bkb.11 for ; Mon, 22 Aug 2011 22:48:33 -0700 (PDT) Received: by 10.204.133.17 with SMTP id d17mr1352230bkt.122.1314078513271; Mon, 22 Aug 2011 22:48:33 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.204.41.75 with SMTP id n11cs198381bke; Mon, 22 Aug 2011 22:48:32 -0700 (PDT) Received: by 10.236.190.200 with SMTP id e48mr19898410yhn.59.1314078511652; Mon, 22 Aug 2011 22:48:31 -0700 (PDT) Received: from mail-yx0-f178.google.com (mail-yx0-f178.google.com [209.85.213.178]) by mx.google.com with ESMTPS id d1si22186019yhe.98.2011.08.22.22.48.30 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 22 Aug 2011 22:48:31 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.213.178 is neither permitted nor denied by best guess record for domain of sachin.kamat@linaro.org) client-ip=209.85.213.178; Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.213.178 is neither permitted nor denied by best guess record for domain of sachin.kamat@linaro.org) smtp.mail=sachin.kamat@linaro.org Received: by yxl31 with SMTP id 31so3800265yxl.37 for ; Mon, 22 Aug 2011 22:48:30 -0700 (PDT) Received: by 10.142.242.21 with SMTP id p21mr1214782wfh.60.1314078510281; Mon, 22 Aug 2011 22:48:30 -0700 (PDT) Received: from localhost.localdomain ([115.113.119.130]) by mx.google.com with ESMTPS id s9sm20803pbk.66.2011.08.22.22.48.27 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 22 Aug 2011 22:48:29 -0700 (PDT) From: Sachin Kamat To: linux-samsung-soc@vger.kernel.org Cc: kgene.kim@samsung.com, linaro-dev@lists.linaro.org, patches@linaro.org, sachin.kamat@linaro.org, giridhar.maruthy@linaro.org Subject: [PATCH 1/1] ARM: EXYNOS4: Add PWM backlight support on Origen Date: Tue, 23 Aug 2011 11:15:44 +0530 Message-Id: <1314078344-5354-1-git-send-email-sachin.kamat@linaro.org> X-Mailer: git-send-email 1.7.4.1 From: Giridhar Maruthy This patch adds support for LCD backlight using PWM timer on Origen board. Signed-off-by: Giridhar Maruthy Signed-off-by: Sachin Kamat --- arch/arm/mach-exynos4/Kconfig | 2 ++ arch/arm/mach-exynos4/mach-origen.c | 16 ++++++++++++++++ 2 files changed, 18 insertions(+), 0 deletions(-) diff --git a/arch/arm/mach-exynos4/Kconfig b/arch/arm/mach-exynos4/Kconfig index e6925de..3e9138e 100644 --- a/arch/arm/mach-exynos4/Kconfig +++ b/arch/arm/mach-exynos4/Kconfig @@ -230,6 +230,8 @@ config MACH_ORIGEN select S3C_DEV_RTC select S3C_DEV_WDT select S3C_DEV_HSMMC2 + select SAMSUNG_DEV_BACKLIGHT + select SAMSUNG_DEV_PWM select EXYNOS4_SETUP_SDHCI help Machine support for ORIGEN based on Samsung EXYNOS4210 diff --git a/arch/arm/mach-exynos4/mach-origen.c b/arch/arm/mach-exynos4/mach-origen.c index ed59f86..b871815 100644 --- a/arch/arm/mach-exynos4/mach-origen.c +++ b/arch/arm/mach-exynos4/mach-origen.c @@ -14,6 +14,7 @@ #include #include #include +#include #include #include @@ -24,6 +25,8 @@ #include #include #include +#include +#include #include @@ -85,6 +88,17 @@ static struct platform_device *origen_devices[] __initdata = { &s3c_device_wdt, }; +/* 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); @@ -96,6 +110,8 @@ static void __init origen_machine_init(void) { s3c_sdhci2_set_platdata(&origen_hsmmc2_pdata); platform_add_devices(origen_devices, ARRAY_SIZE(origen_devices)); + + samsung_bl_set(&origen_bl_gpio_info, &origen_bl_data); } MACHINE_START(ORIGEN, "ORIGEN")