X-Git-Url: http://git.rohieb.name/openwrt.git/blobdiff_plain/591bfffa4c9c02bf15bab11862149c09a6bda78b..adde7768a2eab2950a7628319ec832c63a00ff03:/target/linux/rdc/files/arch/i386/mach-rdc/platform.c diff --git a/target/linux/rdc/files/arch/i386/mach-rdc/platform.c b/target/linux/rdc/files/arch/i386/mach-rdc/platform.c index 0a607223c..31af6fcc3 100644 --- a/target/linux/rdc/files/arch/i386/mach-rdc/platform.c +++ b/target/linux/rdc/files/arch/i386/mach-rdc/platform.c @@ -30,6 +30,8 @@ #include #include #include +#include +#include #include @@ -74,10 +76,34 @@ static struct platform_device rdc321x_wdt = { .num_resources = 0, }; +/* Button */ +static struct gpio_keys_button rdc321x_gpio_btn[] = { + { + .gpio = 0, + .code = BTN_0, + .desc = "Reset", + .active_low = 1, + } +}; + +static struct gpio_keys_platform_data rdc321x_gpio_btn_data = { + .buttons = rdc321x_gpio_btn, + .nbuttons = ARRAY_SIZE(rdc321x_gpio_btn), +}; + +static struct platform_device rdc321x_button = { + .name = "gpio-keys", + .id = -1, + .dev = { + .platform_data = &rdc321x_gpio_btn_data, + } +}; + static struct platform_device *rdc321x_devs[] = { &rdc_flash_device, &rdc321x_leds, - &rdc321x_wdt + &rdc321x_wdt, + &rdc321x_button }; static int __init rdc_board_setup(void)