]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
ARM: OMAP: osk+mistral backlight, power, board specific
authorDavid Brownell <dbrownell@users.sourceforge.net>
Mon, 11 Dec 2006 22:27:03 +0000 (14:27 -0800)
committerTony Lindgren <tony@atomide.com>
Mon, 11 Dec 2006 22:27:03 +0000 (14:27 -0800)
Mistral-specific:

  - Add PWL-driven LCD backlight device

  - Apply power to the board even when the LCD isn't configured; things
    like EEPROM, temperature sensor, and wakeup switch depend on it.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Tony Lindgren <tony@atomide.com>
arch/arm/mach-omap1/board-osk.c

index f29481163ae6b1d7a3a20d21a73f94d3400a9137..15d913e98e22a007149a1927ebb802d67754fad4 100644 (file)
@@ -292,6 +292,18 @@ static struct platform_device osk5912_kp_device = {
        .resource       = osk5912_kp_resources,
 };
 
+static struct omap_backlight_config mistral_bl_data = {
+       .default_intensity      = 0xa0,
+};
+
+static struct platform_device mistral_bl_device = {
+       .name           = "omap-bl",
+       .id             = -1,
+       .dev            = {
+               .platform_data = &mistral_bl_data,
+       },
+};
+
 static struct platform_device osk5912_lcd_device = {
        .name           = "lcd_osk",
        .id             = -1,
@@ -299,6 +311,7 @@ static struct platform_device osk5912_lcd_device = {
 
 static struct platform_device *mistral_devices[] __initdata = {
        &osk5912_kp_device,
+       &mistral_bl_device,
        &osk5912_lcd_device,
 };
 
@@ -404,6 +417,15 @@ static void __init osk_mistral_init(void)
        } else
                printk(KERN_ERR "OSK+Mistral: wakeup button is awol\n");
 
+       /* LCD:  backlight, and power; power controls other devices on the
+        * board, like the touchscreen, EEPROM, and wakeup (!) switch.
+        */
+       omap_cfg_reg(PWL);
+       if (omap_request_gpio(2) == 0) {
+               omap_set_gpio_direction(2, 0 /* out */);
+               omap_set_gpio_dataout(2, 1 /* on */);
+       }
+
        platform_add_devices(mistral_devices, ARRAY_SIZE(mistral_devices));
 }
 #else