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 --- a/arch/mips/au1000/mtx-1/platform.c
6 +++ b/arch/mips/au1000/mtx-1/platform.c
8 #include <linux/types.h>
9 #include <linux/platform_device.h>
10 #include <linux/leds.h>
11 +#include <linux/gpio_keys.h>
12 +#include <linux/input.h>
16 +static struct gpio_keys_button mtx1_gpio_button[] = {
20 + .desc = "System button",
24 +static struct gpio_keys_platform_data mtx1_buttons_data = {
25 + .buttons = mtx1_gpio_button,
26 + .nbuttons = ARRAY_SIZE(mtx1_gpio_button),
29 +static struct platform_device mtx1_button = {
30 + .name = "gpio-keys",
33 + .platform_data = &mtx1_buttons_data,
37 static struct resource mtx1_wdt_res[] = {
40 @@ -62,11 +85,13 @@ static struct platform_device mtx1_gpio_
42 static struct platform_device *mtx1_devs[] = {
49 static int __init mtx1_register_devices(void)
51 + gpio_direction_input(207);
52 return platform_add_devices(mtx1_devs, ARRAY_SIZE(mtx1_devs));