From patchwork Wed Jul 11 09:42:16 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Leela Krishna Amudala X-Patchwork-Id: 1181101 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork2.kernel.org (Postfix) with ESMTP id 79738DF25A for ; Wed, 11 Jul 2012 09:36:14 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1SotGZ-0005h0-07; Wed, 11 Jul 2012 09:31:27 +0000 Received: from mailout4.samsung.com ([203.254.224.34]) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1SotED-0005ay-8g for linux-arm-kernel@lists.infradead.org; Wed, 11 Jul 2012 09:29:05 +0000 Received: from epcpsbgm2.samsung.com (mailout4.samsung.com [203.254.224.34]) by mailout4.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0M6Z000MXP04FXA0@mailout4.samsung.com> for linux-arm-kernel@lists.infradead.org; Wed, 11 Jul 2012 18:28:56 +0900 (KST) X-AuditID: cbfee61b-b7f566d000005c8a-ca-4ffd475856ec Received: from epmmp1.local.host ( [203.254.227.16]) by epcpsbgm2.samsung.com (EPCPMTA) with SMTP id 6E.71.23690.8574DFF4; Wed, 11 Jul 2012 18:28:56 +0900 (KST) Received: from localhost.localdomain ([107.108.73.106]) by mmp1.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0M6Z0075ROYYTT00@mmp1.samsung.com> for linux-arm-kernel@lists.infradead.org; Wed, 11 Jul 2012 18:28:56 +0900 (KST) From: Leela Krishna Amudala To: linux-arm-kernel@lists.infradead.org Subject: [PATCH 2/7] ARM: EXYNOS5: add machine specific support for backlight Date: Wed, 11 Jul 2012 15:12:16 +0530 Message-id: <1341999741-15578-3-git-send-email-l.krishna@samsung.com> X-Mailer: git-send-email 1.7.0.4 In-reply-to: <1341999741-15578-1-git-send-email-l.krishna@samsung.com> References: <1341999741-15578-1-git-send-email-l.krishna@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrEJMWRmVeSWpSXmKPExsVy+t9jAd0I97/+Br8uqVlsenyN1YHRY/OS +gDGKC6blNSczLLUIn27BK6MZZNfsBU8FqrYuqWTqYHxCn8XIyeHhICJxKd7bSwQtpjEhXvr 2boYuTiEBBYxSrQ/PcEO4WxgkpjYtJkVpIpNwFji/tzNTCC2iICGxJSux2BFzALtjBL7Hp8F SnBwCAv4SnzdLANSwyKgKnF/eh9YL6+Aq8Sy19PYILYpSLQuO8QOYnMKuEncWPALbKYQUM3N w5PZJzDyLmBkWMUomlqQXFCclJ5rpFecmFtcmpeul5yfu4kR7PNn0jsYVzVYHGIU4GBU4uHV MPjrL8SaWFZcmXuIUYKDWUmE96sjUIg3JbGyKrUoP76oNCe1+BCjNAeLkjivifdXfyGB9MSS 1OzU1ILUIpgsEwenVANjeMzkq6VT8zqthCslnnq9L3z6aNLKFu8707Z5H3vY2/S7TPCGsOzq FetSP8zyKM802Rm1c1/JBBHfjHXCRdImHDL7Fv+T0NT/91Ns1vXlrFqzK75OmjpP6Nfz2JKZ XO/m7fhfrM7Mmn3U8N++mxFWvmcX2recSbC0F01+vsavsEfm0cIb8urHlViKMxINtZiLihMB 6XzlqfUBAAA= X-TM-AS-MML: No X-Spam-Note: CRM114 invocation failed X-Spam-Score: -6.9 (------) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-6.9 points) pts rule name description ---- ---------------------- -------------------------------------------------- -5.0 RCVD_IN_DNSWL_HI RBL: Sender listed at http://www.dnswl.org/, high trust [203.254.224.34 listed in list.dnswl.org] -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.0 T_RP_MATCHES_RCVD Envelope sender domain matches handover relay domain -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: kgene.kim@samsung.com, jg1.han@samsung.com, joshi@samsung.com, grant.likely@secretlab.ca, thomas.ab@samsung.com, olofj@google.com X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org Adds machine specific support for LCD backlight for SMDK board based on Exynos5 Signed-off-by: Leela Krishna Amudala --- arch/arm/mach-exynos/Kconfig | 1 + arch/arm/mach-exynos/mach-exynos5-dt.c | 28 ++++++++++++++++++++++++++++ 2 files changed, 29 insertions(+), 0 deletions(-) diff --git a/arch/arm/mach-exynos/Kconfig b/arch/arm/mach-exynos/Kconfig index 498596b..a2a2940 100644 --- a/arch/arm/mach-exynos/Kconfig +++ b/arch/arm/mach-exynos/Kconfig @@ -412,6 +412,7 @@ config MACH_EXYNOS5_DT select SOC_EXYNOS5250 select USE_OF select ARM_AMBA + select SAMSUNG_DEV_BACKLIGHT help Machine support for Samsung Exynos4 machine with device tree enabled. Select this if a fdt blob is available for the EXYNOS4 SoC based board. diff --git a/arch/arm/mach-exynos/mach-exynos5-dt.c b/arch/arm/mach-exynos/mach-exynos5-dt.c index 7b1e11a..0a200fd 100644 --- a/arch/arm/mach-exynos/mach-exynos5-dt.c +++ b/arch/arm/mach-exynos/mach-exynos5-dt.c @@ -11,6 +11,8 @@ #include #include +#include +#include #include #include @@ -18,9 +20,34 @@ #include #include +#include +#include #include "common.h" + +static int smdk5250_bl_notify(struct device *unused, int brightness) +{ + /* manage lcd_bl_en signal */ + if (brightness) + gpio_set_value(EXYNOS5_GPX3(0), 1); + else + gpio_set_value(EXYNOS5_GPX3(0), 0); + + return brightness; +} + +/* LCD Backlight data */ +static struct samsung_bl_gpio_info smdk5250_bl_gpio_info = { + .no = EXYNOS5_GPB2(0), + .func = S3C_GPIO_SFN(2), +}; + +static struct platform_pwm_backlight_data smdk5250_bl_data = { + .pwm_period_ns = 1000000, + .notify = smdk5250_bl_notify, +}; + /* * The following lookup table is used to override device names when devices * are registered from device tree. This is temporarily added to enable @@ -61,6 +88,7 @@ static void __init exynos5250_dt_map_io(void) static void __init exynos5250_dt_machine_init(void) { + samsung_bl_set(&smdk5250_bl_gpio_info, &smdk5250_bl_data); of_platform_populate(NULL, of_default_bus_match_table, exynos5250_auxdata_lookup, NULL); }