mirror of
https://github.com/outbackdingo/mt76.git
synced 2026-10-24 13:26:48 +00:00
wifi: mt76: mt7921e: add LED control support
Introduce wifi LED switch control, add flow to Control a wifi gpio pin based on the status of WIFI radio, if the pin is connected to an LED, the LED will indicate the status of the WiFi radio. Signed-off-by: Hao Zhang <[email protected]> Co-developed-by: Quan Zhou <[email protected]> Signed-off-by: Quan Zhou <[email protected]> Acked-by: Lorenzo Bianconi <[email protected]> Signed-off-by: Felix Fietkau <[email protected]>
This commit is contained in:
+7
-1
@@ -427,6 +427,10 @@ static int mt7921_pci_suspend(struct device *device)
|
||||
wait_event_timeout(dev->wait,
|
||||
!dev->regd_in_progress, 5 * HZ);
|
||||
|
||||
err = mt7921_mcu_radio_led_ctrl(dev, EXT_CMD_RADIO_OFF_LED);
|
||||
if (err < 0)
|
||||
goto restore_suspend;
|
||||
|
||||
err = mt76_connac_mcu_set_hif_suspend(mdev, true);
|
||||
if (err)
|
||||
goto restore_suspend;
|
||||
@@ -525,9 +529,11 @@ static int mt7921_pci_resume(struct device *device)
|
||||
mt76_connac_mcu_set_deep_sleep(&dev->mt76, false);
|
||||
|
||||
err = mt76_connac_mcu_set_hif_suspend(mdev, false);
|
||||
if (err < 0)
|
||||
goto failed;
|
||||
|
||||
mt7921_regd_update(dev);
|
||||
|
||||
err = mt7921_mcu_radio_led_ctrl(dev, EXT_CMD_RADIO_ON_LED);
|
||||
failed:
|
||||
pm->suspended = false;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user