From patchwork Wed Sep 12 11:33:32 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sachin Kamat X-Patchwork-Id: 11352 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 16F6523E41 for ; Wed, 12 Sep 2012 11:36:49 +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 BBBF43DF9D85 for ; Wed, 12 Sep 2012 11:36:48 +0000 (UTC) Received: by mail-ie0-f180.google.com with SMTP id k11so2652190iea.11 for ; Wed, 12 Sep 2012 04:36:48 -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=syocSvUO3/chLwRO+HqpMLfrOrflSh86MK8W1xVwx1g=; b=QIceYB/pnUx+Ol3CMAP/mJWEsHxVDAIJuwBa/BQwZtoRrnryODpTuO61GE5R1r7Glz Nm9UGT2wbswDWb+ZJA8928c3GKcC4RAqTgYnUhOsbykmd65Qc1fwFd5GwC1MUPNaB2OR 7nGqX6JO16B2W/c/8kPGGQhMgo5plJCbbmRZzLgjjkwv5A0ucoAm0pOT/6sFIx0oSxiY KPulIHd0tS8se7xtleGjUZXXcJqOU2YrgQHfFvuhXQJieKGYCm/ZZJekGRZJ9smfVgIH tq6mZYl67QTea/pJTUKAYbXaZz47lQdGh+BJuNydPW0XPqFqj0QNX+Gx9eFyA+61Dkmw TlBQ== Received: by 10.50.242.3 with SMTP id wm3mr20192928igc.0.1347449808511; Wed, 12 Sep 2012 04:36:48 -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 ex8csp65195igc; Wed, 12 Sep 2012 04:36:48 -0700 (PDT) Received: by 10.68.232.6 with SMTP id tk6mr11187376pbc.112.1347449807890; Wed, 12 Sep 2012 04:36:47 -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.47 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 12 Sep 2012 04:36:47 -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:47 -0700 (PDT) Received: by 10.68.228.161 with SMTP id sj1mr16468845pbc.71.1347449807567; Wed, 12 Sep 2012 04:36:47 -0700 (PDT) Received: from localhost.localdomain ([115.113.119.130]) by mx.google.com with ESMTPS id uj3sm11274778pbc.39.2012.09.12.04.36.44 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 12 Sep 2012 04:36:46 -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 3/3] ARM: EXYNOS: Add generic PWM lookup support for SMDKV310 Date: Wed, 12 Sep 2012 17:03:32 +0530 Message-Id: <1347449612-382-4-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: ALoCoQkMfp3rR7WpXxtxt22IkfX9o5dR+zdPzPsHqCHfyaLeXvG1peAeyhl2P3SXwKMTk44k1EdJ 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-smdkv310.c | 7 +++++++ 2 files changed, 8 insertions(+), 0 deletions(-) diff --git a/arch/arm/mach-exynos/Kconfig b/arch/arm/mach-exynos/Kconfig index 798634d..9abdd57 100644 --- a/arch/arm/mach-exynos/Kconfig +++ b/arch/arm/mach-exynos/Kconfig @@ -221,6 +221,7 @@ config MACH_SMDKV310 select EXYNOS4_SETUP_KEYPAD select EXYNOS4_SETUP_SDHCI select EXYNOS4_SETUP_USB_PHY + select S3C24XX_PWM help Machine support for Samsung SMDKV310 diff --git a/arch/arm/mach-exynos/mach-smdkv310.c b/arch/arm/mach-exynos/mach-smdkv310.c index 208aa62..e53e66d 100644 --- a/arch/arm/mach-exynos/mach-smdkv310.c +++ b/arch/arm/mach-exynos/mach-smdkv310.c @@ -18,6 +18,7 @@ #include #include #include +#include #include #include @@ -355,6 +356,10 @@ static struct platform_pwm_backlight_data smdkv310_bl_data = { .pwm_period_ns = 1000, }; +static struct pwm_lookup smdkv310_pwm_lookup[] = { + PWM_LOOKUP("s3c24xx-pwm.1", 0, "pwm-backlight.0", NULL), +}; + /* I2C module and id for HDMIPHY */ static struct i2c_board_info hdmiphy_info = { I2C_BOARD_INFO("hdmiphy-exynos4210", 0x38), @@ -399,6 +404,8 @@ static void __init smdkv310_machine_init(void) samsung_keypad_set_platdata(&smdkv310_keypad_data); samsung_bl_set(&smdkv310_bl_gpio_info, &smdkv310_bl_data); + pwm_add_table(smdkv310_pwm_lookup, ARRAY_SIZE(smdkv310_pwm_lookup)); + #ifdef CONFIG_DRM_EXYNOS s5p_device_fimd0.dev.platform_data = &drm_fimd_pdata; exynos4_fimd0_gpio_setup_24bpp();