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

Commit c80ba91a authored by Umesh Vats's avatar Umesh Vats Committed by Gerrit - the friendly Code Review server
Browse files

bluetooth: Enable LDO for supporting ASD



Add enablement of LDO to support antenna switching
diversity feature.

Change-Id: I755e48d66f84e2f2f8b5ef7c0d16b1b794d73259
Signed-off-by: default avatarUmesh Vats <uvats@codeaurora.org>
parent 95ec895e
Loading
Loading
Loading
Loading
+15 −0
Original line number Diff line number Diff line
@@ -318,6 +318,13 @@ static int bluetooth_power(int on)
				goto vdd_rfa2_fail;
			}
		}
		if (bt_power_pdata->bt_vdd_asd) {
			rc = bt_configure_vreg(bt_power_pdata->bt_vdd_asd);
			if (rc < 0) {
				BT_PWR_ERR("bt_power vddasd config failed");
				goto vdd_asd_fail;
			}
		}
		if (bt_power_pdata->bt_chip_pwd) {
			rc = bt_configure_vreg(bt_power_pdata->bt_chip_pwd);
			if (rc < 0) {
@@ -354,6 +361,9 @@ static int bluetooth_power(int on)
		if (bt_power_pdata->bt_chip_pwd)
			bt_vreg_disable(bt_power_pdata->bt_chip_pwd);
chip_pwd_fail:
		if (bt_power_pdata->bt_vdd_asd)
			bt_vreg_disable(bt_power_pdata->bt_vdd_asd);
vdd_asd_fail:
		if (bt_power_pdata->bt_vdd_rfa2)
			bt_vreg_disable(bt_power_pdata->bt_vdd_rfa2);
vdd_rfa2_fail:
@@ -657,6 +667,11 @@ static int bt_power_populate_dt_pinfo(struct platform_device *pdev)
					"qca,bt-vdd-rfa2");
		if (rc < 0)
			BT_PWR_ERR("bt-vdd-rfa2 not provided in device tree");
		rc = bt_dt_parse_vreg_info(&pdev->dev,
					&bt_power_pdata->bt_vdd_asd,
					"qca,bt-vdd-asd");
		if (rc < 0)
			BT_PWR_ERR("bt-vdd-asd not provided in device tree");
		rc = bt_dt_parse_clk_info(&pdev->dev,
					&bt_power_pdata->bt_chip_clk);
		if (rc < 0)
+2 −0
Original line number Diff line number Diff line
@@ -69,6 +69,8 @@ struct bluetooth_power_platform_data {
	struct bt_power_vreg_data *bt_vdd_rfa1;
	/* VDD RFA2 digital voltage regulator */
	struct bt_power_vreg_data *bt_vdd_rfa2;
	/* VDD ASD digital voltage regulator */
	struct bt_power_vreg_data *bt_vdd_asd;
	/* Optional: chip power down gpio-regulator
	 * chip power down data is required when bluetooth module
	 * and other modules like wifi co-exist in a single chip and