Lines Matching +full:vdddig +full:- +full:supply
1 // SPDX-License-Identifier: GPL-2.0-only
43 if (!ctx->pdata->gpio_enable_delay_ms) in pwrseq_qcom_wcn_ensure_gpio_delay()
46 diff_jiffies = jiffies - ctx->last_gpio_enable_jf; in pwrseq_qcom_wcn_ensure_gpio_delay()
49 if (diff_msecs < ctx->pdata->gpio_enable_delay_ms) in pwrseq_qcom_wcn_ensure_gpio_delay()
50 msleep(ctx->pdata->gpio_enable_delay_ms - diff_msecs); in pwrseq_qcom_wcn_ensure_gpio_delay()
57 return regulator_bulk_enable(ctx->pdata->num_vregs, ctx->regs); in pwrseq_qcom_wcn_vregs_enable()
64 return regulator_bulk_disable(ctx->pdata->num_vregs, ctx->regs); in pwrseq_qcom_wcn_vregs_disable()
68 .name = "regulators-enable",
77 return clk_prepare_enable(ctx->clk); in pwrseq_qcom_wcn_clk_enable()
84 clk_disable_unprepare(ctx->clk); in pwrseq_qcom_wcn_clk_disable()
90 .name = "clock-enable",
106 gpiod_set_value_cansleep(ctx->bt_gpio, 1); in pwrseq_qcom_wcn_bt_enable()
107 ctx->last_gpio_enable_jf = jiffies; in pwrseq_qcom_wcn_bt_enable()
116 gpiod_set_value_cansleep(ctx->bt_gpio, 0); in pwrseq_qcom_wcn_bt_disable()
122 .name = "bluetooth-enable",
133 gpiod_set_value_cansleep(ctx->wlan_gpio, 1); in pwrseq_qcom_wcn_wlan_enable()
134 ctx->last_gpio_enable_jf = jiffies; in pwrseq_qcom_wcn_wlan_enable()
143 gpiod_set_value_cansleep(ctx->wlan_gpio, 0); in pwrseq_qcom_wcn_wlan_disable()
149 .name = "wlan-enable",
159 if (ctx->pdata->pwup_delay_ms) in pwrseq_qcom_wcn_pwup_delay()
160 msleep(ctx->pdata->pwup_delay_ms); in pwrseq_qcom_wcn_pwup_delay()
213 "vdddig",
228 struct device_node *dev_node = dev->of_node; in pwrseq_qcom_wcn_match()
233 * 'vddaon-supply' property and whether it leads us to the right in pwrseq_qcom_wcn_match()
236 if (!of_property_present(dev_node, "vddaon-supply")) in pwrseq_qcom_wcn_match()
240 of_parse_phandle(dev_node, "vddaon-supply", 0); in pwrseq_qcom_wcn_match()
249 if (!reg_node->parent || !reg_node->parent->parent || in pwrseq_qcom_wcn_match()
250 reg_node->parent->parent != ctx->of_node) in pwrseq_qcom_wcn_match()
258 struct device *dev = &pdev->dev; in pwrseq_qcom_wcn_probe()
265 return -ENOMEM; in pwrseq_qcom_wcn_probe()
267 ctx->of_node = dev->of_node; in pwrseq_qcom_wcn_probe()
269 ctx->pdata = of_device_get_match_data(dev); in pwrseq_qcom_wcn_probe()
270 if (!ctx->pdata) in pwrseq_qcom_wcn_probe()
271 return dev_err_probe(dev, -ENODEV, in pwrseq_qcom_wcn_probe()
274 ctx->regs = devm_kcalloc(dev, ctx->pdata->num_vregs, in pwrseq_qcom_wcn_probe()
275 sizeof(*ctx->regs), GFP_KERNEL); in pwrseq_qcom_wcn_probe()
276 if (!ctx->regs) in pwrseq_qcom_wcn_probe()
277 return -ENOMEM; in pwrseq_qcom_wcn_probe()
279 for (i = 0; i < ctx->pdata->num_vregs; i++) in pwrseq_qcom_wcn_probe()
280 ctx->regs[i].supply = ctx->pdata->vregs[i]; in pwrseq_qcom_wcn_probe()
282 ret = devm_regulator_bulk_get(dev, ctx->pdata->num_vregs, ctx->regs); in pwrseq_qcom_wcn_probe()
287 ctx->bt_gpio = devm_gpiod_get_optional(dev, "bt-enable", GPIOD_OUT_LOW); in pwrseq_qcom_wcn_probe()
288 if (IS_ERR(ctx->bt_gpio)) in pwrseq_qcom_wcn_probe()
289 return dev_err_probe(dev, PTR_ERR(ctx->bt_gpio), in pwrseq_qcom_wcn_probe()
292 ctx->wlan_gpio = devm_gpiod_get_optional(dev, "wlan-enable", in pwrseq_qcom_wcn_probe()
294 if (IS_ERR(ctx->wlan_gpio)) in pwrseq_qcom_wcn_probe()
295 return dev_err_probe(dev, PTR_ERR(ctx->wlan_gpio), in pwrseq_qcom_wcn_probe()
302 gpiod_direction_output(ctx->wlan_gpio, in pwrseq_qcom_wcn_probe()
303 gpiod_get_value_cansleep(ctx->wlan_gpio)); in pwrseq_qcom_wcn_probe()
305 ctx->clk = devm_clk_get_optional(dev, NULL); in pwrseq_qcom_wcn_probe()
306 if (IS_ERR(ctx->clk)) in pwrseq_qcom_wcn_probe()
307 return dev_err_probe(dev, PTR_ERR(ctx->clk), in pwrseq_qcom_wcn_probe()
318 ctx->pwrseq = devm_pwrseq_device_register(dev, &config); in pwrseq_qcom_wcn_probe()
319 if (IS_ERR(ctx->pwrseq)) in pwrseq_qcom_wcn_probe()
320 return dev_err_probe(dev, PTR_ERR(ctx->pwrseq), in pwrseq_qcom_wcn_probe()
328 .compatible = "qcom,qca6390-pmu",
332 .compatible = "qcom,wcn6855-pmu",
336 .compatible = "qcom,wcn7850-pmu",
345 .name = "pwrseq-qcom_wcn",