Lines Matching refs:powergate
151 struct tegra_powergate *powergate = to_tegra_powergate(domain); in tegra_powergate_power_on() local
152 struct tegra_bpmp *bpmp = powergate->bpmp; in tegra_powergate_power_on()
154 return tegra_bpmp_powergate_set_state(bpmp, powergate->id, in tegra_powergate_power_on()
160 struct tegra_powergate *powergate = to_tegra_powergate(domain); in tegra_powergate_power_off() local
161 struct tegra_bpmp *bpmp = powergate->bpmp; in tegra_powergate_power_off()
163 return tegra_bpmp_powergate_set_state(bpmp, powergate->id, in tegra_powergate_power_off()
171 struct tegra_powergate *powergate; in tegra_powergate_add() local
177 powergate = devm_kzalloc(bpmp->dev, sizeof(*powergate), GFP_KERNEL); in tegra_powergate_add()
178 if (!powergate) in tegra_powergate_add()
181 powergate->id = info->id; in tegra_powergate_add()
182 powergate->bpmp = bpmp; in tegra_powergate_add()
184 powergate->genpd.name = kstrdup(info->name, GFP_KERNEL); in tegra_powergate_add()
185 powergate->genpd.power_on = tegra_powergate_power_on; in tegra_powergate_add()
186 powergate->genpd.power_off = tegra_powergate_power_off; in tegra_powergate_add()
188 err = pm_genpd_init(&powergate->genpd, NULL, off); in tegra_powergate_add()
190 kfree(powergate->genpd.name); in tegra_powergate_add()
194 return powergate; in tegra_powergate_add()
197 static void tegra_powergate_remove(struct tegra_powergate *powergate) in tegra_powergate_remove() argument
199 struct generic_pm_domain *genpd = &powergate->genpd; in tegra_powergate_remove()
200 struct tegra_bpmp *bpmp = powergate->bpmp; in tegra_powergate_remove()
258 struct tegra_powergate *powergate; in tegra_bpmp_add_powergates() local
267 powergate = tegra_powergate_add(bpmp, &powergates[i]); in tegra_bpmp_add_powergates()
268 if (IS_ERR(powergate)) { in tegra_bpmp_add_powergates()
269 err = PTR_ERR(powergate); in tegra_bpmp_add_powergates()
274 powergate->genpd.name); in tegra_bpmp_add_powergates()
275 domains[i] = &powergate->genpd; in tegra_bpmp_add_powergates()
285 powergate = to_tegra_powergate(domains[i]); in tegra_bpmp_add_powergates()
286 tegra_powergate_remove(powergate); in tegra_bpmp_add_powergates()
297 struct tegra_powergate *powergate; in tegra_bpmp_remove_powergates() local
302 powergate = to_tegra_powergate(genpd->domains[i]); in tegra_bpmp_remove_powergates()
303 tegra_powergate_remove(powergate); in tegra_bpmp_remove_powergates()
315 struct tegra_powergate *powergate; in tegra_powergate_xlate() local
317 powergate = to_tegra_powergate(genpd->domains[i]); in tegra_powergate_xlate()
318 if (powergate->id == spec->args[0]) { in tegra_powergate_xlate()
319 domain = &powergate->genpd; in tegra_powergate_xlate()