Lines Matching +full:soc +full:- +full:vdec
1 // SPDX-License-Identifier: GPL-2.0
8 #include <linux/firmware/thead/thead,th1520-aon.h>
13 #include <dt-bindings/power/thead,th1520-power.h>
36 [TH1520_VDEC_PD] = { "vdec", TH1520_AON_VDEC_PD, false },
54 return th1520_aon_power_update(pd->aon_chan, pd->rsrc, true); in th1520_pd_power_on()
61 return th1520_aon_power_update(pd->aon_chan, pd->rsrc, false); in th1520_pd_power_off()
67 struct generic_pm_domain *domain = ERR_PTR(-ENOENT); in th1520_pd_xlate()
77 pd = to_th1520_power_domain(pd_data->domains[i]); in th1520_pd_xlate()
78 if (pd->rsrc == spec->args[0]) { in th1520_pd_xlate()
79 domain = &pd->genpd; in th1520_pd_xlate()
95 return ERR_PTR(-ENOMEM); in th1520_add_pm_domain()
97 pd->rsrc = pi->rsrc; in th1520_add_pm_domain()
98 pd->genpd.power_on = th1520_pd_power_on; in th1520_add_pm_domain()
99 pd->genpd.power_off = th1520_pd_power_off; in th1520_add_pm_domain()
100 pd->genpd.name = pi->name; in th1520_add_pm_domain()
102 ret = pm_genpd_init(&pd->genpd, NULL, true); in th1520_add_pm_domain()
123 ret = th1520_aon_power_update(pd->aon_chan, pd->rsrc, false); in th1520_pd_init_all_off()
127 pd->genpd.name); in th1520_pd_init_all_off()
136 struct device *dev = &pdev->dev; in th1520_pd_probe()
147 ret = -ENOMEM; in th1520_pd_probe()
153 ret = -ENOMEM; in th1520_pd_probe()
169 pd->aon_chan = aon_chan; in th1520_pd_probe()
170 domains[i] = &pd->genpd; in th1520_pd_probe()
171 dev_dbg(dev, "added power domain %s\n", pd->genpd.name); in th1520_pd_probe()
174 pd_data->domains = domains; in th1520_pd_probe()
175 pd_data->num_domains = ARRAY_SIZE(th1520_pd_ranges); in th1520_pd_probe()
176 pd_data->xlate = th1520_pd_xlate; in th1520_pd_probe()
180 * low-power state. This allows device drivers to manage power in th1520_pd_probe()
185 ret = of_genpd_add_provider_onecell(dev->of_node, pd_data); in th1520_pd_probe()
192 for (i--; i >= 0; i--) in th1520_pd_probe()
201 { .compatible = "thead,th1520-aon" },
208 .name = "th1520-pd",
217 MODULE_DESCRIPTION("T-HEAD TH1520 SoC power domain controller");