[OpenWrt-Devel] [PATCH 3/3][ESR1750][V2] ar71xx: add support for EnGenius ESR1750

Jon Suphammer (林書詠) jon at suphammer.net
Fri Jul 11 04:09:33 EDT 2014


Hi Forest,

Vendors are not always consistent over time with what colour they use
for their LED's. Several factors could play in, like matching LED with
a tooling colour or just change of mind.
It would be more safe to bind the LED to specific device rather than vendor.

Best regards,
Jon


On Fri, Jul 11, 2014 at 6:46 AM, Forest Crossman <cyrozap at gmail.com> wrote:
>> diff --git a/target/linux/ar71xx/base-files/etc/diag.sh b/target/linux/ar71xx/base-files/etc/diag.sh
>> index ef172b4..144459b 100755
>> --- a/target/linux/ar71xx/base-files/etc/diag.sh
>> +++ b/target/linux/ar71xx/base-files/etc/diag.sh
>> @@ -69,6 +69,9 @@ get_status_led() {
>>         el-m150)
>>                 status_led="EasyLink:green:system"
>>                 ;;
>> +       esr1750)
>> +               status_led="esr1750:amber:power"
>> +               ;;
>>         hiwifi-hc6361)
>>                 status_led="hiwifi:blue:system"
>>                 ;;
>
>> +static struct gpio_led esr1750_leds_gpio[] __initdata = {
>> +       {
>> +               .name           = "esr1750:amber:power",
>> +               .gpio           = ESR1750_GPIO_LED_POWER_AMBER,
>> +               .active_low     = 1,
>> +       },
>> +       {
>> +               .name           = "esr1750:blue:wps",
>> +               .gpio           = ESR1750_GPIO_LED_WPS_BLUE,
>> +               .active_low     = 1,
>> +       },
>> +       {
>> +               .name           = "esr1750:amber:wps",
>> +               .gpio           = ESR1750_GPIO_LED_WPS_AMBER,
>> +               .active_low     = 1,
>> +       },
>> +       {
>> +               .name           = "esr1750:blue:wlan-2g",
>> +               .gpio           = ESR1750_GPIO_LED_WLAN_2G,
>> +               .active_low     = 1,
>> +       },
>> +       {
>> +               .name           = "esr1750:blue:wlan-5g",
>> +               .gpio           = ESR1750_GPIO_LED_WLAN_5G,
>> +               .active_low     = 1,
>> +       }
>> +};
>> +
>
> This isn't really specific to the ESR1750, but does anyone know if
> it's better to use "device:color:name" or "manufacturer:color:name"
> for the LEDs? For the ESR900, I made it "manufacturer:color:name" (ex.
> "engenius:amber:power") because they're the same for each of the
> saucer-shaped ESR routers and I saw some other routers with
> similarly-named LEDs. I tried searching the wiki to see if there was a
> standard convention to use, but I haven't had any luck finding one.
>
> --
> Forest Crossman



-- 
Best regards,
Jon
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel



More information about the openwrt-devel mailing list