Hello!
I have working OMAP4 PWM LED driver, based on GP Timers for 2.6.35 branch.
Source is here http://pastebin.com/rFt3xHKp
When I try use this code in 3.0 kernel branch I get such problem:
1. Back-light is turning on the maximum brightness. Changing brightness value in SW doesn't change brightness on the real hardware.
I add some debug info to the code
http://pastebin.com/F6T2hWCQ
and use
static struct omap_pwm_led_platform_data acclaim4430_disp_backlight_data = {
.name = "lcd-backlight",
.intensity_timer = 11,
.def_on = 1,
.def_brightness = DEFAULT_BACKLIGHT_BRIGHTNESS,
.set_power = acclaim4430_disp_backlight_setpower,
};
static struct platform_device sdp4430_disp_led = {
.name = "omap_pwm_led",
.id = -1,
.dev = {
.platform_data = &acclaim4430_disp_backlight_data,
},
};
static struct platform_device *sdp4430_devices[] __initdata = {
&sdp4430_disp_led,
};
I receive such output:
<7>level 1->omap_pwm_led_init:
<7>level 1->omap_pwm_led_probe:
<6>omap_pwm_led omap_pwm_led: OMAP PWM LED (lcd-backlight) at GP timer 11/0
<7>Registered led device: lcd-backlight
after command
echo 10 > /sys/class/leds/lcd-backlight/brightness
output:
<7>level 1->omap_pwm_led_set:
<7>level 1->cdev_to_omap_pwm_led:
<7>level 1->omap_pwm_led_work:
<7>level 1->work_to_omap_pwm_led:
<7>level 1->omap_pwm_led_power_on:
<4>!!!!!!!!!!omap_pwm_led_power_on the brightness is 10
<4>!!!!!!!!!!Turn voltage on
<4>[BL set power] 1
<7>level 1->omap_pwm_led_set_pwm_cycle:
<4>!!!!!!!!!!cycle != LED_FULL, cycle=10
LED flashes one time, and stay black
after another coammand
echo 10 > /sys/class/leds/lcd-backlight/brightness
output:
<7>level 1->omap_pwm_led_set:
<7>level 1->cdev_to_omap_pwm_led:
<7>level 1->omap_pwm_led_work:
<7>level 1->work_to_omap_pwm_led:
<7>level 1->omap_pwm_led_power_on:
<4>!!!!!!!!!!omap_pwm_led_power_on the brightness is 10
<4>!!!!!!!!!!LED powered, returning
<7>level 1->omap_pwm_led_set_pwm_cycle:
<4>!!!!!!!!!!cycle != LED_FULL, cycle=10
LED turning on like the maximum brightness, not 10.
Anybody can help?
I use such linux/arch/arm/plat-omap/dmtimer.c
http://pastebin.com/DvDSxDB4