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

Commit 2a0ec76d authored by Liuliu Zhao's avatar Liuliu Zhao
Browse files

bt-power: set gpio 47 to default low level



The gpio 47 port is used for BT enable and control, and it's
default high level will cause 10ma leakage when system sleeps
and BT is off. Set gpio value to 0 in bt-power driver to fix
the leakage issue.

CRs-Fixed: 2321652

Change-Id: I6e8cf0930a7a488ac454390fdc8f1c3c67197caf
Signed-off-by: default avatarLiuliu Zhao <liulzhao@codeaurora.org>
parent d18e6bf7
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -27,6 +27,7 @@
#include <linux/slab.h>
#include <linux/regulator/consumer.h>
#include <linux/clk.h>
#include <linux/of_device.h>

#if defined(CONFIG_CNSS)
#include <net/cnss.h>
@@ -614,6 +615,8 @@ static int bt_power_populate_dt_pinfo(struct platform_device *pdev)
static int bt_power_probe(struct platform_device *pdev)
{
	int ret = 0;
	const struct of_device_id *of_id =
		of_match_device(bt_power_match_table, &pdev->dev);

	dev_dbg(&pdev->dev, "%s\n", __func__);

@@ -654,6 +657,13 @@ static int bt_power_probe(struct platform_device *pdev)

	btpdev = pdev;

	if (of_id) {
		if (strcmp(of_id->compatible, "qca,qca6174") == 0) {
			bluetooth_toggle_radio(pdev->dev.platform_data, 0);
			bluetooth_toggle_radio(pdev->dev.platform_data, 1);
		}
	}

	return 0;

free_pdata: