Browse Source

cnss2: Explicitly enable/disable dev SOL interrupt during power on/off

Dev SOL GPIO will be pulled down (interrupt will be triggered then) by
design when WLAN_EN GPIO is pulled down. Hence enable/disable dev SOL
interrupt during power on/off to avoid handling such case.

Change-Id: Ia0ddcbd438d533832c944632443000e2a087a300
Yue Ma 3 years ago
parent
commit
1f16ed3cb1
1 changed files with 2 additions and 0 deletions
  1. 2 0
      cnss2/main.c

+ 2 - 0
cnss2/main.c

@@ -1232,6 +1232,7 @@ int cnss_enable_dev_sol_irq(struct cnss_plat_data *plat_priv)
 	if (sol_gpio->dev_sol_gpio < 0 || sol_gpio->dev_sol_irq <= 0)
 		return 0;
 
+	enable_irq(sol_gpio->dev_sol_irq);
 	ret = enable_irq_wake(sol_gpio->dev_sol_irq);
 	if (ret)
 		cnss_pr_err("Failed to enable device SOL as wake IRQ, err = %d\n",
@@ -1252,6 +1253,7 @@ int cnss_disable_dev_sol_irq(struct cnss_plat_data *plat_priv)
 	if (ret)
 		cnss_pr_err("Failed to disable device SOL as wake IRQ, err = %d\n",
 			    ret);
+	disable_irq(sol_gpio->dev_sol_irq);
 
 	return ret;
 }