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: Junlin Zhang <junlzhan@codeaurora.org>
This commit is contained in:
Junlin Zhang 2019-08-23 16:01:24 +08:00
parent 9799cdc216
commit ad22df30ed
1 changed files with 2 additions and 2 deletions

View File

@ -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);
}