Merge "cnss2: Disable L7E regulator & S2E regulator vote for Lahiana+HST"

This commit is contained in:
qctecmdr 2021-03-15 02:15:20 -07:00 • committed by Gerrit - the friendly Code Review server
commit dd16bdeab5
3 changed files with 27 additions and 0 deletions

View file

@ -565,4 +565,6 @@ int cnss_dev_specific_power_on(struct cnss_plat_data *plat_priv);
int cnss_request_firmware_direct(struct cnss_plat_data *plat_priv,
const struct firmware **fw_entry,
const char *filename);
void cnss_disable_redundant_vreg(struct cnss_plat_data *plat_priv);
#endif /* _CNSS_MAIN_H */

View file

@ -5729,6 +5729,10 @@ static int cnss_pci_probe(struct pci_dev *pci_dev,
ret = cnss_suspend_pci_link(pci_priv);
if (ret)
cnss_pr_err("Failed to suspend PCI link, err = %d\n", ret);
if (pci_dev->device == QCA6390_DEVICE_ID)
cnss_disable_redundant_vreg(plat_priv);
cnss_power_off_device(plat_priv);
return 0;

View file

@ -491,6 +491,27 @@ int cnss_vreg_unvote_type(struct cnss_plat_data *plat_priv,
return ret;
}
void cnss_disable_redundant_vreg(struct cnss_plat_data *plat_priv)
{
struct cnss_vreg_info *vreg, *vreg_tmp;
struct list_head *vreg_list = &plat_priv->vreg_list;
list_for_each_entry_safe(vreg, vreg_tmp, vreg_list, list) {
if (IS_ERR_OR_NULL(vreg->reg))
continue;
if ((!strcmp("wlan-ant-switch", vreg->cfg.name) ||
!strcmp("vdd-wlan-aon", vreg->cfg.name)) &&
vreg->enabled) {
cnss_pr_dbg("Disable Regulator %s\n", vreg->cfg.name);
list_del(&vreg->list);
cnss_vreg_off_single(vreg);
cnss_put_vreg_single(plat_priv, vreg);
}
}
}
static int cnss_get_clk_single(struct cnss_plat_data *plat_priv,
struct cnss_clk_info *clk_info)
{