summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/broadcom/brcm80211/brcmsmac/led.h
diff options
context:
space:
mode:
authorLinus Walleij <linus.walleij@linaro.org>2020-07-11 23:01:50 +0200
committerKalle Valo <kvalo@codeaurora.org>2020-07-14 12:51:22 +0300
commitb424808115cb0141da851082d84ede20caa2215c (patch)
tree899af743c2a6fbea305c2bd88a26af48f08427e1 /drivers/net/wireless/broadcom/brcm80211/brcmsmac/led.h
parent29e354ebeeecaee979e6fe22cd6272682d7552c9 (diff)
brcm80211: brcmsmac: Move LEDs to GPIO descriptors
The code in the BRCM80211 BRCMSMAC driver is using the legacy GPIO API to to a complex check of the validity of the base of the GPIO chip and whether it is present at all and then adding an offset to the base of the chip. Use the existing function to obtain a GPIO line internally from a GPIO chip so we can use the offset directly and modernize the code to use GPIO descriptors instead of integers from the global GPIO numberspace. Cc: Wright Feng <wright.feng@cypress.com> Cc: Frank Kao <frank.kao@cypress.com> Cc: Kalle Valo <kvalo@codeaurora.org> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Kalle Valo <kvalo@codeaurora.org> Link: https://lore.kernel.org/r/20200711210150.4943-1-linus.walleij@linaro.org
Diffstat (limited to 'drivers/net/wireless/broadcom/brcm80211/brcmsmac/led.h')
-rw-r--r--drivers/net/wireless/broadcom/brcm80211/brcmsmac/led.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmsmac/led.h b/drivers/net/wireless/broadcom/brcm80211/brcmsmac/led.h
index 17a0b1f5dbcf..d65f5c268fd7 100644
--- a/drivers/net/wireless/broadcom/brcm80211/brcmsmac/led.h
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmsmac/led.h
@@ -16,10 +16,12 @@
#ifndef _BRCM_LED_H_
#define _BRCM_LED_H_
+
+struct gpio_desc;
+
struct brcms_led {
char name[32];
- unsigned gpio;
- bool active_low;
+ struct gpio_desc *gpiod;
};
#ifdef CONFIG_BCMA_DRIVER_GPIO