Loading Documentation/devicetree/bindings/wcnss/wcnss-wlan.txt +0 −1 Original line number Diff line number Diff line Loading @@ -64,7 +64,6 @@ Power manager related parameter for LDO configuration. to use for VBATT feature. - qcom,has-a2xb-split-reg: boolean flag to determine A2xb split timeout limit register is available or not. - qcom,vbatt-threshold: indicates update in vbatt threshold value. Example: Loading drivers/soc/qcom/wcnss/wcnss_wlan.c +7 −24 Original line number Diff line number Diff line /* Copyright (c) 2011-2019, 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 Loading Loading @@ -451,7 +451,6 @@ static struct { dev_t dev_ctrl, dev_node; struct class *node_class; struct cdev ctrl_dev, node_dev; bool update_vbatt_threshold; } *penv = NULL; static void *wcnss_ipc_log; Loading Loading @@ -1975,22 +1974,14 @@ static void wcnss_notify_vbat(enum qpnp_tm_state state, void *ctx) wcnss_log(DBG, "low voltage notification triggered\n"); penv->vbat_monitor_params.state_request = ADC_TM_HIGH_THR_ENABLE; if (penv->update_vbatt_threshold) penv->vbat_monitor_params.high_thr = WCNSS_VBATT_THRESHOLD_V1 + WCNSS_VBATT_GUARD; else penv->vbat_monitor_params.high_thr = WCNSS_VBATT_THRESHOLD + WCNSS_VBATT_GUARD; penv->vbat_monitor_params.high_thr = WCNSS_VBATT_THRESHOLD + WCNSS_VBATT_GUARD; penv->vbat_monitor_params.low_thr = 0; } else if (state == ADC_TM_HIGH_STATE) { penv->vbat_monitor_params.state_request = ADC_TM_LOW_THR_ENABLE; if (penv->update_vbatt_threshold) penv->vbat_monitor_params.low_thr = WCNSS_VBATT_THRESHOLD_V1 - WCNSS_VBATT_GUARD; else penv->vbat_monitor_params.low_thr = WCNSS_VBATT_THRESHOLD - WCNSS_VBATT_GUARD; penv->vbat_monitor_params.low_thr = WCNSS_VBATT_THRESHOLD - WCNSS_VBATT_GUARD; penv->vbat_monitor_params.high_thr = 0; wcnss_log(DBG, "high voltage notification triggered\n"); } else { Loading Loading @@ -2023,13 +2014,8 @@ static int wcnss_setup_vbat_monitoring(void) wcnss_log(ERR, "not setting up vbatt\n"); return rc; } if (penv->update_vbatt_threshold) { penv->vbat_monitor_params.low_thr = WCNSS_VBATT_THRESHOLD_V1; penv->vbat_monitor_params.high_thr = WCNSS_VBATT_THRESHOLD_V1; } else { penv->vbat_monitor_params.low_thr = WCNSS_VBATT_THRESHOLD; penv->vbat_monitor_params.high_thr = WCNSS_VBATT_THRESHOLD; } penv->vbat_monitor_params.state_request = ADC_TM_HIGH_LOW_THR_ENABLE; if (penv->is_vsys_adc_channel) Loading Loading @@ -2762,9 +2748,6 @@ wcnss_trigger_config(struct platform_device *pdev) struct device_node *node = (&pdev->dev)->of_node; int has_pronto_hw = of_property_read_bool(node, "qcom,has-pronto-hw"); penv->update_vbatt_threshold = of_property_read_bool(node, "qcom,vbatt-threshold"); is_pronto_vadc = of_property_read_bool(node, "qcom,is-pronto-vadc"); is_pronto_v3 = of_property_read_bool(node, "qcom,is-pronto-v3"); Loading include/linux/wcnss_wlan.h +1 −2 Original line number Diff line number Diff line /* Copyright (c) 2011-2019, 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 Loading Loading @@ -71,7 +71,6 @@ enum wcnss_log_type { }; #define WCNSS_VBATT_THRESHOLD 3500000 #define WCNSS_VBATT_THRESHOLD_V1 3600000 #define WCNSS_VBATT_GUARD 20000 #define WCNSS_VBATT_HIGH 3700000 #define WCNSS_VBATT_LOW 3300000 Loading Loading
Documentation/devicetree/bindings/wcnss/wcnss-wlan.txt +0 −1 Original line number Diff line number Diff line Loading @@ -64,7 +64,6 @@ Power manager related parameter for LDO configuration. to use for VBATT feature. - qcom,has-a2xb-split-reg: boolean flag to determine A2xb split timeout limit register is available or not. - qcom,vbatt-threshold: indicates update in vbatt threshold value. Example: Loading
drivers/soc/qcom/wcnss/wcnss_wlan.c +7 −24 Original line number Diff line number Diff line /* Copyright (c) 2011-2019, 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 Loading Loading @@ -451,7 +451,6 @@ static struct { dev_t dev_ctrl, dev_node; struct class *node_class; struct cdev ctrl_dev, node_dev; bool update_vbatt_threshold; } *penv = NULL; static void *wcnss_ipc_log; Loading Loading @@ -1975,22 +1974,14 @@ static void wcnss_notify_vbat(enum qpnp_tm_state state, void *ctx) wcnss_log(DBG, "low voltage notification triggered\n"); penv->vbat_monitor_params.state_request = ADC_TM_HIGH_THR_ENABLE; if (penv->update_vbatt_threshold) penv->vbat_monitor_params.high_thr = WCNSS_VBATT_THRESHOLD_V1 + WCNSS_VBATT_GUARD; else penv->vbat_monitor_params.high_thr = WCNSS_VBATT_THRESHOLD + WCNSS_VBATT_GUARD; penv->vbat_monitor_params.high_thr = WCNSS_VBATT_THRESHOLD + WCNSS_VBATT_GUARD; penv->vbat_monitor_params.low_thr = 0; } else if (state == ADC_TM_HIGH_STATE) { penv->vbat_monitor_params.state_request = ADC_TM_LOW_THR_ENABLE; if (penv->update_vbatt_threshold) penv->vbat_monitor_params.low_thr = WCNSS_VBATT_THRESHOLD_V1 - WCNSS_VBATT_GUARD; else penv->vbat_monitor_params.low_thr = WCNSS_VBATT_THRESHOLD - WCNSS_VBATT_GUARD; penv->vbat_monitor_params.low_thr = WCNSS_VBATT_THRESHOLD - WCNSS_VBATT_GUARD; penv->vbat_monitor_params.high_thr = 0; wcnss_log(DBG, "high voltage notification triggered\n"); } else { Loading Loading @@ -2023,13 +2014,8 @@ static int wcnss_setup_vbat_monitoring(void) wcnss_log(ERR, "not setting up vbatt\n"); return rc; } if (penv->update_vbatt_threshold) { penv->vbat_monitor_params.low_thr = WCNSS_VBATT_THRESHOLD_V1; penv->vbat_monitor_params.high_thr = WCNSS_VBATT_THRESHOLD_V1; } else { penv->vbat_monitor_params.low_thr = WCNSS_VBATT_THRESHOLD; penv->vbat_monitor_params.high_thr = WCNSS_VBATT_THRESHOLD; } penv->vbat_monitor_params.state_request = ADC_TM_HIGH_LOW_THR_ENABLE; if (penv->is_vsys_adc_channel) Loading Loading @@ -2762,9 +2748,6 @@ wcnss_trigger_config(struct platform_device *pdev) struct device_node *node = (&pdev->dev)->of_node; int has_pronto_hw = of_property_read_bool(node, "qcom,has-pronto-hw"); penv->update_vbatt_threshold = of_property_read_bool(node, "qcom,vbatt-threshold"); is_pronto_vadc = of_property_read_bool(node, "qcom,is-pronto-vadc"); is_pronto_v3 = of_property_read_bool(node, "qcom,is-pronto-v3"); Loading
include/linux/wcnss_wlan.h +1 −2 Original line number Diff line number Diff line /* Copyright (c) 2011-2019, 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 Loading Loading @@ -71,7 +71,6 @@ enum wcnss_log_type { }; #define WCNSS_VBATT_THRESHOLD 3500000 #define WCNSS_VBATT_THRESHOLD_V1 3600000 #define WCNSS_VBATT_GUARD 20000 #define WCNSS_VBATT_HIGH 3700000 #define WCNSS_VBATT_LOW 3300000 Loading