ath9k: Allow configuration of LED polarity in platform data.
authorMartin Blumenstingl <martin.blumenstingl@googlemail.com>
Thu, 23 Jun 2016 14:57:09 +0000 (16:57 +0200)
committerKalle Valo <kvalo@qca.qualcomm.com>
Fri, 8 Jul 2016 14:01:14 +0000 (17:01 +0300)
Some devices running OpenWrt need this and it makes sense to add this
to ath9k_platform_data as the next patches will add a devicetree
(boolean) property for it as well.

Suggested-by: Vittorio Gambaletta <openwrt@vittgam.net>
Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
drivers/net/wireless/ath/ath9k/init.c
include/linux/ath9k_platform.h

index 2ee8624755f7f767bb859d8aa1300330dc092bfd..384929d7169656233de2fec7ba8d7cabb917d9d1 100644 (file)
@@ -527,6 +527,9 @@ static int ath9k_init_soc_platform(struct ath_softc *sc)
                        return ret;
        }
 
+       if (pdata->led_active_high)
+               ah->config.led_active_high = true;
+
        if (pdata->tx_gain_buffalo)
                ah->config.tx_gain_buffalo = true;
 
index e66153d60bd50e8d502d58d44fac4099bb00c689..76860a461ed28177d66125bef38c59cad3d05019 100644 (file)
@@ -40,6 +40,7 @@ struct ath9k_platform_data {
        bool tx_gain_buffalo;
        bool disable_2ghz;
        bool disable_5ghz;
+       bool led_active_high;
 
        int (*get_mac_revision)(void);
        int (*external_reset)(void);