Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ARM: S3C24XX: Use PWM lookup table for mach-rx1950

Use a PWM lookup table to provide the PWM to the pwm-backlight device.
The driver has a legacy code path that is required only because boards
still use the legacy method of requesting PWMs by global ID. Replacing
these usages allows that legacy fallback to be removed.

Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
Reviewed-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Signed-off-by: Kukjin Kim <kgene@kernel.org>

authored by

Thierry Reding and committed by
Kukjin Kim
c107fe90 8c78aaa6

+6 -2
+6 -2
arch/arm/mach-s3c24xx/mach-rx1950.c
··· 375 375 376 376 }; 377 377 378 + static struct pwm_lookup rx1950_pwm_lookup[] = { 379 + PWM_LOOKUP("samsung-pwm", 0, "pwm-backlight.0", NULL, 48000, 380 + PWM_POLARITY_NORMAL), 381 + }; 382 + 378 383 static struct pwm_device *lcd_pwm; 379 384 380 385 static void rx1950_lcd_power(int enable) ··· 525 520 } 526 521 527 522 static struct platform_pwm_backlight_data rx1950_backlight_data = { 528 - .pwm_id = 0, 529 523 .max_brightness = 24, 530 524 .dft_brightness = 4, 531 - .pwm_period_ns = 48000, 532 525 .enable_gpio = -1, 533 526 .init = rx1950_backlight_init, 534 527 .notify = rx1950_backlight_notify, ··· 795 792 gpio_direction_output(S3C2410_GPA(4), 0); 796 793 gpio_direction_output(S3C2410_GPJ(6), 0); 797 794 795 + pwm_add_table(rx1950_pwm_lookup, ARRAY_SIZE(rx1950_pwm_lookup)); 798 796 platform_add_devices(rx1950_devices, ARRAY_SIZE(rx1950_devices)); 799 797 800 798 i2c_register_board_info(0, rx1950_i2c_devices,