The old and removed platform code had support for assigning a value for
the LED pin for when the default is not correct. Effectively a fix for a
non working LED.
Added led-active-high to set the LED to active high.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
---
drivers/net/wireless/ath/ath9k/init.c | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/drivers/net/wireless/ath/ath9k/init.c b/drivers/net/wireless/ath/ath9k/init.c
index c911b178dcc2..28dc6c0e27aa 100644
--- a/drivers/net/wireless/ath/ath9k/init.c
+++ b/drivers/net/wireless/ath/ath9k/init.c
@@ -662,6 +662,17 @@ static int ath9k_of_init(struct ath_softc *sc)
if (ret == -EPROBE_DEFER)
return ret;
+ np = of_get_child_by_name(np, "led");
+ if (np) {
+ u32 led_pin;
+
+ if (!of_property_read_u32(np, "reg", &led_pin))
+ ah->led_pin = led_pin;
+
+ ah->config.led_active_high = of_property_read_bool(np, "led-active-high");
+ of_node_put(np);
+ }
+
return 0;
}
--
2.50.1