aboutsummaryrefslogtreecommitdiff
path: root/drivers/power/sequencing/pwrseq-qcom-wcn.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/power/sequencing/pwrseq-qcom-wcn.c')
-rw-r--r--drivers/power/sequencing/pwrseq-qcom-wcn.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/drivers/power/sequencing/pwrseq-qcom-wcn.c b/drivers/power/sequencing/pwrseq-qcom-wcn.c
index d786cbf1b2cd..4fa129877d7e 100644
--- a/drivers/power/sequencing/pwrseq-qcom-wcn.c
+++ b/drivers/power/sequencing/pwrseq-qcom-wcn.c
@@ -198,6 +198,13 @@ static const struct pwrseq_qcom_wcn_pdata pwrseq_qca6390_of_data = {
.gpio_enable_delay_ms = 100,
};
+static const struct pwrseq_qcom_wcn_pdata pwrseq_wcn6855_of_data = {
+ .vregs = pwrseq_qca6390_vregs,
+ .num_vregs = ARRAY_SIZE(pwrseq_qca6390_vregs),
+ .pwup_delay_ms = 50,
+ .gpio_enable_delay_ms = 5,
+};
+
static const char *const pwrseq_wcn7850_vregs[] = {
"vdd",
"vddio",
@@ -288,6 +295,13 @@ static int pwrseq_qcom_wcn_probe(struct platform_device *pdev)
return dev_err_probe(dev, PTR_ERR(ctx->wlan_gpio),
"Failed to get the WLAN enable GPIO\n");
+ /*
+ * Set direction to output but keep the current value in order to not
+ * disable the WLAN module accidentally if it's already powered on.
+ */
+ gpiod_direction_output(ctx->wlan_gpio,
+ gpiod_get_value_cansleep(ctx->wlan_gpio));
+
ctx->clk = devm_clk_get_optional(dev, NULL);
if (IS_ERR(ctx->clk))
return dev_err_probe(dev, PTR_ERR(ctx->clk),
@@ -315,6 +329,10 @@ static const struct of_device_id pwrseq_qcom_wcn_of_match[] = {
.data = &pwrseq_qca6390_of_data,
},
{
+ .compatible = "qcom,wcn6855-pmu",
+ .data = &pwrseq_wcn6855_of_data,
+ },
+ {
.compatible = "qcom,wcn7850-pmu",
.data = &pwrseq_wcn7850_of_data,
},