X-Git-Url: https://git.rohieb.name/openwrt.git/blobdiff_plain/3014c2fffa5e600006bc6af618085c331c7ccee1..758e1cc135a5af7881bea1ba1af1fe419826db03:/target/linux/rb532/files/arch/mips/rb500/devices.c diff --git a/target/linux/rb532/files/arch/mips/rb500/devices.c b/target/linux/rb532/files/arch/mips/rb500/devices.c index d2476a89c..f2a6f7d9f 100644 --- a/target/linux/rb532/files/arch/mips/rb500/devices.c +++ b/target/linux/rb532/files/arch/mips/rb500/devices.c @@ -22,6 +22,8 @@ #include #include #include +#include +#include #include @@ -184,11 +186,39 @@ static struct mtd_partition rb500_partition_info[] = { } }; +static struct platform_device rb500_led = { + .name = "rb500-led", + .id = 0, +}; + +static struct gpio_keys_button rb500_gpio_btn[] = { + { + .gpio = 1, + .code = BTN_0, + .desc = "S1", + .active_low = 1, + } +}; + +static struct gpio_keys_platform_data rb500_gpio_btn_data = { + .buttons = rb500_gpio_btn, + .nbuttons = ARRAY_SIZE(rb500_gpio_btn), +}; + +static struct platform_device rb500_button = { + .name = "gpio-keys", + .id = -1, + .dev = { + .platform_data = &rb500_gpio_btn_data, + } +}; static struct platform_device *rb500_devs[] = { &korina_dev0, &nand_slot0, - &cf_slot0 + &cf_slot0, + &rb500_led, + &rb500_button }; static void __init parse_mac_addr(char *macstr)