* adds arv4518pw mach support * fixes arv4525pw * make sure all mach names have the...
[openwrt/openwrt.git] / target / linux / lantiq / patches / 104-board_xway.patch
index e70ff8007401ab0387ffb57e376e71f76a304ee1..fcd9c0e326c6a7153fafa67f4dfedd444a949d76 100644 (file)
 +}
 --- /dev/null
 +++ b/arch/mips/lantiq/xway/devices.c
-@@ -0,0 +1,278 @@
+@@ -0,0 +1,305 @@
 +/*
 + *  This program is free software; you can redistribute it and/or modify it
 + *  under the terms of the GNU General Public License version 2 as published
 +#include <linux/time.h>
 +#include <linux/io.h>
 +#include <linux/gpio.h>
++#include <linux/gpio_buttons.h>
 +#include <linux/leds.h>
 +
 +#include <asm/bootinfo.h>
 +      platform_device_register(&lq_gpio_leds);
 +}
 +
++/* gpio buttons */
++static struct gpio_buttons_platform_data lq_gpio_buttons_platform_data;
++
++static struct platform_device lq_gpio_buttons_platform_device =
++{
++      .name = "gpio-buttons",
++      .id = 0,
++      .dev = {
++              .platform_data = (void *) &lq_gpio_buttons_platform_data,
++      },
++};
++
++void __init
++lq_register_gpio_buttons(struct gpio_button *buttons, int cnt)
++{
++      lq_gpio_buttons_platform_data.buttons = buttons;
++      lq_gpio_buttons_platform_data.nbuttons = cnt;
++      platform_device_register(&lq_gpio_buttons_platform_device);
++}
++
 +/* serial to parallel conversion */
 +static struct resource lq_stp_resource =
 +{
 +              break;
 +      }
 +}
++
++void __init
++lq_register_crypto(const char *name)
++{
++      platform_device_register_simple(name, 0, 0, 0);
++}
 --- /dev/null
 +++ b/arch/mips/lantiq/xway/devices.h
-@@ -0,0 +1,25 @@
+@@ -0,0 +1,26 @@
 +/*
 + *  This program is free software; you can redistribute it and/or modify it
 + *  under the terms of the GNU General Public License version 2 as published
 +extern void __init lq_register_wdt(void);
 +extern void __init lq_register_ethernet(struct lq_eth_data *eth);
 +extern void __init lq_register_asc(int port);
++extern void __init lq_register_gpio_buttons(struct gpio_button *buttons, int cnt);
 +
 +#endif
 --- /dev/null