Skip to content

Commit a9eeb0e

Browse files
committed
Merge tag 'samsung-soc-5.6-2' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux into arm/soc
Samsung mach/soc changes for v5.6, part 2 1. Switch from legacy to atomic pwm API in rx1950 (s3c24xx), 2. Cleanups of unneeded selects in Kconfig. * tag 'samsung-soc-5.6-2' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux: ARM: s3c64xx: Drop unneeded select of TIMER_OF ARM: exynos: Drop unneeded select of MIGHT_HAVE_CACHE_L2X0 ARM: s3c24xx: Switch to atomic pwm API in rx1950 Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Olof Johansson <[email protected]>
2 parents 31a7d26 + af15a11 commit a9eeb0e

File tree

3 files changed

+12
-9
lines changed

3 files changed

+12
-9
lines changed

arch/arm/mach-exynos/Kconfig

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,6 @@ config ARCH_EXYNOS4
6464
select CLKSRC_SAMSUNG_PWM if CPU_EXYNOS4210
6565
select CPU_EXYNOS4210
6666
select GIC_NON_BANKED
67-
select MIGHT_HAVE_CACHE_L2X0
6867
help
6968
Samsung Exynos4 (Cortex-A9) SoC based systems
7069

arch/arm/mach-s3c24xx/mach-rx1950.c

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -377,6 +377,7 @@ static struct pwm_lookup rx1950_pwm_lookup[] = {
377377
};
378378

379379
static struct pwm_device *lcd_pwm;
380+
static struct pwm_state lcd_pwm_state;
380381

381382
static void rx1950_lcd_power(int enable)
382383
{
@@ -429,15 +430,16 @@ static void rx1950_lcd_power(int enable)
429430

430431
/* GPB1->OUTPUT, GPB1->0 */
431432
gpio_direction_output(S3C2410_GPB(1), 0);
432-
pwm_config(lcd_pwm, 0, LCD_PWM_PERIOD);
433-
pwm_disable(lcd_pwm);
433+
434+
lcd_pwm_state.enabled = false;
435+
pwm_apply_state(lcd_pwm, &lcd_pwm_state);
434436

435437
/* GPC0->0, GPC10->0 */
436438
gpio_direction_output(S3C2410_GPC(0), 0);
437439
gpio_direction_output(S3C2410_GPC(10), 0);
438440
} else {
439-
pwm_config(lcd_pwm, LCD_PWM_DUTY, LCD_PWM_PERIOD);
440-
pwm_enable(lcd_pwm);
441+
lcd_pwm_state.enabled = true;
442+
pwm_apply_state(lcd_pwm, &lcd_pwm_state);
441443

442444
gpio_direction_output(S3C2410_GPC(0), 1);
443445
gpio_direction_output(S3C2410_GPC(5), 1);
@@ -493,10 +495,13 @@ static int rx1950_backlight_init(struct device *dev)
493495
}
494496

495497
/*
496-
* FIXME: pwm_apply_args() should be removed when switching to
497-
* the atomic PWM API.
498+
* This is only required to initialize .polarity; all other values are
499+
* fixed in this driver.
498500
*/
499-
pwm_apply_args(lcd_pwm);
501+
pwm_init_state(lcd_pwm, &lcd_pwm_state);
502+
503+
lcd_pwm_state.period = LCD_PWM_PERIOD;
504+
lcd_pwm_state.duty_cycle = LCD_PWM_DUTY;
500505

501506
rx1950_lcd_power(1);
502507
rx1950_bl_power(1);

arch/arm/mach-s3c64xx/Kconfig

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,6 @@ config MACH_WLF_CRAGG_6410
336336

337337
config MACH_S3C64XX_DT
338338
bool "Samsung S3C6400/S3C6410 machine using Device Tree"
339-
select TIMER_OF
340339
select CPU_S3C6400
341340
select CPU_S3C6410
342341
select PINCTRL

0 commit comments

Comments
 (0)