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 Index: linux-2.6.25.4/arch/mips/au1000/mtx-1/platform.c
6 ===================================================================
7 --- linux-2.6.25.4.orig/arch/mips/au1000/mtx-1/platform.c
8 +++ linux-2.6.25.4/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 @@ -62,11 +85,13 @@ static struct platform_device mtx1_gpio_
44 static struct 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));