Lines Matching refs:dom
400 struct meson_ee_pwrc_domain *dom) in meson_ee_pwrc_init_domain() argument
404 dom->pwrc = pwrc; in meson_ee_pwrc_init_domain()
405 dom->num_rstc = dom->desc.reset_names_count; in meson_ee_pwrc_init_domain()
406 dom->num_clks = dom->desc.clk_names_count; in meson_ee_pwrc_init_domain()
408 if (dom->num_rstc) { in meson_ee_pwrc_init_domain()
411 if (count != dom->num_rstc) in meson_ee_pwrc_init_domain()
413 count, dom->desc.name); in meson_ee_pwrc_init_domain()
415 dom->rstc = devm_reset_control_array_get(&pdev->dev, false, in meson_ee_pwrc_init_domain()
417 if (IS_ERR(dom->rstc)) in meson_ee_pwrc_init_domain()
418 return PTR_ERR(dom->rstc); in meson_ee_pwrc_init_domain()
421 if (dom->num_clks) { in meson_ee_pwrc_init_domain()
422 int ret = devm_clk_bulk_get_all(&pdev->dev, &dom->clks); in meson_ee_pwrc_init_domain()
426 if (dom->num_clks != ret) { in meson_ee_pwrc_init_domain()
428 ret, dom->desc.name); in meson_ee_pwrc_init_domain()
429 dom->num_clks = ret; in meson_ee_pwrc_init_domain()
433 dom->base.name = dom->desc.name; in meson_ee_pwrc_init_domain()
434 dom->base.power_on = meson_ee_pwrc_on; in meson_ee_pwrc_init_domain()
435 dom->base.power_off = meson_ee_pwrc_off; in meson_ee_pwrc_init_domain()
448 if (dom->num_clks && dom->desc.get_power && !dom->desc.get_power(dom)) { in meson_ee_pwrc_init_domain()
449 ret = clk_bulk_prepare_enable(dom->num_clks, dom->clks); in meson_ee_pwrc_init_domain()
453 dom->base.flags = GENPD_FLAG_ALWAYS_ON; in meson_ee_pwrc_init_domain()
454 ret = pm_genpd_init(&dom->base, NULL, false); in meson_ee_pwrc_init_domain()
458 ret = pm_genpd_init(&dom->base, NULL, in meson_ee_pwrc_init_domain()
459 (dom->desc.get_power ? in meson_ee_pwrc_init_domain()
460 dom->desc.get_power(dom) : true)); in meson_ee_pwrc_init_domain()
517 struct meson_ee_pwrc_domain *dom = &pwrc->domains[i]; in meson_ee_pwrc_probe() local
519 memcpy(&dom->desc, &match->domains[i], sizeof(dom->desc)); in meson_ee_pwrc_probe()
521 ret = meson_ee_pwrc_init_domain(pdev, pwrc, dom); in meson_ee_pwrc_probe()
525 pwrc->xlate.domains[i] = &dom->base; in meson_ee_pwrc_probe()
537 struct meson_ee_pwrc_domain *dom = &pwrc->domains[i]; in meson_ee_pwrc_shutdown() local
539 if (dom->desc.get_power && !dom->desc.get_power(dom)) in meson_ee_pwrc_shutdown()
540 meson_ee_pwrc_off(&dom->base); in meson_ee_pwrc_shutdown()