#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
#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,
.gpio = SW_DOWN_GPIO58,
.desc = "down sw",
},
-#ifdef CONFIG_MACH_OMAP_APOLLON_PLUS
[3] = {
.code = KEY_LEFT,
.gpio = SW_LEFT_GPIO95,
.gpio = SW_ESC_GPIO97,
.desc = "esc sw",
},
-#endif
};
static struct gpio_keys_platform_data apollon_gpio_keys = {
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)