mirror of
git://projects.qi-hardware.com/openwrt-xburst.git
synced 2025-02-09 08:01:57 +02:00
- bump atheros to .26
- adds leds-gpio to default selection on atheros - extend led platform setup on atheros git-svn-id: svn://svn.openwrt.org/openwrt/trunk@12100 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
parent
d6077810b4
commit
7fee7d1f22
@ -11,7 +11,7 @@ BOARD:=atheros
|
|||||||
BOARDNAME:=Atheros 231x/5312
|
BOARDNAME:=Atheros 231x/5312
|
||||||
FEATURES:=squashfs jffs2
|
FEATURES:=squashfs jffs2
|
||||||
|
|
||||||
LINUX_VERSION:=2.6.23.17
|
LINUX_VERSION:=2.6.26
|
||||||
|
|
||||||
include $(INCLUDE_DIR)/target.mk
|
include $(INCLUDE_DIR)/target.mk
|
||||||
|
|
||||||
|
@ -251,3 +251,4 @@ CONFIG_VIDEO_V4L1=m
|
|||||||
CONFIG_VIDEO_V4L2=m
|
CONFIG_VIDEO_V4L2=m
|
||||||
CONFIG_VIDEO_V4L2_COMMON=m
|
CONFIG_VIDEO_V4L2_COMMON=m
|
||||||
CONFIG_ZONE_DMA_FLAG=0
|
CONFIG_ZONE_DMA_FLAG=0
|
||||||
|
CONFIG_LEDS_GPIO=y
|
||||||
|
@ -93,11 +93,9 @@ static struct platform_device ar5315_spiflash = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
#ifdef CONFIG_LEDS_GPIO
|
#ifdef CONFIG_LEDS_GPIO
|
||||||
static struct gpio_led ar5315_leds[] = {
|
static struct gpio_led ar5315_leds[8];
|
||||||
{ .name = "wlan", .gpio = 0, .active_low = 1, },
|
|
||||||
};
|
|
||||||
|
|
||||||
static const struct gpio_led_platform_data ar5315_led_data = {
|
static struct gpio_led_platform_data ar5315_led_data = {
|
||||||
.num_leds = ARRAY_SIZE(ar5315_leds),
|
.num_leds = ARRAY_SIZE(ar5315_leds),
|
||||||
.leds = (void *) ar5315_leds,
|
.leds = (void *) ar5315_leds,
|
||||||
};
|
};
|
||||||
@ -111,11 +109,8 @@ static struct platform_device ar5315_gpio_leds = {
|
|||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
static __initdata struct platform_device *ar5315_devs[5];
|
static __initdata struct platform_device *ar5315_devs[5];
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
static void *flash_regs;
|
static void *flash_regs;
|
||||||
|
|
||||||
static inline __u32 spiflash_regread32(int reg)
|
static inline __u32 spiflash_regread32(int reg)
|
||||||
@ -206,6 +201,10 @@ int __init ar5315_init_devices(void)
|
|||||||
struct ar531x_config *config;
|
struct ar531x_config *config;
|
||||||
struct ar531x_boarddata *bcfg;
|
struct ar531x_boarddata *bcfg;
|
||||||
int dev = 0;
|
int dev = 0;
|
||||||
|
#ifdef CONFIG_LEDS_GPIO
|
||||||
|
int i;
|
||||||
|
char *tmp;
|
||||||
|
#endif
|
||||||
|
|
||||||
if (!is_5315)
|
if (!is_5315)
|
||||||
return 0;
|
return 0;
|
||||||
@ -246,7 +245,31 @@ int __init ar5315_init_devices(void)
|
|||||||
ar5315_devs[dev++] = &ar5315_spiflash;
|
ar5315_devs[dev++] = &ar5315_spiflash;
|
||||||
|
|
||||||
#ifdef CONFIG_LEDS_GPIO
|
#ifdef CONFIG_LEDS_GPIO
|
||||||
ar5315_leds[0].gpio = bcfg->sysLedGpio;
|
ar5315_led_data.num_leds = 0;
|
||||||
|
for(i = 0; i < 8; i++)
|
||||||
|
{
|
||||||
|
if((i != AR5315_RESET_GPIO) && (i != bcfg->resetConfigGpio))
|
||||||
|
{
|
||||||
|
if(i == bcfg->sysLedGpio)
|
||||||
|
{
|
||||||
|
tmp = kstrdup("wlan", GFP_KERNEL);
|
||||||
|
} else {
|
||||||
|
tmp = kmalloc(6, GFP_KERNEL);
|
||||||
|
if(tmp)
|
||||||
|
sprintf((char*)tmp, "gpio%d", i);
|
||||||
|
}
|
||||||
|
if(tmp)
|
||||||
|
{
|
||||||
|
ar5315_leds[ar5315_led_data.num_leds].name = tmp;
|
||||||
|
ar5315_leds[ar5315_led_data.num_leds].gpio = i;
|
||||||
|
ar5315_leds[ar5315_led_data.num_leds].active_low = 0;
|
||||||
|
ar5315_led_data.num_leds++;
|
||||||
|
} else {
|
||||||
|
printk("failed to alloc led string\n");
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
ar5315_devs[dev++] = &ar5315_gpio_leds;
|
ar5315_devs[dev++] = &ar5315_gpio_leds;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user