# CONFIG_FIXED_PHY is not set
CONFIG_FS_POSIX_ACL=y
CONFIG_GENERIC_FIND_NEXT_BIT=y
+CONFIG_GENERIC_GPIO=y
# CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ is not set
CONFIG_GPIO_DEVICE=y
CONFIG_HAS_DMA=y
CONFIG_HAS_IOMEM=y
CONFIG_HAS_IOPORT=y
-CONFIG_HID_SUPPORT=n
# CONFIG_HOSTAP is not set
CONFIG_HW_RANDOM=y
# CONFIG_I2C is not set
CONFIG_INITRAMFS_SOURCE=""
CONFIG_IRQ_CPU=y
# CONFIG_LEDS_ALIX is not set
+CONFIG_LEDS_GPIO=y
+CONFIG_LEDS_TRIGGER_NETDEV=y
# CONFIG_LEMOTE_FULONG is not set
# CONFIG_MACH_ALCHEMY is not set
# CONFIG_MACH_DECSTATION is not set
#include <asm/irq.h>
#include <asm/io.h>
#include <ar531x.h>
+#include <linux/leds.h>
#define NO_PHY 0x1f
static int is_5312 = 0;
-static struct platform_device *ar5312_devs[5];
+static struct platform_device *ar5312_devs[6];
static struct resource ar5312_eth0_res[] = {
{
.resource = &ar5312_flash_resource,
};
+#ifdef CONFIG_LEDS_GPIO
+static struct gpio_led ar5312_leds[] = {
+ { .name = "wlan", .gpio = 0, .active_low = 1, },
+};
+
+static const struct gpio_led_platform_data ar5312_led_data = {
+ .num_leds = ARRAY_SIZE(ar5312_leds),
+ .leds = (void *) ar5312_leds,
+};
+
+static struct platform_device ar5312_gpio_leds = {
+ .name = "leds-gpio",
+ .id = -1,
+ .dev = {
+ .platform_data = (void *) &ar5312_led_data,
+ }
+};
+#endif
/*
* NB: This mapping size is larger than the actual flash size,
ar5312_devs[dev++] = &ar5312_physmap_flash;
+ ar5312_leds[0].gpio = bcfg->sysLedGpio;
+ ar5312_devs[dev++] = &ar5312_gpio_leds;
+
if (!memcmp(bcfg->enet0Mac, "\xff\xff\xff\xff\xff\xff", 6))
memcpy(bcfg->enet0Mac, bcfg->enet1Mac, 6);
#include <asm/irq.h>
#include <asm/io.h>
#include <ar531x.h>
+#include <linux/leds.h>
static int is_5315 = 0;
.num_resources = ARRAY_SIZE(ar5315_spiflash_res)
};
-static __initdata struct platform_device *ar5315_devs[4];
+#ifdef CONFIG_LEDS_GPIO
+static struct gpio_led ar5315_leds[] = {
+ { .name = "wlan", .gpio = 0, .active_low = 1, },
+};
+
+static const struct gpio_led_platform_data ar5315_led_data = {
+ .num_leds = ARRAY_SIZE(ar5315_leds),
+ .leds = (void *) ar5315_leds,
+};
+
+static struct platform_device ar5315_gpio_leds = {
+ .name = "leds-gpio",
+ .id = -1,
+ .dev = {
+ .platform_data = (void *) &ar5315_led_data,
+ }
+};
+#endif
+
+
+static __initdata struct platform_device *ar5315_devs[5];
ar5315_eth_data.board_config = board_config;
ar5315_eth_data.macaddr = bcfg->enet0Mac;
ar5315_wmac.dev.platform_data = config;
-
+
+ ar5315_leds[0].gpio = bcfg->sysLedGpio;
+
ar5315_devs[dev++] = &ar5315_eth;
ar5315_devs[dev++] = &ar5315_wmac;
ar5315_devs[dev++] = &ar5315_spiflash;
-
+ ar5315_devs[dev++] = &ar5315_gpio_leds;
return platform_add_devices(ar5315_devs, dev);
}