Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b8fafd20 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "wcnss: Read Voltage and current for regulators from dtsi file"

parents f6df49f6 fa5cc5c9
Loading
Loading
Loading
Loading
+7 −4
Original line number Diff line number Diff line
@@ -31,18 +31,21 @@ Required properties:
- pinctrl-names : Names corresponding to the numbered pinctrl states
- clocks: from common clock binding: handle to xo and rf_clk clocks.
- clock-names: Names of all the clocks that are accessed by the subsystem
- qcom,vdd-voltage-level: This property represents (nominal, min, max) voltage
for iris and pronto regulators in milli-volts.
- qcom,vdd-current: This property represents current value for
iris and pronto regulators in micro-amps.

Optional properties:
- qcom,has-autodetect-xo: boolean flag to determine whether Iris XO auto detect
should be performed during boot up.
- qcom,wlan-rx-buff-count: WLAN RX buffer count is a configurable value,
using a smaller count for this buffer will reduce the memory usage.
- qcom,is-pronto-vt: boolean flag to determine the pronto hardware version
in use. subsequently Pronto and IRIS voltage regulator range is configured
according to the ponto HW version
- qcom,is-pronto-v3: boolean flag to determine the pronto hardware version
in use. subsequently correct workqueue will be used by DXE engine to push frames
in TX data path and correct voting to RPM will be decided for booting.
in TX data path.
- qcom,is-pronto-vadc: boolean flag to determine Battery voltage feature
support for pronto hardware.
- qcom,wcnss-pm : <Core rail LDO#, PA rail LDO#, XO settling time,
		   RPM power collapse enabled, standalone power collapse enabled>
	Power manager related parameter for LDO configuration.
+18 −1
Original line number Diff line number Diff line
@@ -477,6 +477,24 @@
		qcom,iris-vddpa-supply   = <&pm8916_l9>;
		qcom,iris-vdddig-supply  = <&pm8916_l5>;

		qcom,iris-vddxo-voltage-level = <1800000 0 1800000>;
		qcom,iris-vddrfa-voltage-level = <1300000 0 1300000>;
		qcom,iris-vddpa-voltage-level = <3300000 0 3300000>;
		qcom,iris-vdddig-voltage-level = <1800000 0 1800000>;

		qcom,vddmx-voltage-level = <7 0 7>;
		qcom,vddcx-voltage-level = <5 1 7>;
		qcom,vddpx-voltage-level = <1800000 0 1800000>;

		qcom,iris-vddxo-current = <10000>;
		qcom,iris-vddrfa-current = <100000>;
		qcom,iris-vddpa-current = <515000>;
		qcom,iris-vdddig-current = <10000>;

		qcom,pronto-vddmx-current = <0>;
		qcom,pronto-vddcx-current = <0>;
		qcom,pronto-vddpx-current = <0>;

		pinctrl-names = "wcnss_default", "wcnss_sleep",
						"wcnss_gpio_default";
		pinctrl-0 = <&wcnss_default>;
@@ -492,7 +510,6 @@
		clock-names = "xo", "rf_clk", "measure", "wcnss_debug";

		qcom,has-autodetect-xo;
		qcom,is-pronto-vt;
		qcom,has-pronto-hw;
		qcom,wcnss-adc_tm = <&pm8916_adc_tm>;
	};
+23 −1
Original line number Diff line number Diff line
@@ -955,6 +955,28 @@
		qcom,iris-vddpa-supply   = <&pm8950_l9>;
		qcom,iris-vdddig-supply  = <&pm8950_l5>;

		qcom,iris-vddxo-voltage-level = <1800000 0 1800000>;
		qcom,iris-vddrfa-voltage-level = <1300000 0 1300000>;
		qcom,iris-vddpa-voltage-level = <3300000 0 3300000>;
		qcom,iris-vdddig-voltage-level = <1800000 0 1800000>;

		qcom,vddmx-voltage-level = <RPM_SMD_REGULATOR_LEVEL_TURBO
					RPM_SMD_REGULATOR_LEVEL_NONE
					RPM_SMD_REGULATOR_LEVEL_TURBO>;
		qcom,vddcx-voltage-level = <RPM_SMD_REGULATOR_LEVEL_NOM
					RPM_SMD_REGULATOR_LEVEL_NONE
					RPM_SMD_REGULATOR_LEVEL_TURBO>;
		qcom,vddpx-voltage-level = <1800000 0 1800000>;

		qcom,iris-vddxo-current = <10000>;
		qcom,iris-vddrfa-current = <100000>;
		qcom,iris-vddpa-current = <515000>;
		qcom,iris-vdddig-current = <10000>;

		qcom,pronto-vddmx-current = <0>;
		qcom,pronto-vddcx-current = <0>;
		qcom,pronto-vddpx-current = <0>;

		pinctrl-names = "wcnss_default", "wcnss_sleep",
						"wcnss_gpio_default";
		pinctrl-0 = <&wcnss_default>;
@@ -972,7 +994,7 @@
		clock-names = "xo", "rf_clk", "measure", "wcnss_debug";

		qcom,has-autodetect-xo;
		qcom,is-pronto-v4;
		qcom,is-pronto-v3;
		qcom,has-pronto-hw;
		qcom,has-vsys-adc-channel;
		qcom,wcnss-adc_tm = <&pm8950_adc_tm>;
+38 −132
Original line number Diff line number Diff line
@@ -74,88 +74,24 @@ static int is_power_on;
struct vregs_info {
	const char * const name;
	int state;
	int nominal_min;
	int low_power_min;
	int max_voltage;
	const int uA_load;
	struct regulator *regulator;
};

/* IRIS regulators for Riva hardware */
static struct vregs_info iris_vregs_riva[] = {
	{"iris_vddxo",  VREG_NULL_CONFIG, 1800000, 0, 1800000, 10000,  NULL},
	{"iris_vddrfa", VREG_NULL_CONFIG, 1300000, 0, 1300000, 100000, NULL},
	{"iris_vddpa",  VREG_NULL_CONFIG, 2900000, 0, 3000000, 515000, NULL},
	{"iris_vdddig", VREG_NULL_CONFIG, 1200000, 0, 1225000, 10000,  NULL},
};

/* WCNSS regulators for Riva hardware */
static struct vregs_info riva_vregs[] = {
	/* Riva */
	{"riva_vddmx",  VREG_NULL_CONFIG, 1050000, 0, 1150000, 0,      NULL},
	{"riva_vddcx",  VREG_NULL_CONFIG, 1050000, 0, 1150000, 0,      NULL},
	{"riva_vddpx",  VREG_NULL_CONFIG, 1800000, 0, 1800000, 0,      NULL},
};

/* IRIS regulators for Pronto hardware */
static struct vregs_info iris_vregs_pronto[] = {
	{"qcom,iris-vddxo",  VREG_NULL_CONFIG, 1800000, 0,
		1800000, 10000,  NULL},
	{"qcom,iris-vddrfa", VREG_NULL_CONFIG, 1300000, 0,
		1300000, 100000, NULL},
	{"qcom,iris-vddpa",  VREG_NULL_CONFIG, 2900000, 0,
		3350000, 515000, NULL},
	{"qcom,iris-vdddig", VREG_NULL_CONFIG, 1225000, 0,
		1800000, 10000,  NULL},
	{"qcom,iris-vddxo",  VREG_NULL_CONFIG, NULL},
	{"qcom,iris-vddrfa", VREG_NULL_CONFIG, NULL},
	{"qcom,iris-vddpa",  VREG_NULL_CONFIG, NULL},
	{"qcom,iris-vdddig", VREG_NULL_CONFIG, NULL},
};

/* WCNSS regulators for Pronto hardware */
static struct vregs_info pronto_vregs[] = {
	{"qcom,pronto-vddmx",  VREG_NULL_CONFIG, 950000,  0,
		1150000, 0,    NULL},
	{"qcom,pronto-vddcx",  VREG_NULL_CONFIG, RPM_REGULATOR_CORNER_NORMAL,
		RPM_REGULATOR_CORNER_NONE, RPM_REGULATOR_CORNER_SUPER_TURBO,
		0,             NULL},
	{"qcom,pronto-vddpx",  VREG_NULL_CONFIG, 1800000, 0,
		1800000, 0,    NULL},
	{"qcom,pronto-vddmx",  VREG_NULL_CONFIG, NULL},
	{"qcom,pronto-vddcx",  VREG_NULL_CONFIG, NULL},
	{"qcom,pronto-vddpx",  VREG_NULL_CONFIG, NULL},
};

/* IRIS regulators for Pronto v2 hardware */
static struct vregs_info iris_vregs_pronto_v2[] = {
	{"qcom,iris-vddxo",  VREG_NULL_CONFIG, 1800000, 0,
		1800000, 10000,  NULL},
	{"qcom,iris-vddrfa", VREG_NULL_CONFIG, 1300000, 0,
		1300000, 100000, NULL},
	{"qcom,iris-vddpa",  VREG_NULL_CONFIG, 3300000, 0,
		3300000, 515000, NULL},
	{"qcom,iris-vdddig", VREG_NULL_CONFIG, 1800000, 0,
		1800000, 10000,  NULL},
};

/* WCNSS regulators for Pronto v2 hardware */
static struct vregs_info pronto_vregs_pronto_v2[] = {
	{"qcom,pronto-vddmx",  VREG_NULL_CONFIG, 1287500,  0,
		1287500, 0,    NULL},
	{"qcom,pronto-vddcx",  VREG_NULL_CONFIG, RPM_REGULATOR_CORNER_NORMAL,
		RPM_REGULATOR_CORNER_NONE, RPM_REGULATOR_CORNER_SUPER_TURBO,
		0,             NULL},
	{"qcom,pronto-vddpx",  VREG_NULL_CONFIG, 1800000, 0,
		1800000, 0,    NULL},
};

/* WCNSS regulators for Pronto v3 hardware */
static struct vregs_info pronto_vregs_pronto_v3[] = {
	{"qcom,pronto-vddmx",  VREG_NULL_CONFIG, RPM_REGULATOR_CORNER_NORMAL,
		RPM_REGULATOR_CORNER_NONE, RPM_REGULATOR_CORNER_SUPER_TURBO,
		0,             NULL},
	{"qcom,pronto-vddcx",  VREG_NULL_CONFIG, RPM_REGULATOR_CORNER_NORMAL,
		RPM_REGULATOR_CORNER_NONE, RPM_REGULATOR_CORNER_SUPER_TURBO,
		0,             NULL},
	{"qcom,pronto-vddpx",  VREG_NULL_CONFIG, 1800000, 0,
		1800000, 0,    NULL},
};


struct host_driver {
	char name[20];
	struct list_head list;
@@ -465,7 +401,8 @@ fail:
}

/* Helper routine to turn off all WCNSS & IRIS vregs */
static void wcnss_vregs_off(struct vregs_info regulators[], uint size)
static void wcnss_vregs_off(struct vregs_info regulators[], uint size,
			    struct vregs_level *voltage_level)
{
	int i, rc = 0;
	struct wcnss_wlan_config *cfg;
@@ -496,12 +433,13 @@ static void wcnss_vregs_off(struct vregs_info regulators[], uint size)
			if (cfg->vbatt < WCNSS_VBATT_THRESHOLD &&
			    !memcmp(regulators[i].name,
				VDD_PA, sizeof(VDD_PA))) {
				regulators[i].max_voltage = WCNSS_VBATT_LOW;
				voltage_level[i].max_voltage = WCNSS_VBATT_LOW;
			}

			rc = regulator_set_voltage(regulators[i].regulator,
					regulators[i].low_power_min,
					regulators[i].max_voltage);
						voltage_level[i].low_power_min,
						voltage_level[i].max_voltage);

			if (rc)
				pr_err("regulator_set_voltage(%s) failed (%d)\n",
						regulators[i].name, rc);
@@ -525,7 +463,8 @@ static void wcnss_vregs_off(struct vregs_info regulators[], uint size)

/* Common helper routine to turn on all WCNSS & IRIS vregs */
static int wcnss_vregs_on(struct device *dev,
		struct vregs_info regulators[], uint size)
		struct vregs_info regulators[], uint size,
		struct vregs_level *voltage_level)
{
	int i, rc = 0, reg_cnt;
	struct wcnss_wlan_config *cfg;
@@ -549,19 +488,22 @@ static int wcnss_vregs_on(struct device *dev,
		}
		regulators[i].state |= VREG_GET_REGULATOR_MASK;
		reg_cnt = regulator_count_voltages(regulators[i].regulator);

		/* Set voltage to nominal. Exclude swtiches e.g. LVS */
		if ((regulators[i].nominal_min || regulators[i].max_voltage)
				&& (reg_cnt > 0)) {
		if ((voltage_level[i].nominal_min ||
		     voltage_level[i].max_voltage) && (reg_cnt > 0)) {
			if (cfg->vbatt < WCNSS_VBATT_THRESHOLD &&
			    !memcmp(regulators[i].name,
				VDD_PA, sizeof(VDD_PA))) {
				regulators[i].nominal_min = WCNSS_VBATT_INITIAL;
				regulators[i].max_voltage = WCNSS_VBATT_LOW;
				voltage_level[i].nominal_min =
					WCNSS_VBATT_INITIAL;
				voltage_level[i].max_voltage = WCNSS_VBATT_LOW;
			}

			rc = regulator_set_voltage(regulators[i].regulator,
					regulators[i].nominal_min,
					regulators[i].max_voltage);
					voltage_level[i].nominal_min,
					voltage_level[i].max_voltage);

			if (rc) {
				pr_err("regulator_set_voltage(%s) failed (%d)\n",
						regulators[i].name, rc);
@@ -571,9 +513,9 @@ static int wcnss_vregs_on(struct device *dev,
		}

		/* Vote for PWM/PFM mode if needed */
		if (regulators[i].uA_load && (reg_cnt > 0)) {
		if (voltage_level[i].uA_load && (reg_cnt > 0)) {
			rc = regulator_set_optimum_mode(regulators[i].regulator,
					regulators[i].uA_load);
					voltage_level[i].uA_load);
			if (rc < 0) {
				pr_err("regulator_set_optimum_mode(%s) failed (%d)\n",
						regulators[i].name, rc);
@@ -595,7 +537,7 @@ static int wcnss_vregs_on(struct device *dev,
	return rc;

fail:
	wcnss_vregs_off(regulators, size);
	wcnss_vregs_off(regulators, size, voltage_level);
	return rc;

}
@@ -604,17 +546,10 @@ static void wcnss_iris_vregs_off(enum wcnss_hw_type hw_type,
					struct wcnss_wlan_config *cfg)
{
	switch (hw_type) {
	case WCNSS_RIVA_HW:
		wcnss_vregs_off(iris_vregs_riva, ARRAY_SIZE(iris_vregs_riva));
		break;
	case WCNSS_PRONTO_HW:
		if (cfg->is_pronto_vt || cfg->is_pronto_v3) {
			wcnss_vregs_off(iris_vregs_pronto_v2,
				ARRAY_SIZE(iris_vregs_pronto_v2));
		} else {
		wcnss_vregs_off(iris_vregs_pronto,
				ARRAY_SIZE(iris_vregs_pronto));
		}
				ARRAY_SIZE(iris_vregs_pronto),
				cfg->iris_vlevel);
		break;
	default:
		pr_err("%s invalid hardware %d\n", __func__, hw_type);
@@ -629,18 +564,10 @@ static int wcnss_iris_vregs_on(struct device *dev,
	int ret = -1;

	switch (hw_type) {
	case WCNSS_RIVA_HW:
		ret = wcnss_vregs_on(dev, iris_vregs_riva,
				ARRAY_SIZE(iris_vregs_riva));
		break;
	case WCNSS_PRONTO_HW:
		if (cfg->is_pronto_vt || cfg->is_pronto_v3) {
			ret = wcnss_vregs_on(dev, iris_vregs_pronto_v2,
					ARRAY_SIZE(iris_vregs_pronto_v2));
		} else {
		ret = wcnss_vregs_on(dev, iris_vregs_pronto,
					ARRAY_SIZE(iris_vregs_pronto));
		}
				     ARRAY_SIZE(iris_vregs_pronto),
				     cfg->iris_vlevel);
		break;
	default:
		pr_err("%s invalid hardware %d\n", __func__, hw_type);
@@ -652,20 +579,9 @@ static void wcnss_core_vregs_off(enum wcnss_hw_type hw_type,
					struct wcnss_wlan_config *cfg)
{
	switch (hw_type) {
	case WCNSS_RIVA_HW:
		wcnss_vregs_off(riva_vregs, ARRAY_SIZE(riva_vregs));
		break;
	case WCNSS_PRONTO_HW:
		if (cfg->is_pronto_vt) {
			wcnss_vregs_off(pronto_vregs_pronto_v2,
				ARRAY_SIZE(pronto_vregs_pronto_v2));
		} else if (cfg->is_pronto_v3) {
			wcnss_vregs_off(pronto_vregs_pronto_v3,
				ARRAY_SIZE(pronto_vregs_pronto_v3));
		} else {
		wcnss_vregs_off(pronto_vregs,
				ARRAY_SIZE(pronto_vregs));
		}
				ARRAY_SIZE(pronto_vregs), cfg->pronto_vlevel);
		break;
	default:
		pr_err("%s invalid hardware %d\n", __func__, hw_type);
@@ -680,20 +596,10 @@ static int wcnss_core_vregs_on(struct device *dev,
	int ret = -1;

	switch (hw_type) {
	case WCNSS_RIVA_HW:
		ret = wcnss_vregs_on(dev, riva_vregs, ARRAY_SIZE(riva_vregs));
		break;
	case WCNSS_PRONTO_HW:
		if (cfg->is_pronto_vt) {
			ret = wcnss_vregs_on(dev, pronto_vregs_pronto_v2,
					ARRAY_SIZE(pronto_vregs_pronto_v2));
		} else if (cfg->is_pronto_v3) {
			ret = wcnss_vregs_on(dev, pronto_vregs_pronto_v3,
					ARRAY_SIZE(pronto_vregs_pronto_v3));
		} else {
		ret = wcnss_vregs_on(dev, pronto_vregs,
					ARRAY_SIZE(pronto_vregs));
		}
				     ARRAY_SIZE(pronto_vregs),
				     cfg->pronto_vlevel);
		break;
	default:
		pr_err("%s invalid hardware %d\n", __func__, hw_type);
+127 −11
Original line number Diff line number Diff line
@@ -1276,7 +1276,7 @@ static void wcnss_smd_notify_event(void *data, unsigned int event)
		schedule_work(&penv->wcnss_pm_config_work);
		cancel_delayed_work(&penv->wcnss_pm_qos_del_req);
		schedule_delayed_work(&penv->wcnss_pm_qos_del_req, 0);
		if (penv->wlan_config.is_pronto_v3 && (penv->vadc_dev))
		if (penv->wlan_config.is_pronto_vadc && (penv->vadc_dev))
			schedule_work(&penv->wcnss_vadc_work);
		break;

@@ -1542,8 +1542,10 @@ EXPORT_SYMBOL(wcnss_get_wlan_config);

int wcnss_is_hw_pronto_ver3(void)
{
	if (penv && penv->pdev)
	if (penv && penv->pdev) {
		if (penv->wlan_config.is_pronto_v3)
			return penv->wlan_config.is_pronto_v3;
	}
	return 0;
}
EXPORT_SYMBOL(wcnss_is_hw_pronto_ver3);
@@ -2696,32 +2698,143 @@ static struct miscdevice wcnss_usr_ctrl = {
	.fops = &wcnss_ctrl_fops,
};

static int
wcnss_dt_parse_vreg_level(struct device *dev, int index,
			  const char *current_vreg_name, const char *vreg_name,
			  struct vregs_level *vlevel)
{
	int ret = 0;
	/* array used to store nominal, low and high voltage values
	 */
	u32 voltage_levels[3], current_vreg;

	ret = of_property_read_u32_array(dev->of_node, vreg_name,
					 voltage_levels,
					 ARRAY_SIZE(voltage_levels));
	if (ret) {
		dev_err(dev, "error reading %s property\n", vreg_name);
		return ret;
	}

	vlevel[index].nominal_min = voltage_levels[0];
	vlevel[index].low_power_min = voltage_levels[1];
	vlevel[index].max_voltage = voltage_levels[2];

	ret = of_property_read_u32(dev->of_node, current_vreg_name,
				   &current_vreg);
	if (ret) {
		dev_err(dev, "error reading %s property\n", current_vreg_name);
		return ret;
	}

	vlevel[index].uA_load = current_vreg;

	return ret;
}

static int
wcnss_trigger_config(struct platform_device *pdev)
{
	int ret;
	int rc;
	int rc, index = 0;
	struct qcom_wcnss_opts *pdata;
	struct resource *res;
	int is_pronto_vt;
	int is_pronto_vadc;
	int is_pronto_v3;
	int pil_retry = 0;
	int has_pronto_hw = of_property_read_bool(pdev->dev.of_node,
							"qcom,has-pronto-hw");

	is_pronto_vt = of_property_read_bool(pdev->dev.of_node,
							"qcom,is-pronto-vt");
	is_pronto_vadc = of_property_read_bool(pdev->dev.of_node,
					       "qcom,is-pronto-vadc");

	is_pronto_v3 = of_property_read_bool(pdev->dev.of_node,
							"qcom,is-pronto-v3");

	penv->is_vsys_adc_channel = of_property_read_bool(pdev->dev.of_node,
						"qcom,has-vsys-adc-channel");
	if (of_property_read_u32(pdev->dev.of_node,
			"qcom,wlan-rx-buff-count", &penv->wlan_rx_buff_count)) {
		penv->wlan_rx_buff_count = WCNSS_DEF_WLAN_RX_BUFF_COUNT;
	}

	ret = wcnss_dt_parse_vreg_level(&pdev->dev, index,
					"qcom,pronto-vddmx-current",
					"qcom,vddmx-voltage-level",
					penv->wlan_config.pronto_vlevel);

	if (ret) {
		dev_err(&pdev->dev, "error reading voltage-level property\n");
		goto fail;
	}

	index++;
	ret = wcnss_dt_parse_vreg_level(&pdev->dev, index,
					"qcom,pronto-vddcx-current",
					"qcom,vddcx-voltage-level",
					penv->wlan_config.pronto_vlevel);

	if (ret) {
		dev_err(&pdev->dev, "error reading voltage-level property\n");
		goto fail;
	}

	index++;
	ret = wcnss_dt_parse_vreg_level(&pdev->dev, index,
					"qcom,pronto-vddpx-current",
					"qcom,vddpx-voltage-level",
					penv->wlan_config.pronto_vlevel);

	if (ret) {
		dev_err(&pdev->dev, "error reading voltage-level property\n");
		goto fail;
	}

	/* assign 0 to index now onwards, index variable re used to
	 * represent iris regulator index
	 */
	index = 0;
	ret = wcnss_dt_parse_vreg_level(&pdev->dev, index,
					"qcom,iris-vddxo-current",
					"qcom,iris-vddxo-voltage-level",
					penv->wlan_config.iris_vlevel);

	if (ret) {
		dev_err(&pdev->dev, "error reading voltage-level property\n");
		goto fail;
	}

	index++;
	ret = wcnss_dt_parse_vreg_level(&pdev->dev, index,
					"qcom,iris-vddrfa-current",
					"qcom,iris-vddrfa-voltage-level",
					penv->wlan_config.iris_vlevel);

	if (ret) {
		dev_err(&pdev->dev, "error reading voltage-level property\n");
		goto fail;
	}

	index++;
	ret = wcnss_dt_parse_vreg_level(&pdev->dev, index,
					"qcom,iris-vddpa-current",
					"qcom,iris-vddpa-voltage-level",
					penv->wlan_config.iris_vlevel);

	if (ret) {
		dev_err(&pdev->dev, "error reading voltage-level property\n");
		goto fail;
	}

	index++;
	ret = wcnss_dt_parse_vreg_level(&pdev->dev, index,
					"qcom,iris-vdddig-current",
					"qcom,iris-vdddig-voltage-level",
					penv->wlan_config.iris_vlevel);

	if (ret) {
		dev_err(&pdev->dev, "error reading voltage-level property\n");
		goto fail;
	}

	/* make sure we are only triggered once */
	if (penv->triggered)
		return 0;
@@ -2739,7 +2852,7 @@ wcnss_trigger_config(struct platform_device *pdev)
	}
	penv->wcnss_hw_type = (has_pronto_hw) ? WCNSS_PRONTO_HW : WCNSS_RIVA_HW;
	penv->wlan_config.use_48mhz_xo = has_48mhz_xo;
	penv->wlan_config.is_pronto_vt = is_pronto_vt;
	penv->wlan_config.is_pronto_vadc = is_pronto_vadc;
	penv->wlan_config.is_pronto_v3 = is_pronto_v3;

	if (WCNSS_CONFIG_UNSPECIFIED == has_autodetect_xo && has_pronto_hw) {
@@ -3035,7 +3148,7 @@ wcnss_trigger_config(struct platform_device *pdev)
		penv->fw_vbatt_state = WCNSS_CONFIG_UNSPECIFIED;
	}

	if (penv->wlan_config.is_pronto_v3) {
	if (penv->wlan_config.is_pronto_vadc) {
		penv->vadc_dev = qpnp_get_vadc(&penv->pdev->dev, "wcnss");

		if (IS_ERR(penv->vadc_dev)) {
@@ -3090,6 +3203,9 @@ fail_res:
		wcnss_pronto_gpios_config(pdev, false);
fail_gpio_res:
	wcnss_disable_pc_remove_req();
fail:
	if (penv->wcnss_notif_hdle)
		subsys_notif_unregister_notifier(penv->wcnss_notif_hdle, &wnb);
	penv = NULL;
	return ret;
}
Loading