Skip to content

Commit 921ad28

Browse files
Bartosz GolaszewskiVudentz
authored andcommitted
Bluetooth: hci_qca: use the power sequencer for wcn7850 and wcn6855
In preparation for using the power sequencing subsystem on sm8650 boards and X13s laptop let's make pwrseq the default for wcn7850 and wcn6855. Both these models require an enable GPIO so we can safely assume that if the property is not there, then we should try to get the power sequencer. Due to how the pwrseq lookup works - checking the provider at run-time - we cannot really do it the other way around as we'd get stuck forever on -EPROBE_DEFER. If the relevant OF node does have the 'enable-gpios' property, we fallback to the existing code for backward compatibility with older DTs. Signed-off-by: Bartosz Golaszewski <[email protected]> Signed-off-by: Luiz Augusto von Dentz <[email protected]>
1 parent eba1718 commit 921ad28

File tree

1 file changed

+17
-2
lines changed

1 file changed

+17
-2
lines changed

drivers/bluetooth/hci_qca.c

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2354,13 +2354,28 @@ static int qca_serdev_probe(struct serdev_device *serdev)
23542354
}
23552355

23562356
switch (qcadev->btsoc_type) {
2357+
case QCA_WCN6855:
2358+
case QCA_WCN7850:
2359+
if (!device_property_present(&serdev->dev, "enable-gpios")) {
2360+
/*
2361+
* Backward compatibility with old DT sources. If the
2362+
* node doesn't have the 'enable-gpios' property then
2363+
* let's use the power sequencer. Otherwise, let's
2364+
* drive everything outselves.
2365+
*/
2366+
qcadev->bt_power->pwrseq = devm_pwrseq_get(&serdev->dev,
2367+
"bluetooth");
2368+
if (IS_ERR(qcadev->bt_power->pwrseq))
2369+
return PTR_ERR(qcadev->bt_power->pwrseq);
2370+
2371+
break;
2372+
}
2373+
fallthrough;
23572374
case QCA_WCN3988:
23582375
case QCA_WCN3990:
23592376
case QCA_WCN3991:
23602377
case QCA_WCN3998:
23612378
case QCA_WCN6750:
2362-
case QCA_WCN6855:
2363-
case QCA_WCN7850:
23642379
qcadev->bt_power->dev = &serdev->dev;
23652380
err = qca_init_regulators(qcadev->bt_power, data->vregs,
23662381
data->num_vregs);

0 commit comments

Comments
 (0)