I want to manually switch the USB power from the shell.
The WDR4900 has several leds:
leds {
compatible = "gpio-leds";
system_green: system {
gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
label = "tp-link:blue:system";
};
usb1 {
gpios = <&gpio0 3 GPIO_ACTIVE_LOW>;
label = "tp-link:green:usb1";
};
usb2 {
gpios = <&gpio0 4 GPIO_ACTIVE_LOW>;
label = "tp-link:green:usb2";
};
usbpower {
gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
label = "tp-link:usb:power";
};
};
I can manually toggle most leds (tp-link:green:usb1, 2) by writing to /sys/class/leds.../brightness, but the USB power won't change.
Adding a trigger in the led configuration does work, but I don't want that, I need to be able to turn it off/on on demand using a script.
Any ideas?
Might it be "hijacked" by the Kernel USB module?