Lines Matching refs:pd

75 	struct zynqmp_pm_domain *pd;  in zynqmp_gpd_power_on()  local
77 pd = container_of(domain, struct zynqmp_pm_domain, gpd); in zynqmp_gpd_power_on()
78 ret = zynqmp_pm_set_requirement(pd->node_id, in zynqmp_gpd_power_on()
84 __func__, domain->name, pd->node_id, ret); in zynqmp_gpd_power_on()
105 struct zynqmp_pm_domain *pd; in zynqmp_gpd_power_off() local
109 pd = container_of(domain, struct zynqmp_pm_domain, gpd); in zynqmp_gpd_power_off()
112 if (!(pd->flags & ZYNQMP_PM_DOMAIN_REQUESTED)) { in zynqmp_gpd_power_off()
129 ret = zynqmp_pm_set_requirement(pd->node_id, capabilities, 0, in zynqmp_gpd_power_off()
137 __func__, domain->name, pd->node_id, ret); in zynqmp_gpd_power_off()
156 struct zynqmp_pm_domain *pd; in zynqmp_gpd_attach_dev() local
158 pd = container_of(domain, struct zynqmp_pm_domain, gpd); in zynqmp_gpd_attach_dev()
164 ret = zynqmp_pm_request_node(pd->node_id, 0, 0, in zynqmp_gpd_attach_dev()
169 __func__, domain->name, pd->node_id, ret); in zynqmp_gpd_attach_dev()
173 pd->flags |= ZYNQMP_PM_DOMAIN_REQUESTED; in zynqmp_gpd_attach_dev()
189 struct zynqmp_pm_domain *pd; in zynqmp_gpd_detach_dev() local
191 pd = container_of(domain, struct zynqmp_pm_domain, gpd); in zynqmp_gpd_detach_dev()
197 ret = zynqmp_pm_release_node(pd->node_id); in zynqmp_gpd_detach_dev()
201 __func__, domain->name, pd->node_id, ret); in zynqmp_gpd_detach_dev()
205 pd->flags &= ~ZYNQMP_PM_DOMAIN_REQUESTED; in zynqmp_gpd_detach_dev()
216 struct zynqmp_pm_domain *pd; in zynqmp_gpd_xlate() local
218 pd = container_of(genpd_data->domains[0], struct zynqmp_pm_domain, gpd); in zynqmp_gpd_xlate()
225 if (pd[i].node_id == idx) in zynqmp_gpd_xlate()
234 if (pd[i].node_id == 0) { in zynqmp_gpd_xlate()
235 pd[i].node_id = idx; in zynqmp_gpd_xlate()
252 struct zynqmp_pm_domain *pd; in zynqmp_gpd_probe() local
255 pd = devm_kcalloc(dev, ZYNQMP_NUM_DOMAINS, sizeof(*pd), GFP_KERNEL); in zynqmp_gpd_probe()
256 if (!pd) in zynqmp_gpd_probe()
274 for (i = 0; i < ZYNQMP_NUM_DOMAINS; i++, pd++) { in zynqmp_gpd_probe()
275 pd->node_id = 0; in zynqmp_gpd_probe()
276 pd->gpd.name = kasprintf(GFP_KERNEL, "domain%d", i); in zynqmp_gpd_probe()
277 pd->gpd.power_off = zynqmp_gpd_power_off; in zynqmp_gpd_probe()
278 pd->gpd.power_on = zynqmp_gpd_power_on; in zynqmp_gpd_probe()
279 pd->gpd.attach_dev = zynqmp_gpd_attach_dev; in zynqmp_gpd_probe()
280 pd->gpd.detach_dev = zynqmp_gpd_detach_dev; in zynqmp_gpd_probe()
282 domains[i] = &pd->gpd; in zynqmp_gpd_probe()
285 pm_genpd_init(&pd->gpd, NULL, true); in zynqmp_gpd_probe()