From 29be6d99e9928fd1a16cc94f98812b27d051f907 Mon Sep 17 00:00:00 2001 From: Peter Ujfalusi Date: Wed, 7 Nov 2012 11:40:18 +0100 Subject: [PATCH] --- yaml --- r: 355712 b: refs/heads/master c: 42997c4b2ec3c5dcf97c739cd64128d3e55d8f31 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/arch/arm/mach-omap2/board-4430sdp.c | 30 ++++++++++++++++++++++- 2 files changed, 30 insertions(+), 2 deletions(-) diff --git a/[refs] b/[refs] index e97ea8309a64..14d52724dd41 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 77f86144984e4cd375c9dcda83b79f32670f85fe +refs/heads/master: 42997c4b2ec3c5dcf97c739cd64128d3e55d8f31 diff --git a/trunk/arch/arm/mach-omap2/board-4430sdp.c b/trunk/arch/arm/mach-omap2/board-4430sdp.c index 1cc6696594fd..918b73bd0215 100644 --- a/trunk/arch/arm/mach-omap2/board-4430sdp.c +++ b/trunk/arch/arm/mach-omap2/board-4430sdp.c @@ -24,8 +24,10 @@ #include #include #include +#include #include #include +#include #include #include @@ -256,10 +258,20 @@ static struct gpio_led_platform_data sdp4430_led_data = { .num_leds = ARRAY_SIZE(sdp4430_gpio_leds), }; +static struct pwm_lookup sdp4430_pwm_lookup[] = { + PWM_LOOKUP("twl-pwm", 0, "leds_pwm", "omap4::keypad"), + PWM_LOOKUP("twl-pwm", 1, "pwm-backlight", NULL), + PWM_LOOKUP("twl-pwmled", 0, "leds_pwm", "omap4:green:chrg"), +}; + static struct led_pwm sdp4430_pwm_leds[] = { + { + .name = "omap4::keypad", + .max_brightness = 127, + .pwm_period_ns = 7812500, + }, { .name = "omap4:green:chrg", - .pwm_id = 1, .max_brightness = 255, .pwm_period_ns = 7812500, }, @@ -278,6 +290,20 @@ static struct platform_device sdp4430_leds_pwm = { }, }; +static struct platform_pwm_backlight_data sdp4430_backlight_data = { + .max_brightness = 127, + .dft_brightness = 127, + .pwm_period_ns = 7812500, +}; + +static struct platform_device sdp4430_backlight_pwm = { + .name = "pwm-backlight", + .id = -1, + .dev = { + .platform_data = &sdp4430_backlight_data, + }, +}; + static int omap_prox_activate(struct device *dev) { gpio_set_value(OMAP4_SFH7741_ENABLE_GPIO , 1); @@ -412,6 +438,7 @@ static struct platform_device *sdp4430_devices[] __initdata = { &sdp4430_gpio_keys_device, &sdp4430_leds_gpio, &sdp4430_leds_pwm, + &sdp4430_backlight_pwm, &sdp4430_vbat, &sdp4430_dmic_codec, &sdp4430_abe_audio, @@ -707,6 +734,7 @@ static void __init omap_4430sdp_init(void) ARRAY_SIZE(sdp4430_spi_board_info)); } + pwm_add_table(sdp4430_pwm_lookup, ARRAY_SIZE(sdp4430_pwm_lookup)); status = omap4_keyboard_init(&sdp4430_keypad_data, &keypad_data); if (status) pr_err("Keypad initialization failed: %d\n", status);