net: cnss: remove 3.3v PMIC gpio enable feature
PMIC gpio used for the 3.3v power supply to wlan has been converted to rome_vreg fixed regulator. This Fixed regulator shared by both WLAN and BT. Remove PMIC gpio enable dead code from CNSS SDIO platform driver. CRs-Fixed: 945575 Change-Id: Ifbb17e05969da25ec9a87844b4409e26f07fca69 Signed-off-by: Sarada Prasanna Garnayak <sgarna@codeaurora.org>
This commit is contained in:
parent
13d7f53b31
commit
f8beb5f99e
1 changed files with 0 additions and 55 deletions
|
@ -16,8 +16,6 @@
|
|||
#include <linux/of.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/regulator/consumer.h>
|
||||
#include <linux/of_gpio.h>
|
||||
#include <linux/gpio.h>
|
||||
#include <linux/delay.h>
|
||||
#include <linux/err.h>
|
||||
#include <linux/slab.h>
|
||||
|
@ -45,11 +43,6 @@ struct cnss_dfs_nol_info {
|
|||
u16 dfs_nol_info_len;
|
||||
};
|
||||
|
||||
struct cnss_sdio_wlan_gpio_info {
|
||||
u32 num;
|
||||
u32 flags;
|
||||
};
|
||||
|
||||
struct cnss_sdio_regulator {
|
||||
struct regulator *wlan_io;
|
||||
struct regulator *wlan_xtal;
|
||||
|
@ -60,7 +53,6 @@ struct cnss_sdio_regulator {
|
|||
static struct cnss_sdio_data {
|
||||
struct cnss_sdio_regulator regulator;
|
||||
struct platform_device *pdev;
|
||||
struct cnss_sdio_wlan_gpio_info pmic_gpio;
|
||||
struct cnss_dfs_nol_info dfs_info;
|
||||
struct cnss_unsafe_channel_list unsafe_list;
|
||||
} *cnss_pdata;
|
||||
|
@ -161,36 +153,6 @@ int cnss_wlan_get_dfs_nol(void *info, u16 info_len)
|
|||
}
|
||||
EXPORT_SYMBOL(cnss_wlan_get_dfs_nol);
|
||||
|
||||
static int cnss_sdio_configure_gpio(void)
|
||||
{
|
||||
int error;
|
||||
struct device *dev = &cnss_pdata->pdev->dev;
|
||||
|
||||
if (gpio_is_valid(cnss_pdata->pmic_gpio.num)) {
|
||||
error = gpio_request(
|
||||
cnss_pdata->pmic_gpio.num, "wlan_pmic_gpio");
|
||||
if (error) {
|
||||
dev_err(dev, "PMIC gpio request failed\n");
|
||||
return error;
|
||||
}
|
||||
|
||||
error = gpio_direction_output(cnss_pdata->pmic_gpio.num, 0);
|
||||
if (error) {
|
||||
dev_err(dev, "PMIC gpio set direction failed\n");
|
||||
goto err_pmic_gpio;
|
||||
} else {
|
||||
gpio_set_value_cansleep(cnss_pdata->pmic_gpio.num, 1);
|
||||
msleep(POWER_ON_DELAY);
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
err_pmic_gpio:
|
||||
gpio_free(cnss_pdata->pmic_gpio.num);
|
||||
return error;
|
||||
}
|
||||
|
||||
static int cnss_sdio_configure_wlan_enable_regulator(void)
|
||||
{
|
||||
int error;
|
||||
|
@ -327,10 +289,6 @@ err_vdd_io_regulator:
|
|||
|
||||
static void cnss_sdio_release_resource(void)
|
||||
{
|
||||
if (gpio_is_valid(cnss_pdata->pmic_gpio.num)) {
|
||||
gpio_set_value_cansleep(cnss_pdata->pmic_gpio.num, 0);
|
||||
gpio_free(cnss_pdata->pmic_gpio.num);
|
||||
}
|
||||
if (cnss_pdata->regulator.wlan_xtal)
|
||||
regulator_put(cnss_pdata->regulator.wlan_xtal);
|
||||
if (cnss_pdata->regulator.wlan_vreg)
|
||||
|
@ -364,17 +322,6 @@ static int cnss_sdio_probe(struct platform_device *pdev)
|
|||
return error;
|
||||
}
|
||||
|
||||
cnss_pdata->pmic_gpio.num = of_get_named_gpio_flags(pdev->dev.of_node,
|
||||
"cnss_sdio,wlan-pmic-gpio", 0, &cnss_pdata->pmic_gpio.flags);
|
||||
if (cnss_pdata->pmic_gpio.num) {
|
||||
error = cnss_sdio_configure_gpio();
|
||||
if (error) {
|
||||
dev_err(&pdev->dev,
|
||||
"Failed to enable wlan enable gpio\n");
|
||||
goto err_wlan_enable_gpio;
|
||||
}
|
||||
}
|
||||
|
||||
if (of_get_property(
|
||||
cnss_pdata->pdev->dev.of_node,
|
||||
WLAN_VREG_NAME "-supply", NULL)) {
|
||||
|
@ -403,8 +350,6 @@ static int cnss_sdio_probe(struct platform_device *pdev)
|
|||
err_wlan_dsrc_enable_regulator:
|
||||
regulator_put(cnss_pdata->regulator.wlan_vreg_dsrc);
|
||||
err_wlan_enable_regulator:
|
||||
regulator_put(cnss_pdata->regulator.wlan_vreg);
|
||||
err_wlan_enable_gpio:
|
||||
regulator_put(cnss_pdata->regulator.wlan_xtal);
|
||||
regulator_put(cnss_pdata->regulator.wlan_io);
|
||||
return error;
|
||||
|
|
Loading…
Add table
Reference in a new issue