aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm
diff options
context:
space:
mode:
authorSachin Kamat <sachin.kamat@linaro.org>2012-09-13 02:52:11 -0400
committerKukjin Kim <kgene.kim@samsung.com>2012-09-13 02:52:11 -0400
commit20aa198f4990c25f7542e4e94175c3cb41731c4f (patch)
tree6beb8351a6f6cac7446f64c07212a3bbd83de7ff /arch/arm
parent4d8cc596dd9f8dcc909ad405742099239aaa48c0 (diff)
ARM: EXYNOS: Add generic PWM lookup support for SMDK4X12
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 <sachin.kamat@linaro.org> Reviewed-by: <thierry.reding@avionic-design.de> Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Diffstat (limited to 'arch/arm')
-rw-r--r--arch/arm/mach-exynos/Kconfig1
-rw-r--r--arch/arm/mach-exynos/mach-smdk4x12.c6
2 files changed, 7 insertions, 0 deletions
diff --git a/arch/arm/mach-exynos/Kconfig b/arch/arm/mach-exynos/Kconfig
index 4d198d487fc4..bd78d5d70c83 100644
--- a/arch/arm/mach-exynos/Kconfig
+++ b/arch/arm/mach-exynos/Kconfig
@@ -384,6 +384,7 @@ config MACH_SMDK4212
384 select EXYNOS4_SETUP_KEYPAD 384 select EXYNOS4_SETUP_KEYPAD
385 select EXYNOS4_SETUP_SDHCI 385 select EXYNOS4_SETUP_SDHCI
386 select EXYNOS4_SETUP_USB_PHY 386 select EXYNOS4_SETUP_USB_PHY
387 select S3C24XX_PWM
387 help 388 help
388 Machine support for Samsung SMDK4212 389 Machine support for Samsung SMDK4212
389 390
diff --git a/arch/arm/mach-exynos/mach-smdk4x12.c b/arch/arm/mach-exynos/mach-smdk4x12.c
index b26beb13ebef..81bf59c6f4bf 100644
--- a/arch/arm/mach-exynos/mach-smdk4x12.c
+++ b/arch/arm/mach-exynos/mach-smdk4x12.c
@@ -17,6 +17,7 @@
17#include <linux/mfd/max8997.h> 17#include <linux/mfd/max8997.h>
18#include <linux/mmc/host.h> 18#include <linux/mmc/host.h>
19#include <linux/platform_device.h> 19#include <linux/platform_device.h>
20#include <linux/pwm.h>
20#include <linux/pwm_backlight.h> 21#include <linux/pwm_backlight.h>
21#include <linux/regulator/machine.h> 22#include <linux/regulator/machine.h>
22#include <linux/serial_core.h> 23#include <linux/serial_core.h>
@@ -222,6 +223,10 @@ static struct platform_pwm_backlight_data smdk4x12_bl_data = {
222 .pwm_period_ns = 1000, 223 .pwm_period_ns = 1000,
223}; 224};
224 225
226static struct pwm_lookup smdk4x12_pwm_lookup[] = {
227 PWM_LOOKUP("s3c24xx-pwm.1", 0, "pwm-backlight.0", NULL),
228};
229
225static uint32_t smdk4x12_keymap[] __initdata = { 230static uint32_t smdk4x12_keymap[] __initdata = {
226 /* KEY(row, col, keycode) */ 231 /* KEY(row, col, keycode) */
227 KEY(1, 3, KEY_1), KEY(1, 4, KEY_2), KEY(1, 5, KEY_3), 232 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)
349 ARRAY_SIZE(smdk4x12_i2c_devs7)); 354 ARRAY_SIZE(smdk4x12_i2c_devs7));
350 355
351 samsung_bl_set(&smdk4x12_bl_gpio_info, &smdk4x12_bl_data); 356 samsung_bl_set(&smdk4x12_bl_gpio_info, &smdk4x12_bl_data);
357 pwm_add_table(smdk4x12_pwm_lookup, ARRAY_SIZE(smdk4x12_pwm_lookup));
352 358
353 samsung_keypad_set_platdata(&smdk4x12_keypad_data); 359 samsung_keypad_set_platdata(&smdk4x12_keypad_data);
354 360