Loading arch/arm/mach-msm/pil-pronto.c +1 −20 Original line number Diff line number Diff line /* Copyright (c) 2011-2013, The Linux Foundation. All rights reserved. /* Copyright (c) 2011-2014, 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 Loading Loading @@ -85,14 +85,11 @@ struct pronto_data { bool restart_inprogress; bool crash; struct ramdump_device *ramdump_dev; int xo_mode; }; static int pil_pronto_make_proxy_vote(struct pil_desc *pil) { struct pronto_data *drv = dev_get_drvdata(pil->dev); struct platform_device *pdev = wcnss_get_platform_device(); struct wcnss_wlan_config *pwlanconfig = wcnss_get_wlan_config(); int ret; ret = regulator_enable(drv->vreg); Loading @@ -105,13 +102,6 @@ static int pil_pronto_make_proxy_vote(struct pil_desc *pil) dev_err(pil->dev, "failed to enable cxo\n"); goto err_clk; } if (pdev && pwlanconfig) { ret = wcnss_wlan_power(&pdev->dev, pwlanconfig, WCNSS_WLAN_SWITCH_ON, &drv->xo_mode); wcnss_set_iris_xo_mode(drv->xo_mode); if (ret) pr_err("Failed to execute wcnss_wlan_power\n"); } return 0; err_clk: regulator_disable(drv->vreg); Loading @@ -122,18 +112,9 @@ err: static void pil_pronto_remove_proxy_vote(struct pil_desc *pil) { struct pronto_data *drv = dev_get_drvdata(pil->dev); struct platform_device *pdev = wcnss_get_platform_device(); struct wcnss_wlan_config *pwlanconfig = wcnss_get_wlan_config(); regulator_disable(drv->vreg); clk_disable_unprepare(drv->cxo); if (pdev && pwlanconfig) { /* Temporary workaround as pronto sends interrupt that * it is capable of voting for it's resources too early. */ msleep(20); wcnss_wlan_power(&pdev->dev, pwlanconfig, WCNSS_WLAN_SWITCH_OFF, NULL); } } static int pil_pronto_reset(struct pil_desc *pil) Loading drivers/net/wireless/wcnss/wcnss_wlan.c +24 −3 Original line number Diff line number Diff line /* Copyright (c) 2011-2013, The Linux Foundation. All rights reserved. /* Copyright (c) 2011-2014, 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 Loading Loading @@ -2371,9 +2371,31 @@ exit: static int wcnss_notif_cb(struct notifier_block *this, unsigned long code, void *ss_handle) { struct platform_device *pdev = wcnss_get_platform_device(); struct wcnss_wlan_config *pwlanconfig = wcnss_get_wlan_config(); int ret, xo_mode; pr_debug("%s: wcnss notification event: %lu\n", __func__, code); if (SUBSYS_POWERUP_FAILURE == code) if (code == SUBSYS_PROXY_VOTE) { if (pdev && pwlanconfig) { ret = wcnss_wlan_power(&pdev->dev, pwlanconfig, WCNSS_WLAN_SWITCH_ON, &xo_mode); wcnss_set_iris_xo_mode(xo_mode); if (ret) pr_err("Failed to execute wcnss_wlan_power\n"); } } else if (code == SUBSYS_PROXY_UNVOTE) { if (pdev && pwlanconfig) { /* Temporary workaround as some pronto images have an * issue of sending an interrupt that it is capable of * voting for it's resources too early. */ msleep(20); wcnss_wlan_power(&pdev->dev, pwlanconfig, WCNSS_WLAN_SWITCH_OFF, NULL); } } else if (code == SUBSYS_POWERUP_FAILURE) wcnss_pronto_log_debug_regs(); return NOTIFY_DONE; Loading @@ -2383,7 +2405,6 @@ static struct notifier_block wnb = { .notifier_call = wcnss_notif_cb, }; static const struct file_operations wcnss_node_fops = { .owner = THIS_MODULE, .open = wcnss_node_open, Loading Loading
arch/arm/mach-msm/pil-pronto.c +1 −20 Original line number Diff line number Diff line /* Copyright (c) 2011-2013, The Linux Foundation. All rights reserved. /* Copyright (c) 2011-2014, 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 Loading Loading @@ -85,14 +85,11 @@ struct pronto_data { bool restart_inprogress; bool crash; struct ramdump_device *ramdump_dev; int xo_mode; }; static int pil_pronto_make_proxy_vote(struct pil_desc *pil) { struct pronto_data *drv = dev_get_drvdata(pil->dev); struct platform_device *pdev = wcnss_get_platform_device(); struct wcnss_wlan_config *pwlanconfig = wcnss_get_wlan_config(); int ret; ret = regulator_enable(drv->vreg); Loading @@ -105,13 +102,6 @@ static int pil_pronto_make_proxy_vote(struct pil_desc *pil) dev_err(pil->dev, "failed to enable cxo\n"); goto err_clk; } if (pdev && pwlanconfig) { ret = wcnss_wlan_power(&pdev->dev, pwlanconfig, WCNSS_WLAN_SWITCH_ON, &drv->xo_mode); wcnss_set_iris_xo_mode(drv->xo_mode); if (ret) pr_err("Failed to execute wcnss_wlan_power\n"); } return 0; err_clk: regulator_disable(drv->vreg); Loading @@ -122,18 +112,9 @@ err: static void pil_pronto_remove_proxy_vote(struct pil_desc *pil) { struct pronto_data *drv = dev_get_drvdata(pil->dev); struct platform_device *pdev = wcnss_get_platform_device(); struct wcnss_wlan_config *pwlanconfig = wcnss_get_wlan_config(); regulator_disable(drv->vreg); clk_disable_unprepare(drv->cxo); if (pdev && pwlanconfig) { /* Temporary workaround as pronto sends interrupt that * it is capable of voting for it's resources too early. */ msleep(20); wcnss_wlan_power(&pdev->dev, pwlanconfig, WCNSS_WLAN_SWITCH_OFF, NULL); } } static int pil_pronto_reset(struct pil_desc *pil) Loading
drivers/net/wireless/wcnss/wcnss_wlan.c +24 −3 Original line number Diff line number Diff line /* Copyright (c) 2011-2013, The Linux Foundation. All rights reserved. /* Copyright (c) 2011-2014, 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 Loading Loading @@ -2371,9 +2371,31 @@ exit: static int wcnss_notif_cb(struct notifier_block *this, unsigned long code, void *ss_handle) { struct platform_device *pdev = wcnss_get_platform_device(); struct wcnss_wlan_config *pwlanconfig = wcnss_get_wlan_config(); int ret, xo_mode; pr_debug("%s: wcnss notification event: %lu\n", __func__, code); if (SUBSYS_POWERUP_FAILURE == code) if (code == SUBSYS_PROXY_VOTE) { if (pdev && pwlanconfig) { ret = wcnss_wlan_power(&pdev->dev, pwlanconfig, WCNSS_WLAN_SWITCH_ON, &xo_mode); wcnss_set_iris_xo_mode(xo_mode); if (ret) pr_err("Failed to execute wcnss_wlan_power\n"); } } else if (code == SUBSYS_PROXY_UNVOTE) { if (pdev && pwlanconfig) { /* Temporary workaround as some pronto images have an * issue of sending an interrupt that it is capable of * voting for it's resources too early. */ msleep(20); wcnss_wlan_power(&pdev->dev, pwlanconfig, WCNSS_WLAN_SWITCH_OFF, NULL); } } else if (code == SUBSYS_POWERUP_FAILURE) wcnss_pronto_log_debug_regs(); return NOTIFY_DONE; Loading @@ -2383,7 +2405,6 @@ static struct notifier_block wnb = { .notifier_call = wcnss_notif_cb, }; static const struct file_operations wcnss_node_fops = { .owner = THIS_MODULE, .open = wcnss_node_open, Loading