Skip to contentSkip to conversation

ARM: S5PV210: Set 1000ns as PWM backlight period on SMDKV210

PATCH In review Jingoo Han 3 participants 4 messages Nov 9, 2011 – Dec 21, 2011

Subsystems (3)
lore
Share & tools
lore

Jingoo Han

author
#0 lore raw

PATCH 1/1 ARM: S5PV210: Set 1000ns as PWM backlight period on SMDKV210

The SMDK board uses LT3591 as backlight LED driver of LTE480WV LCD. According to the LT3591 datasheet, the switching frequency should be 1MHz. So, PWM period is calculated by following formula:

PWM period = 1/switching frequency

	   = 1/1MHz
	   = 1000ns

Thus, the PWM backlight period should be 1000ns.

---
 arch/arm/mach-s5pv210/mach-smdkv210.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
arch/arm/mach-s5pv210/mach-smdkv210.c +1 -0
index a9106c3..8662ef6 100644
@@ -273,6 +273,7 @@ static struct samsung_bl_gpio_info smdkv210_bl_gpio_info = {
 
 static struct platform_pwm_backlight_data smdkv210_bl_data = {
 	.pwm_id = 3,
+	.pwm_period_ns = 1000,
 };
 
 static void __init smdkv210_map_io(void)
Signature · 1 line
1.7.1
#1 lore raw
Quoted 29 lines · Jingoo Han

The SMDK board uses LT3591 as backlight LED driver of LTE480WV LCD. According to the LT3591 datasheet, the switching frequency should be 1MHz. So, PWM period is calculated by following formula:

PWM period = 1/switching frequency

	   = 1/1MHz
	   = 1000ns

Thus, the PWM backlight period should be 1000ns.

---
 arch/arm/mach-s5pv210/mach-smdkv210.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
arch/arm/mach- renamed from arch/arm/mach-s5pv210/mach-smdkv210.c +0 -0

s5pv210/mach-smdkv210.c
index a9106c3..8662ef6 100644

arch/arm/mach-s5pv210/mach-smdkv210.c +1 -0
@@ -273,6 +273,7 @@ static struct samsung_bl_gpio_info
 smdkv210_bl_gpio_info = {
 
 static struct platform_pwm_backlight_data smdkv210_bl_data = {
 	.pwm_id = 3,
+	.pwm_period_ns = 1000,
 };
 
Quoted 3 lines

static void __init smdkv210_map_io(void)
--
1.7.1

OK, will apply.

But when I'm looking at this in other case, we need to update the default value of pwm_period_ns?
Let me check.

(Cc'ed Mark Brown)

Mark,
If switch frequency is 1kHz, the value of pwm_period_ns should be 1000000 at mach-crag6410.c not 100000?

Thanks.

Best regards,
Kgene.
--
Kukjin Kim <[email protected]>, Senior Engineer, SW Solution Development Team, Samsung Electronics Co., Ltd.

#2 lore raw
Quoted 2 lines · Kukjin Kim

If switch frequency is 1kHz, the value of pwm_period_ns should be 1000000 at mach-crag6410.c not 100000?

I guess so, please go ahead and make the change - we can always revert if it doesn't work.

#3 lore raw
Quoted 9 lines · Mark Brown
Quoted 1 line · Kukjin Kim

If switch frequency is 1kHz, the value of pwm_period_ns should be

1000000 at

Quoted 1 line

mach-crag6410.c not 100000?

I guess so, please go ahead and make the change - we can always revert if it doesn't work.

OK, let me do it.

Thanks.

Best regards,
Kgene.
--
Kukjin Kim <[email protected]>, Senior Engineer, SW Solution Development Team, Samsung Electronics Co., Ltd.