OSDN Git Service

wcnss: fix the wcnss power up sequence after ssr
authorSarada Prasanna Garnayak <sgarna@codeaurora.org>
Thu, 22 Mar 2018 15:22:40 +0000 (20:52 +0530)
committerGerrit - the friendly Code Review server <code-review@localhost>
Tue, 3 Apr 2018 11:35:28 +0000 (04:35 -0700)
Update the voltage regulator enable/disable status
during proxy vote and unvote request by wcnss wlan
module.

CRs-Fixed: 2211050
Change-Id: I334df98612b0915fe00d5390fbcd37c95e9f6509
Signed-off-by: Sarada Prasanna Garnayak <sgarna@codeaurora.org>
drivers/net/wireless/wcnss/wcnss_vreg.c
drivers/net/wireless/wcnss/wcnss_wlan.c
include/linux/wcnss_wlan.h

index d94bd90..28cf4b7 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2011-2015, 2017 The Linux Foundation. All rights reserved.
+/* Copyright (c) 2011-2015, 2018 The Linux Foundation. All rights reserved.
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 and
@@ -194,7 +194,7 @@ int validate_iris_chip_id(u32 reg)
        }
 }
 
-static void wcnss_free_regulator(void)
+void wcnss_free_regulator(void)
 {
        int vreg_i;
 
@@ -586,12 +586,6 @@ static void wcnss_vregs_off(struct vregs_info regulators[], uint size,
                                pr_err("vreg %s disable failed (%d)\n",
                                                regulators[i].name, rc);
                }
-
-               /* Free the regulator source */
-               if (regulators[i].state & VREG_GET_REGULATOR_MASK)
-                       regulator_put(regulators[i].regulator);
-
-               regulators[i].state = VREG_NULL_CONFIG;
        }
 }
 
index 04d6b2e..0aa7ba0 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2011-2017, The Linux Foundation. All rights reserved.
+/* Copyright (c) 2011-2018, The Linux Foundation. All rights reserved.
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 and
@@ -2163,7 +2163,7 @@ static void wcnssctrl_rx_handler(struct work_struct *worker)
                return;
        }
        if (len < sizeof(struct smd_msg_hdr)) {
-               pr_err("wcnss: incomplete header available len = %d\n", len);
+               pr_debug("wcnss: incomplete header available len = %d\n", len);
                return;
        }
 
@@ -3336,8 +3336,8 @@ static int wcnss_notif_cb(struct notifier_block *this, unsigned long code,
                return NOTIFY_DONE;
        }
 
-       pr_debug("%s: wcnss notification event: %lu : %s\n",
-                __func__, code, wcnss_subsys_notif_type[code]);
+       pr_info("%s: wcnss notification event: %lu : %s\n",
+               __func__, code, wcnss_subsys_notif_type[code]);
 
        if (code == SUBSYS_PROXY_VOTE) {
                if (pdev && pwlanconfig) {
@@ -3465,6 +3465,7 @@ wcnss_wlan_probe(struct platform_device *pdev)
 static int
 wcnss_wlan_remove(struct platform_device *pdev)
 {
+       wcnss_free_regulator();
        if (penv->wcnss_notif_hdle)
                subsys_notif_unregister_notifier(penv->wcnss_notif_hdle, &wnb);
        wcnss_remove_sysfs(&pdev->dev);
index bc83893..6cb6be7 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2011-2017, The Linux Foundation. All rights reserved.
+/* Copyright (c) 2011-2018, The Linux Foundation. All rights reserved.
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 and
@@ -130,6 +130,7 @@ int wcnss_is_hw_pronto_ver3(void);
 int wcnss_device_ready(void);
 bool wcnss_cbc_complete(void);
 int wcnss_device_is_shutdown(void);
+void wcnss_free_regulator(void);
 void wcnss_riva_dump_pmic_regs(void);
 int wcnss_xo_auto_detect_enabled(void);
 u32 wcnss_get_wlan_rx_buff_count(void);