@@ -22,6 +22,7 @@ struct pwrseq_qcom_wcn_pdata {
size_t num_vregs;
unsigned int pwup_delay_ms;
unsigned int gpio_enable_delay_ms;
+ bool no_bt_gpio;
};
struct pwrseq_qcom_wcn_ctx {
@@ -212,6 +213,11 @@ static const struct pwrseq_qcom_wcn_pdata pwrseq_wcn7850_of_data = {
.vregs = pwrseq_wcn7850_vregs,
.num_vregs = ARRAY_SIZE(pwrseq_wcn7850_vregs),
.pwup_delay_ms = 50,
+ /*
+ * FIXME: Remove it once the entire hci_qca driver is converted to
+ * using the power sequencer.
+ */
+ .no_bt_gpio = true,
};
static int pwrseq_qcom_wcn_match(struct pwrseq_device *pwrseq,
@@ -277,10 +283,13 @@ static int pwrseq_qcom_wcn_probe(struct platform_device *pdev)
return dev_err_probe(dev, ret,
"Failed to get all regulators\n");
- ctx->bt_gpio = devm_gpiod_get_optional(dev, "bt-enable", GPIOD_OUT_LOW);
- if (IS_ERR(ctx->bt_gpio))
- return dev_err_probe(dev, PTR_ERR(ctx->bt_gpio),
- "Failed to get the Bluetooth enable GPIO\n");
+ if (!ctx->pdata->no_bt_gpio) {
+ ctx->bt_gpio = devm_gpiod_get_optional(dev, "bt-enable",
+ GPIOD_OUT_LOW);
+ if (IS_ERR(ctx->bt_gpio))
+ return dev_err_probe(dev, PTR_ERR(ctx->bt_gpio),
+ "Failed to get the Bluetooth enable GPIO\n");
+ }
ctx->wlan_gpio = devm_gpiod_get_optional(dev, "wlan-enable",
GPIOD_OUT_LOW);