1 This patch adds support for the GPIO connected system button on the MTX-1 boards. Default configuration is updated accordingly.
3 Signed-off-by: Florian Fainelli <florian.fainelli@telecomint.eu>
5 diff --git a/arch/mips/au1000/mtx-1/platform.c b/arch/mips/au1000/mtx-1/platform.c
6 index 49c0fb4..ce8637b 100644
7 --- a/arch/mips/au1000/mtx-1/platform.c
8 +++ b/arch/mips/au1000/mtx-1/platform.c
10 #include <linux/types.h>
11 #include <linux/platform_device.h>
12 #include <linux/leds.h>
13 +#include <linux/gpio_keys.h>
14 +#include <linux/input.h>
18 +static struct gpio_keys_button mtx1_gpio_button[] = {
22 + .desc = "System button",
26 +static struct gpio_keys_platform_data mtx1_buttons_data = {
27 + .buttons = mtx1_gpio_button,
28 + .nbuttons = ARRAY_SIZE(mtx1_gpio_button),
31 +static struct platform_device mtx1_button = {
32 + .name = "gpio-keys",
35 + .platform_data = &mtx1_buttons_data,
39 static struct resource mtx1_wdt_res[] = {
42 @@ -66,11 +89,13 @@ static struct platform_device mtx1_gpio_leds = {
44 static struct __initdata platform_device * mtx1_devs[] = {
51 static int __init mtx1_register_devices(void)
53 + gpio_direction_input(207);
54 return platform_add_devices(mtx1_devs, ARRAY_SIZE(mtx1_devs));