mirror of
https://github.com/openwrt/openwrt.git
synced 2025-03-25 13:28:08 +00:00
The ar8216 switch driver supports exposing configuration of AR8327 and AR8337 switch LEDs to the userspace, however it is only configurable through platform data, causing the devices ported from ar71xx target to lack the support. Since there is still a long way to go until we can migrate the target to qca8k, an interim solution is needed. Extend ar8327_hw_config_of function to parse a "leds" subnode, which will populate the missing platform data based on device tree contents, and restore the existing support for the LEDs. Standard bindings apply, mapping "reg" property to LED index, with addition of "qca,led-mode" property, which selects HW (0) or SW (1) mode, defaulting to HW mode. Signed-off-by: Lech Perczak <lech.perczak@gmail.com> Link: https://github.com/openwrt/openwrt/pull/12487 Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>