Lines Matching refs:power

20 	struct bcm63xx_power *power;  member
40 struct bcm63xx_power *power = pmd->power; in bcm63xx_power_get_state() local
47 *is_on = !(__raw_readl(power->base) & pmd->mask); in bcm63xx_power_get_state()
54 struct bcm63xx_power *power = pmd->power; in bcm63xx_power_set_state() local
61 spin_lock_irqsave(&power->lock, flags); in bcm63xx_power_set_state()
62 val = __raw_readl(power->base); in bcm63xx_power_set_state()
67 __raw_writel(val, power->base); in bcm63xx_power_set_state()
68 spin_unlock_irqrestore(&power->lock, flags); in bcm63xx_power_set_state()
94 struct bcm63xx_power *power; in bcm63xx_power_probe() local
99 power = devm_kzalloc(dev, sizeof(*power), GFP_KERNEL); in bcm63xx_power_probe()
100 if (!power) in bcm63xx_power_probe()
103 power->base = devm_platform_ioremap_resource(pdev, 0); in bcm63xx_power_probe()
104 if (IS_ERR(power->base)) in bcm63xx_power_probe()
105 return PTR_ERR(power->base); in bcm63xx_power_probe()
111 power->genpd_data.num_domains = 0; in bcm63xx_power_probe()
121 power->genpd_data.num_domains = max_bit + 1; in bcm63xx_power_probe()
123 power->dev = devm_kcalloc(dev, power->genpd_data.num_domains, in bcm63xx_power_probe()
126 if (!power->dev) in bcm63xx_power_probe()
129 power->genpd = devm_kcalloc(dev, power->genpd_data.num_domains, in bcm63xx_power_probe()
132 if (!power->genpd) in bcm63xx_power_probe()
135 power->genpd_data.domains = power->genpd; in bcm63xx_power_probe()
139 struct bcm63xx_power_dev *pmd = &power->dev[ndom]; in bcm63xx_power_probe()
142 pmd->power = power; in bcm63xx_power_probe()
156 power->genpd[entry->bit] = &pmd->genpd; in bcm63xx_power_probe()
161 spin_lock_init(&power->lock); in bcm63xx_power_probe()
163 ret = of_genpd_add_provider_onecell(np, &power->genpd_data); in bcm63xx_power_probe()