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

Commit ad22df30 authored by Junlin Zhang's avatar Junlin Zhang
Browse files

bt-power: Check chip type first before BT resetting



As BT reset only is needed for qca6174 chip, so check chip
type first to avoid triggering get_bt_reset_gpio_value()
for other chip.

CRs-Fixed: 2514357
Change-Id: Icaaf7046aa02d3ae3ecb5bf565cc94c89f11fb71
Signed-off-by: default avatarJunlin Zhang <junlzhan@codeaurora.org>
parent 9799cdc2
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -676,8 +676,8 @@ static int bt_power_probe(struct platform_device *pdev)
	btpdev = pdev;

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