[LEDE-DEV] [PATCH] ar71xx: set status led for the gl-* boards

Wojciech Jowsa w.jowsa at radytek.com
Tue Feb 28 05:45:07 PST 2017


Hi,

Spaces have been there from the first commit but I have fixed that in
the latest patch.
Hope, this is the last one :)

On Mon, Feb 27, 2017 at 11:32 AM, John Crispin <john at phrozen.org> wrote:
>
>
> On 15/02/2017 16:33, Wojciech Jowsa wrote:
>> This sets status_led for the  gl-ar300m and gl-mifi boards, and fixes led names
>> so that they follow correct naming scheme.
>>
>>
>> Signed-off-by: Wojciech Jowsa <w.jowsa at radytek.com>
>
> Hi,
>
> thanks for changing the leds globally, however when you sent this patch
> it got whitespace mangled and tabs were replaced with spaces. could you
> try and resend it without mangling whitespaces please ?
>
>         John
>
>> ---
>>  target/linux/ar71xx/base-files/etc/board.d/01_leds  | 21 ++++++++++-----------
>>  target/linux/ar71xx/base-files/etc/diag.sh          |  4 +++-
>>  .../ar71xx/files/arch/mips/ath79/mach-gl-ar300m.c   |  8 ++++----
>>  .../ar71xx/files/arch/mips/ath79/mach-gl-mifi.c     | 10 +++++-----
>>  4 files changed, 22 insertions(+), 21 deletions(-)
>>
>> diff --git a/target/linux/ar71xx/base-files/etc/board.d/01_leds
>> b/target/linux/ar71xx/base-files/etc/board.d/01_leds
>> index 131b63e..f5c6043 100755
>> --- a/target/linux/ar71xx/base-files/etc/board.d/01_leds
>> +++ b/target/linux/ar71xx/base-files/etc/board.d/01_leds
>> @@ -312,19 +312,18 @@ dlan-pro-1200-ac)
>>   ucidef_set_led_gpio "plcw" "dLAN" "devolo:status:dlan" "17" "0"
>>   ucidef_set_led_gpio "plcr" "dLAN" "devolo:error:dlan" "16" "0"
>>   ;;
>> -gl-ar150|\
>> -gl-ar300|\
>> -gl-ar300m|\
>> +gl-ar300m)
>> + ucidef_set_led_wlan "wlan" "WLAN" "$board:red:wlan" "phy0tpt"
>> + ;;
>>  gl-mifi)
>> + ucidef_set_led_wlan "wlan" "WLAN" "$board:green:wlan" "phy0tpt"
>> + ucidef_set_led_netdev "wan" "WAN" "$board:green:wan" "eth0"
>> + ucidef_set_led_netdev "lan" "LAN" "$board:green:lan" "eth1"
>> + ucidef_set_led_netdev "3gnet" "3GNET" "$board:green:net" "wwan0"
>> + ;;
>> +gl-ar150|\
>> +gl-ar300)
>>   ucidef_set_led_wlan "wlan" "WLAN" "$board:wlan" "phy0tpt"
>> -
>> - case "$board" in
>> - gl-mifi)
>> - ucidef_set_led_netdev "wan" "WAN" "$board:wan" "eth0"
>> - ucidef_set_led_netdev "lan" "LAN" "$board:lan" "eth1"
>> - ucidef_set_led_netdev "3gnet" "3GNET" "$board:net" "wwan0"
>> - ;;
>> - esac
>>   ;;
>>  gl-domino|\
>>  sc300m|\
>> diff --git a/target/linux/ar71xx/base-files/etc/diag.sh
>> b/target/linux/ar71xx/base-files/etc/diag.sh
>> index ae6c693..ed9bf3a 100644
>> --- a/target/linux/ar71xx/base-files/etc/diag.sh
>> +++ b/target/linux/ar71xx/base-files/etc/diag.sh
>> @@ -60,7 +60,9 @@ get_status_led() {
>>   ap90q|\
>>   cpe830|\
>>   cpe870|\
>> - gl-inet)
>> + gl-inet|\
>> + gl-mifi|\
>> + gl-ar300m)
>>   status_led="$board:green:lan"
>>   ;;
>>   ap96)
>> diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-gl-ar300m.c
>> b/target/linux/ar71xx/files/arch/mips/ath79/mach-gl-ar300m.c
>> index 62906a1..5b7f958 100644
>> --- a/target/linux/ar71xx/files/arch/mips/ath79/mach-gl-ar300m.c
>> +++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-gl-ar300m.c
>> @@ -47,23 +47,23 @@
>>
>>  static struct gpio_led gl_ar300m_leds_gpio[] __initdata = {
>>      {
>> -        .name = "gl-ar300m:usb",
>> +        .name = "gl-ar300m:green:usb",
>>          .gpio = GL_AR300M_GPIO_LED_USB,
>>          .active_low = 0,
>>          .default_state = 1,
>>      },
>>      {
>> -        .name = "gl-ar300m:wlan",
>> +        .name = "gl-ar300m:red:wlan",
>>          .gpio = GL_AR300M_GPIO_LED_WLAN,
>>          .active_low = 1,
>>      },
>>      {
>> -        .name = "gl-ar300m:lan",
>> +        .name = "gl-ar300m:green:lan",
>>          .gpio = GL_AR300M_GPIO_LED_LAN,
>>          .active_low = 1,
>>      },
>>      {
>> -        .name = "gl-ar300m:system",
>> +        .name = "gl-ar300m:green:system",
>>          .gpio = GL_AR300M_GPIO_LED_SYSTEM,
>>          .active_low = 1,
>>          .default_state = 1,
>> diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-gl-mifi.c
>> b/target/linux/ar71xx/files/arch/mips/ath79/mach-gl-mifi.c
>> index 42f4415..14365b7 100644
>> --- a/target/linux/ar71xx/files/arch/mips/ath79/mach-gl-mifi.c
>> +++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-gl-mifi.c
>> @@ -41,27 +41,27 @@
>>
>>  static struct gpio_led gl_mifi_leds_gpio[] __initdata = {
>>   {
>> - .name = "gl-mifi:wan",
>> + .name = "gl-mifi:green:wan",
>>   .gpio = GL_MIFI_GPIO_LED_WAN,
>>   .active_low = 0,
>>   },
>>   {
>> - .name = "gl-mifi:lan",
>> + .name = "gl-mifi:green:lan",
>>   .gpio = GL_MIFI_GPIO_LED_LAN,
>>   .active_low = 0,
>>   },
>>   {
>> - .name = "gl-mifi:wlan",
>> + .name = "gl-mifi:green:wlan",
>>   .gpio = GL_MIFI_GPIO_LED_WLAN,
>>   .active_low = 0,
>>   },
>>   {
>> - .name = "gl-mifi:net",
>> + .name = "gl-mifi:green:net",
>>   .gpio = GL_MIFI_GPIO_LED_NET,
>>   .active_low = 0,
>>   },
>>   {
>> - .name = "gl-mifi:3gcontrol",
>> + .name = "gl-mifi:green:3gcontrol",
>>   .gpio = GL_MIFI_GPIO_LED_3GCONTROL,
>>   .active_low = 0,
>>   }
>>



-- 
Wojciech



More information about the Lede-dev mailing list