diff options
Diffstat (limited to 'arch/arm/mach-mx6/board-mx6q_sabrelite.c')
-rw-r--r-- | arch/arm/mach-mx6/board-mx6q_sabrelite.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/arch/arm/mach-mx6/board-mx6q_sabrelite.c b/arch/arm/mach-mx6/board-mx6q_sabrelite.c index 6b66ea339587..2c0cbe220d2d 100644 --- a/arch/arm/mach-mx6/board-mx6q_sabrelite.c +++ b/arch/arm/mach-mx6/board-mx6q_sabrelite.c @@ -780,7 +780,6 @@ static const struct pm_platform_data mx6_sabrelite_pm_data __initconst = { .suspend_exit = sabrelite_suspend_exit, }; -#if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE) #define GPIO_BUTTON(gpio_num, ev_code, act_low, descr, wake) \ { \ .gpio = gpio_num, \ @@ -800,6 +799,7 @@ static struct gpio_keys_button sabrelite_buttons[] = { GPIO_BUTTON(MX6_SABRELITE_VOL_DOWN_KEY, KEY_VOLUMEDOWN, 1, "volume-down", 0), }; +#if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE) static struct gpio_keys_platform_data sabrelite_button_data = { .buttons = sabrelite_buttons, .nbuttons = ARRAY_SIZE(sabrelite_buttons), @@ -819,7 +819,15 @@ static void __init sabrelite_add_device_buttons(void) platform_device_register(&sabrelite_button_device); } #else -static void __init sabrelite_add_device_buttons(void) {} +static void __init sabrelite_add_device_buttons(void) +{ + int i; + for (i=0; i < ARRAY_SIZE(sabrelite_buttons);i++) { + int gpio = sabrelite_buttons[i].gpio; + pr_debug("%s: exporting gpio %d\n", __func__, gpio); + gpio_export(gpio,1); + } +} #endif #ifdef CONFIG_WL12XX_PLATFORM_DATA |