From patchwork Wed Sep 12 11:33:31 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sachin Kamat X-Patchwork-Id: 11351 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 B3FB423E41 for ; Wed, 12 Sep 2012 11:36:45 +0000 (UTC) Received: from mail-ie0-f180.google.com (mail-ie0-f180.google.com [209.85.223.180]) by fiordland.canonical.com (Postfix) with ESMTP id 30A433DF9D80 for ; Wed, 12 Sep 2012 11:36:45 +0000 (UTC) Received: by mail-ie0-f180.google.com with SMTP id k11so2652190iea.11 for ; Wed, 12 Sep 2012 04:36:45 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-forwarded-to:x-forwarded-for:delivered-to:received-spf:from:to:cc :subject:date:message-id:x-mailer:in-reply-to:references :x-gm-message-state; bh=ShpG5B/WuQ2nSFQbCf9B5+82xZ80tJou/gq/Dv9kTIo=; b=ik47UHp8akXFcQA0LbLWYF5MaxHkd0Bvuyypr6pgM3gvinMTRioUPbt3AYQ/vwAQmE hwDCFFtIBIYFz7tt3r8IxMrhmHVB2FQeQQg5ABVf+2EO9MwBM6tb96Ht+a/4+s7tDVJv bQis1Q+8bDdOki0eKvnS99GRg2dA+oMV4ETxdGm7BwEVniSKr9yrJ4ZGB7phcA5GP5LW RevakwVuY0POKwFmlINHZKfr+WGfNDazLPKK3X5ALHeJWmQ7Sgg5I+zW3EsVKm3qoV7M LC/g5sENqQkHH+9jyrveSG++vAD+EUCfBmZLy0va5A+Qll6mKczAqYMeoj9zOiOfR7Ep TqSg== Received: by 10.50.217.227 with SMTP id pb3mr20101530igc.28.1347449804944; Wed, 12 Sep 2012 04:36:44 -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.50.184.232 with SMTP id ex8csp65189igc; Wed, 12 Sep 2012 04:36:44 -0700 (PDT) Received: by 10.68.197.100 with SMTP id it4mr16651376pbc.16.1347449804430; Wed, 12 Sep 2012 04:36:44 -0700 (PDT) Received: from mail-pb0-f50.google.com (mail-pb0-f50.google.com [209.85.160.50]) by mx.google.com with ESMTPS id kt9si29200270pbc.230.2012.09.12.04.36.44 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 12 Sep 2012 04:36:44 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.160.50 is neither permitted nor denied by best guess record for domain of sachin.kamat@linaro.org) client-ip=209.85.160.50; Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.160.50 is neither permitted nor denied by best guess record for domain of sachin.kamat@linaro.org) smtp.mail=sachin.kamat@linaro.org Received: by mail-pb0-f50.google.com with SMTP id md12so2461616pbc.37 for ; Wed, 12 Sep 2012 04:36:44 -0700 (PDT) Received: by 10.68.213.195 with SMTP id nu3mr16434312pbc.81.1347449804027; Wed, 12 Sep 2012 04:36:44 -0700 (PDT) Received: from localhost.localdomain ([115.113.119.130]) by mx.google.com with ESMTPS id uj3sm11274778pbc.39.2012.09.12.04.36.41 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 12 Sep 2012 04:36:43 -0700 (PDT) From: Sachin Kamat To: linux-samsung-soc@vger.kernel.org Cc: kgene.kim@samsung.com, thierry.reding@avionic-design.de, tushar.behera@linaro.org, sachin.kamat@linaro.org, patches@linaro.org Subject: [PATCH 2/3] ARM: EXYNOS: Add generic PWM lookup support for SMDK4X12 Date: Wed, 12 Sep 2012 17:03:31 +0530 Message-Id: <1347449612-382-3-git-send-email-sachin.kamat@linaro.org> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1347449612-382-1-git-send-email-sachin.kamat@linaro.org> References: <1347449612-382-1-git-send-email-sachin.kamat@linaro.org> X-Gm-Message-State: ALoCoQky4Sk+CHkt60kjmAB7L+xj77YrOkBmfZU1hKm/UAkDb4Cqd/84tAqcqhR6Yjd3Xf+za4mD Generic PWM framework requires that the board setup code register a static mapping that can be used to match PWM consumers to providers. Signed-off-by: Sachin Kamat --- arch/arm/mach-exynos/Kconfig | 1 + arch/arm/mach-exynos/mach-smdk4x12.c | 6 ++++++ 2 files changed, 7 insertions(+), 0 deletions(-) diff --git a/arch/arm/mach-exynos/Kconfig b/arch/arm/mach-exynos/Kconfig index 4b7d15d..798634d 100644 --- a/arch/arm/mach-exynos/Kconfig +++ b/arch/arm/mach-exynos/Kconfig @@ -384,6 +384,7 @@ config MACH_SMDK4212 select EXYNOS4_SETUP_KEYPAD select EXYNOS4_SETUP_SDHCI select EXYNOS4_SETUP_USB_PHY + select S3C24XX_PWM help Machine support for Samsung SMDK4212 diff --git a/arch/arm/mach-exynos/mach-smdk4x12.c b/arch/arm/mach-exynos/mach-smdk4x12.c index ee069b4..9c74e8f 100644 --- a/arch/arm/mach-exynos/mach-smdk4x12.c +++ b/arch/arm/mach-exynos/mach-smdk4x12.c @@ -17,6 +17,7 @@ #include #include #include +#include #include #include #include @@ -222,6 +223,10 @@ static struct platform_pwm_backlight_data smdk4x12_bl_data = { .pwm_period_ns = 1000, }; +static struct pwm_lookup smdk4x12_pwm_lookup[] = { + PWM_LOOKUP("s3c24xx-pwm.1", 0, "pwm-backlight.0", NULL), +}; + static uint32_t smdk4x12_keymap[] __initdata = { /* KEY(row, col, keycode) */ KEY(1, 3, KEY_1), KEY(1, 4, KEY_2), KEY(1, 5, KEY_3), @@ -349,6 +354,7 @@ static void __init smdk4x12_machine_init(void) ARRAY_SIZE(smdk4x12_i2c_devs7)); samsung_bl_set(&smdk4x12_bl_gpio_info, &smdk4x12_bl_data); + pwm_add_table(smdk4x12_pwm_lookup, ARRAY_SIZE(smdk4x12_pwm_lookup)); samsung_keypad_set_platdata(&smdk4x12_keypad_data);