]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/arm/mach-omap2/board-apollon-keys.c
ARM: OMAP: Partial revert for EAC IO address changes
[linux-2.6-omap-h63xx.git] / arch / arm / mach-omap2 / board-apollon-keys.c
index b6fa4eaa1fe96d1d4311a62bd37743f02a2851ce..10329c0ae6ad5bad3c5ded7f6ffdeb0f99a3e38f 100644 (file)
@@ -15,8 +15,8 @@
 #include <linux/input.h>
 #include <linux/gpio_keys.h>
 
-#include <asm/arch/gpio.h>
-#include <asm/arch/mux.h>
+#include <mach/gpio.h>
+#include <mach/mux.h>
 
 #define SW_ENTER_GPIO16                16
 #define SW_UP_GPIO17           17
@@ -25,6 +25,8 @@
 #define SW_RIGHT_GPIO96                96
 #define SW_ESC_GPIO97          97
 
+extern int apollon_plus(void);
+
 static struct gpio_keys_button apollon_gpio_keys_buttons[] = {
        [0] = {
                .code           = KEY_ENTER,
@@ -41,7 +43,6 @@ static struct gpio_keys_button apollon_gpio_keys_buttons[] = {
                .gpio           = SW_DOWN_GPIO58,
                .desc           = "down sw",
        },
-#ifdef CONFIG_MACH_OMAP_APOLLON_PLUS
        [3] = {
                .code           = KEY_LEFT,
                .gpio           = SW_LEFT_GPIO95,
@@ -57,7 +58,6 @@ static struct gpio_keys_button apollon_gpio_keys_buttons[] = {
                .gpio           = SW_ESC_GPIO97,
                .desc           = "esc sw",
        },
-#endif
 };
 
 static struct gpio_keys_platform_data apollon_gpio_keys = {
@@ -81,14 +81,16 @@ static void __init apollon_sw_init(void)
        omap_cfg_reg(AA12_242X_GPIO17);
        /* Down SW - AA8 */
        omap_cfg_reg(AA8_242X_GPIO58);
-#ifdef CONFIG_MACH_OMAP_APOLLON_PLUS
-       /* Left SW - P18 */
-       omap_cfg_reg(P18_24XX_GPIO95);
-       /* Right SW - M18 */
-       omap_cfg_reg(M18_24XX_GPIO96);
-       /* Esc SW - L14 */
-       omap_cfg_reg(L14_24XX_GPIO97);
-#endif
+
+       if (apollon_plus()) {
+               /* Left SW - P18 */
+               omap_cfg_reg(P18_24XX_GPIO95);
+               /* Right SW - M18 */
+               omap_cfg_reg(M18_24XX_GPIO96);
+               /* Esc SW - L14 */
+               omap_cfg_reg(L14_24XX_GPIO97);
+       } else
+               apollon_gpio_keys.nbuttons = 3;
 }
 
 static int __init omap_apollon_keys_init(void)