aboutsummaryrefslogtreecommitdiffstats
path: root/package/kernel/mac80211
diff options
context:
space:
mode:
authorMathias Kresin <dev@kresin.me>2017-03-22 08:04:16 +0100
committerMathias Kresin <dev@kresin.me>2017-04-08 14:30:00 +0200
commitb06559e5b76adfbafb16965098994cd30e8ded9c (patch)
tree349abd71314241bc6eac30e1d3f9fb29fcbbde19 /package/kernel/mac80211
parent20b45df7ebcd18802d56f51893d40af43b687cb3 (diff)
downloadupstream-b06559e5b76adfbafb16965098994cd30e8ded9c.tar.gz
upstream-b06559e5b76adfbafb16965098994cd30e8ded9c.tar.bz2
upstream-b06559e5b76adfbafb16965098994cd30e8ded9c.zip
ath9k: ignore led_pin if ath9k GPIO controller is used with DT
Don't setup the default led pin if the ath9k GPIO controller is used via device tree to prevent collision. In case any of the pins exposed by the ath9k is used, the phyNtpt trigger needs to be set in userspace. Signed-off-by: Mathias Kresin <dev@kresin.me>
Diffstat (limited to 'package/kernel/mac80211')
-rw-r--r--package/kernel/mac80211/patches/548-ath9k_enable_gpio_chip.patch10
-rw-r--r--package/kernel/mac80211/patches/549-ath9k_enable_gpio_buttons.patch4
2 files changed, 8 insertions, 6 deletions
diff --git a/package/kernel/mac80211/patches/548-ath9k_enable_gpio_chip.patch b/package/kernel/mac80211/patches/548-ath9k_enable_gpio_chip.patch
index 10047a7cfd..86917eb6ee 100644
--- a/package/kernel/mac80211/patches/548-ath9k_enable_gpio_chip.patch
+++ b/package/kernel/mac80211/patches/548-ath9k_enable_gpio_chip.patch
@@ -221,21 +221,23 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
char led_name[32];
const char *trigger;
int i;
-@@ -156,6 +291,13 @@ void ath_init_leds(struct ath_softc *sc)
+@@ -156,6 +291,15 @@ void ath_init_leds(struct ath_softc *sc)
if (AR_SREV_9100(sc->sc_ah))
return;
+ if (!np)
+ ath9k_register_gpio_chip(sc);
+
-+ /* setup gpio controller only if requested */
-+ if (of_property_read_bool(np, "gpio-controller"))
++ /* setup gpio controller only if requested and skip the led_pin setup */
++ if (of_property_read_bool(np, "gpio-controller")) {
+ ath9k_register_gpio_chip(sc);
++ return;
++ }
+
ath_fill_led_pin(sc);
if (pdata && pdata->leds && pdata->num_leds)
-@@ -183,6 +325,7 @@ void ath_init_leds(struct ath_softc *sc)
+@@ -183,6 +327,7 @@ void ath_init_leds(struct ath_softc *sc)
ath_create_gpio_led(sc, sc->sc_ah->led_pin, led_name, trigger,
!sc->sc_ah->config.led_active_high);
}
diff --git a/package/kernel/mac80211/patches/549-ath9k_enable_gpio_buttons.patch b/package/kernel/mac80211/patches/549-ath9k_enable_gpio_buttons.patch
index 1d1efe5384..4e165dde99 100644
--- a/package/kernel/mac80211/patches/549-ath9k_enable_gpio_buttons.patch
+++ b/package/kernel/mac80211/patches/549-ath9k_enable_gpio_buttons.patch
@@ -117,8 +117,8 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
while (!list_empty(&sc->leds)) {
led = list_first_entry(&sc->leds, struct ath_led, list);
#ifdef CONFIG_GPIOLIB
-@@ -299,6 +368,7 @@ void ath_init_leds(struct ath_softc *sc)
- ath9k_register_gpio_chip(sc);
+@@ -301,6 +370,7 @@ void ath_init_leds(struct ath_softc *sc)
+ }
ath_fill_led_pin(sc);
+ ath9k_init_buttons(sc);