Lines Matching refs:powergate

152 	struct tegra_powergate *powergate = to_tegra_powergate(domain);  in tegra_powergate_power_on()  local
153 struct tegra_bpmp *bpmp = powergate->bpmp; in tegra_powergate_power_on()
155 return tegra_bpmp_powergate_set_state(bpmp, powergate->id, in tegra_powergate_power_on()
161 struct tegra_powergate *powergate = to_tegra_powergate(domain); in tegra_powergate_power_off() local
162 struct tegra_bpmp *bpmp = powergate->bpmp; in tegra_powergate_power_off()
164 return tegra_bpmp_powergate_set_state(bpmp, powergate->id, in tegra_powergate_power_off()
172 struct tegra_powergate *powergate; in tegra_powergate_add() local
178 powergate = devm_kzalloc(bpmp->dev, sizeof(*powergate), GFP_KERNEL); in tegra_powergate_add()
179 if (!powergate) in tegra_powergate_add()
182 powergate->id = info->id; in tegra_powergate_add()
183 powergate->bpmp = bpmp; in tegra_powergate_add()
185 powergate->genpd.name = kstrdup(info->name, GFP_KERNEL); in tegra_powergate_add()
186 powergate->genpd.power_on = tegra_powergate_power_on; in tegra_powergate_add()
187 powergate->genpd.power_off = tegra_powergate_power_off; in tegra_powergate_add()
189 err = pm_genpd_init(&powergate->genpd, NULL, off); in tegra_powergate_add()
191 kfree(powergate->genpd.name); in tegra_powergate_add()
195 return powergate; in tegra_powergate_add()
198 static void tegra_powergate_remove(struct tegra_powergate *powergate) in tegra_powergate_remove() argument
200 struct generic_pm_domain *genpd = &powergate->genpd; in tegra_powergate_remove()
201 struct tegra_bpmp *bpmp = powergate->bpmp; in tegra_powergate_remove()
259 struct tegra_powergate *powergate; in tegra_bpmp_add_powergates() local
268 powergate = tegra_powergate_add(bpmp, &powergates[i]); in tegra_bpmp_add_powergates()
269 if (IS_ERR(powergate)) { in tegra_bpmp_add_powergates()
270 err = PTR_ERR(powergate); in tegra_bpmp_add_powergates()
275 powergate->genpd.name); in tegra_bpmp_add_powergates()
276 domains[i] = &powergate->genpd; in tegra_bpmp_add_powergates()
286 powergate = to_tegra_powergate(domains[i]); in tegra_bpmp_add_powergates()
287 tegra_powergate_remove(powergate); in tegra_bpmp_add_powergates()
298 struct tegra_powergate *powergate; in tegra_bpmp_remove_powergates() local
303 powergate = to_tegra_powergate(genpd->domains[i]); in tegra_bpmp_remove_powergates()
304 tegra_powergate_remove(powergate); in tegra_bpmp_remove_powergates()
316 struct tegra_powergate *powergate; in tegra_powergate_xlate() local
318 powergate = to_tegra_powergate(genpd->domains[i]); in tegra_powergate_xlate()
319 if (powergate->id == spec->args[0]) { in tegra_powergate_xlate()
320 domain = &powergate->genpd; in tegra_powergate_xlate()