Lines Matching full:power

3  * BCM63xx Power Domain Controller Driver
21 struct bcm63xx_power *power; member
41 struct bcm63xx_power *power = pmd->power; in bcm63xx_power_get_state() local
48 *is_on = !(__raw_readl(power->base) & pmd->mask); in bcm63xx_power_get_state()
55 struct bcm63xx_power *power = pmd->power; in bcm63xx_power_set_state() local
62 spin_lock_irqsave(&power->lock, flags); in bcm63xx_power_set_state()
63 val = __raw_readl(power->base); in bcm63xx_power_set_state()
68 __raw_writel(val, power->base); in bcm63xx_power_set_state()
69 spin_unlock_irqrestore(&power->lock, flags); in bcm63xx_power_set_state()
96 struct bcm63xx_power *power; in bcm63xx_power_probe() local
101 power = devm_kzalloc(dev, sizeof(*power), GFP_KERNEL); in bcm63xx_power_probe()
102 if (!power) in bcm63xx_power_probe()
106 power->base = devm_ioremap_resource(&pdev->dev, res); in bcm63xx_power_probe()
107 if (IS_ERR(power->base)) in bcm63xx_power_probe()
108 return PTR_ERR(power->base); in bcm63xx_power_probe()
114 power->genpd_data.num_domains = 0; in bcm63xx_power_probe()
124 power->genpd_data.num_domains = max_bit + 1; in bcm63xx_power_probe()
126 power->dev = devm_kcalloc(dev, power->genpd_data.num_domains, in bcm63xx_power_probe()
129 if (!power->dev) in bcm63xx_power_probe()
132 power->genpd = devm_kcalloc(dev, power->genpd_data.num_domains, in bcm63xx_power_probe()
135 if (!power->genpd) in bcm63xx_power_probe()
138 power->genpd_data.domains = power->genpd; in bcm63xx_power_probe()
142 struct bcm63xx_power_dev *pmd = &power->dev[ndom]; in bcm63xx_power_probe()
145 pmd->power = power; in bcm63xx_power_probe()
159 power->genpd[entry->bit] = &pmd->genpd; in bcm63xx_power_probe()
164 spin_lock_init(&power->lock); in bcm63xx_power_probe()
166 ret = of_genpd_add_provider_onecell(np, &power->genpd_data); in bcm63xx_power_probe()
172 dev_info(dev, "registered %u power domains\n", ndom); in bcm63xx_power_probe()
355 .compatible = "brcm,bcm6318-power-controller",
358 .compatible = "brcm,bcm6328-power-controller",
361 .compatible = "brcm,bcm6362-power-controller",
364 .compatible = "brcm,bcm63268-power-controller",
373 .name = "bcm63xx-power-controller",