]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/arm/mach-omap2/board-n800.c
Merge branch 'omap-fixes'
[linux-2.6-omap-h63xx.git] / arch / arm / mach-omap2 / board-n800.c
index 66c7d18317ffdc22434a1a7947ec8cbdb9340078..f1552f0d7b61948e921ed8e94422a8f0a9ddef6f 100644 (file)
@@ -26,6 +26,7 @@
 #include <linux/i2c.h>
 #include <linux/i2c/lm8323.h>
 #include <linux/i2c/menelaus.h>
+#include <linux/i2c/lp5521.h>
 #include <mach/hardware.h>
 #include <asm/mach-types.h>
 #include <asm/mach/arch.h>
@@ -40,6 +41,7 @@
 #include <mach/gpio-switch.h>
 #include <mach/omapfb.h>
 #include <mach/blizzard.h>
+#include <mach/board-nokia.h>
 
 #include <../drivers/cbus/tahvo.h>
 #include <../drivers/media/video/tcm825x.h>
@@ -111,12 +113,16 @@ static s16 rx44_keymap[LM8323_KEYMAP_SIZE] = {
 };
 
 static struct lm8323_platform_data lm8323_pdata = {
-       .repeat = 0, /* Repeat is handled in userspace for now. */
-       .keymap = rx44_keymap,
-
-       .name = "Internal keyboard",
-       .pwm1_name = "keyboard",
-       .pwm2_name = "cover",
+       .repeat         = 0, /* Repeat is handled in userspace for now. */
+       .keymap         = rx44_keymap,
+       .size_x         = 8,
+       .size_y         = 8,
+       .debounce_time  = 12,
+       .active_time    = 500,
+
+       .name           = "Internal keyboard",
+       .pwm1_name      = "n810::keyboard",
+       .pwm2_name      = "n810::cover",
 };
 #endif
 
@@ -127,7 +133,7 @@ void __init nokia_n800_init_irq(void)
        omap_gpio_init();
 
 #ifdef CONFIG_OMAP_STI
-       if (omap_request_gpio(N800_STI_GPIO) < 0) {
+       if (gpio_request(N800_STI_GPIO, "STI") < 0) {
                printk(KERN_ERR "Failed to request GPIO %d for STI\n",
                       N800_STI_GPIO);
                return;
@@ -254,7 +260,7 @@ static void __init blizzard_dev_init(void)
 {
        int r;
 
-       r = omap_request_gpio(N800_BLIZZARD_POWERDOWN_GPIO);
+       r = gpio_request(N800_BLIZZARD_POWERDOWN_GPIO, "Blizzard pd");
        if (r < 0)
                return;
        gpio_direction_output(N800_BLIZZARD_POWERDOWN_GPIO, 1);
@@ -331,7 +337,7 @@ static int __init tea5761_dev_init(void)
                pr_debug("Enabling tea5761 at GPIO %d\n",
                         enable_gpio);
 
-               if (omap_request_gpio(enable_gpio) < 0) {
+               if (gpio_request(enable_gpio, "TEA5761 enable") < 0) {
                        printk(KERN_ERR "Can't request GPIO %d\n",
                               enable_gpio);
                        return -ENODEV;
@@ -563,10 +569,20 @@ static struct omap_gpio_switch n800_gpio_switches[] __initdata = {
        },
 };
 
+#if defined(CONFIG_CBUS_RETU_HEADSET)
+static struct platform_device retu_headset_device = {
+       .name   = "retu-headset",
+       .id     = -1,
+};
+#endif
+
 static struct platform_device *n800_devices[] __initdata = {
 #if defined(CONFIG_CBUS_RETU) && defined(CONFIG_LEDS_OMAP_PWM)
        &n800_keypad_led_device,
 #endif
+#if defined(CONFIG_CBUS_RETU_HEADSET)
+       &retu_headset_device,
+#endif
 };
 
 #ifdef CONFIG_MENELAUS
@@ -628,6 +644,14 @@ static struct i2c_board_info __initdata n800_i2c_board_info_1[] = {
        },
 };
 
+static struct lp5521_platform_data n810_lp5521_platform_data = {
+       .mode           = LP5521_MODE_DIRECT_CONTROL,
+       .label          = "n810",
+       .red_present    = true,
+       .green_present  = true,
+       .blue_present   = true,
+};
+
 extern struct tcm825x_platform_data n800_tcm825x_platform_data;
 
 static struct i2c_board_info __initdata_or_module n8x0_i2c_board_info_2[] = {
@@ -657,6 +681,7 @@ static struct i2c_board_info __initdata_or_module n810_i2c_board_info_2[] = {
        },
        {
                I2C_BOARD_INFO("lp5521", 0x32),
+               .platform_data = &n810_lp5521_platform_data,
        },
 };
 
@@ -698,7 +723,6 @@ static void __init nokia_n800_init(void)
 {
        nokia_n800_common_init();
 
-       n800_audio_init(&tsc2301_config);
        n800_ts_set_config();
        tsc2301_dev_init();
        tea5761_dev_init();