Creating a new directory entry and files - how?

Hya,

i have an AC51-U and have the follwing directories.

How do i create blue:wifi5g

root@breslau:/sys/devices/platform/leds/leds# ls -l
drwxr-xr-x    2 root     root             0 Dec 31  1969 blue:power
drwxr-xr-x    3 root     root             0 Dec 31  1969 blue:usb
drwxr-xr-x    2 root     root             0 Dec 31  1969 blue:wifi2g
root@breslau:/sys/devices/platform/leds/leds# 

Thx

Hi @pw44

quick search in git for ac51u
https://git.openwrt.org/?p=openwrt%2Fopenwrt.git&a=search&h=HEAD&st=commit&s=ac51u

will show first support commit
https://git.openwrt.org/?p=openwrt/openwrt.git;a=commit;h=5f932988c3b65af14bd6e48a05cc2204b7aeb419

inside this commit is DTS

  12         gpio-leds {
  13                 compatible = "gpio-leds";
  14 
  15                 power {
  16                         label = "rt-ac51u:blue:power";
  17                         gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
  18                 };
  19 
  20                 usb {
  21                         label = "rt-ac51u:blue:usb";
  22                         gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
  23                 };
  24 
  25                 wifi {
  26                         label = "rt-ac51u:blue:wifi";
  27                         gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
  28                 };

as you see, only these leds are supported

in other commit, led wifi is changed name to wifi2g
https://git.openwrt.org/?p=openwrt/openwrt.git;a=blobdiff;f=target/linux/ramips/dts/mt7620a_asus_rt-ac51u.dts;h=1dd0e5cfe0006b4c3d2aae68c1c8b2cdfbe1d55b;hp=4c98c85dee3a8454672d478fd05a618bbf0a4fb2;hb=a1f0fd8cba4d9233b76542fbf54be01e2cc9d5c0;hpb=0b34a36da92dd1f60722555afa90142aff884432

but there is no wifi5g led
looks like it is not supported by HW

1 Like

hi @pw44

ok, my mistake in wording
it is not supported by HW gpio pins
looks like LED is connected directly to 5GHz wifi chip
so, there is no way to control it by software

1 Like