Commit f3660957 authored by Bartosz Golaszewski's avatar Bartosz Golaszewski Committed by Luiz Augusto von Dentz

Bluetooth: hci_qca: fix QCA6390 support on non-DT platforms

QCA6390 can albo be used on non-DT systems so we must not make the power
sequencing the only option. Check if the serdev device consumes an OF
node. If so: honor the new contract as per the DT bindings. If not: fall
back to the previous behavior by falling through to the existing
default label.

Fixes: 9a15ce68 ("Bluetooth: qca: use the power sequencer for QCA6390")
Reported-by: default avatarWren Turkal <wt@penguintechs.org>
Closes: https://lore.kernel.org/linux-bluetooth/27e6a6c5-fb63-4219-be0b-eefa2c116e06@penguintechs.org/Signed-off-by: default avatarBartosz Golaszewski <bartosz.golaszewski@linaro.org>
Reviewed-by: default avatarPaul Menzel <pmenzel@molgen.mpg.de>
Signed-off-by: default avatarLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
parent 541b8021
...@@ -2412,11 +2412,14 @@ static int qca_serdev_probe(struct serdev_device *serdev) ...@@ -2412,11 +2412,14 @@ static int qca_serdev_probe(struct serdev_device *serdev)
break; break;
case QCA_QCA6390: case QCA_QCA6390:
qcadev->bt_power->pwrseq = devm_pwrseq_get(&serdev->dev, if (dev_of_node(&serdev->dev)) {
"bluetooth"); qcadev->bt_power->pwrseq = devm_pwrseq_get(&serdev->dev,
if (IS_ERR(qcadev->bt_power->pwrseq)) "bluetooth");
return PTR_ERR(qcadev->bt_power->pwrseq); if (IS_ERR(qcadev->bt_power->pwrseq))
break; return PTR_ERR(qcadev->bt_power->pwrseq);
break;
}
fallthrough;
default: default:
qcadev->bt_en = devm_gpiod_get_optional(&serdev->dev, "enable", qcadev->bt_en = devm_gpiod_get_optional(&serdev->dev, "enable",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment