From: Sachin Kamat Date: Thu, 13 Sep 2012 06:54:18 +0000 (+0900) Subject: ARM: EXYNOS: Add generic PWM lookup support for SMDKV310 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=fae9659a2cabcdaa01ea5a87568677e5cb037478;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git ARM: EXYNOS: Add generic PWM lookup support for SMDKV310 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 Reviewed-by: Signed-off-by: Kukjin Kim --- diff --git a/arch/arm/mach-exynos/Kconfig b/arch/arm/mach-exynos/Kconfig index bd78d5d70c83..7ec64c8c9917 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 3cfa688d274a..1ba87e963f5b 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 @@ -354,6 +355,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), +}; + static void s5p_tv_setup(void) { /* direct HPD to HDMI chip */ @@ -392,6 +397,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();