Lines Matching refs:rpi_domains

86 static void rpi_common_init_power_domain(struct rpi_power_domains *rpi_domains,  in rpi_common_init_power_domain()  argument
89 struct rpi_power_domain *dom = &rpi_domains->domains[xlate_index]; in rpi_common_init_power_domain()
91 dom->fw = rpi_domains->fw; in rpi_common_init_power_domain()
108 rpi_domains->xlate.domains[xlate_index] = &dom->base; in rpi_common_init_power_domain()
111 static void rpi_init_power_domain(struct rpi_power_domains *rpi_domains, in rpi_init_power_domain() argument
114 struct rpi_power_domain *dom = &rpi_domains->domains[xlate_index]; in rpi_init_power_domain()
116 if (!rpi_domains->has_new_interface) in rpi_init_power_domain()
122 rpi_common_init_power_domain(rpi_domains, xlate_index, name); in rpi_init_power_domain()
125 static void rpi_init_old_power_domain(struct rpi_power_domains *rpi_domains, in rpi_init_old_power_domain() argument
129 struct rpi_power_domain *dom = &rpi_domains->domains[xlate_index]; in rpi_init_old_power_domain()
134 rpi_common_init_power_domain(rpi_domains, xlate_index, name); in rpi_init_old_power_domain()
146 rpi_has_new_domain_support(struct rpi_power_domains *rpi_domains) in rpi_has_new_domain_support() argument
154 ret = rpi_firmware_property(rpi_domains->fw, in rpi_has_new_domain_support()
165 struct rpi_power_domains *rpi_domains; in rpi_power_probe() local
167 rpi_domains = devm_kzalloc(dev, sizeof(*rpi_domains), GFP_KERNEL); in rpi_power_probe()
168 if (!rpi_domains) in rpi_power_probe()
171 rpi_domains->xlate.domains = in rpi_power_probe()
174 sizeof(*rpi_domains->xlate.domains), in rpi_power_probe()
176 if (!rpi_domains->xlate.domains) in rpi_power_probe()
179 rpi_domains->xlate.num_domains = RPI_POWER_DOMAIN_COUNT; in rpi_power_probe()
187 rpi_domains->fw = devm_rpi_firmware_get(&pdev->dev, fw_np); in rpi_power_probe()
189 if (!rpi_domains->fw) in rpi_power_probe()
192 rpi_domains->has_new_interface = in rpi_power_probe()
193 rpi_has_new_domain_support(rpi_domains); in rpi_power_probe()
195 rpi_init_power_domain(rpi_domains, RPI_POWER_DOMAIN_I2C0, "I2C0"); in rpi_power_probe()
196 rpi_init_power_domain(rpi_domains, RPI_POWER_DOMAIN_I2C1, "I2C1"); in rpi_power_probe()
197 rpi_init_power_domain(rpi_domains, RPI_POWER_DOMAIN_I2C2, "I2C2"); in rpi_power_probe()
198 rpi_init_power_domain(rpi_domains, RPI_POWER_DOMAIN_VIDEO_SCALER, in rpi_power_probe()
200 rpi_init_power_domain(rpi_domains, RPI_POWER_DOMAIN_VPU1, "VPU1"); in rpi_power_probe()
201 rpi_init_power_domain(rpi_domains, RPI_POWER_DOMAIN_HDMI, "HDMI"); in rpi_power_probe()
207 rpi_init_old_power_domain(rpi_domains, RPI_POWER_DOMAIN_USB, in rpi_power_probe()
210 rpi_init_power_domain(rpi_domains, RPI_POWER_DOMAIN_VEC, "VEC"); in rpi_power_probe()
211 rpi_init_power_domain(rpi_domains, RPI_POWER_DOMAIN_JPEG, "JPEG"); in rpi_power_probe()
212 rpi_init_power_domain(rpi_domains, RPI_POWER_DOMAIN_H264, "H264"); in rpi_power_probe()
213 rpi_init_power_domain(rpi_domains, RPI_POWER_DOMAIN_V3D, "V3D"); in rpi_power_probe()
214 rpi_init_power_domain(rpi_domains, RPI_POWER_DOMAIN_ISP, "ISP"); in rpi_power_probe()
215 rpi_init_power_domain(rpi_domains, RPI_POWER_DOMAIN_UNICAM0, "UNICAM0"); in rpi_power_probe()
216 rpi_init_power_domain(rpi_domains, RPI_POWER_DOMAIN_UNICAM1, "UNICAM1"); in rpi_power_probe()
217 rpi_init_power_domain(rpi_domains, RPI_POWER_DOMAIN_CCP2RX, "CCP2RX"); in rpi_power_probe()
218 rpi_init_power_domain(rpi_domains, RPI_POWER_DOMAIN_CSI2, "CSI2"); in rpi_power_probe()
219 rpi_init_power_domain(rpi_domains, RPI_POWER_DOMAIN_CPI, "CPI"); in rpi_power_probe()
220 rpi_init_power_domain(rpi_domains, RPI_POWER_DOMAIN_DSI0, "DSI0"); in rpi_power_probe()
221 rpi_init_power_domain(rpi_domains, RPI_POWER_DOMAIN_DSI1, "DSI1"); in rpi_power_probe()
222 rpi_init_power_domain(rpi_domains, RPI_POWER_DOMAIN_TRANSPOSER, in rpi_power_probe()
224 rpi_init_power_domain(rpi_domains, RPI_POWER_DOMAIN_CCP2TX, "CCP2TX"); in rpi_power_probe()
225 rpi_init_power_domain(rpi_domains, RPI_POWER_DOMAIN_CDP, "CDP"); in rpi_power_probe()
226 rpi_init_power_domain(rpi_domains, RPI_POWER_DOMAIN_ARM, "ARM"); in rpi_power_probe()
228 of_genpd_add_provider_onecell(dev->of_node, &rpi_domains->xlate); in rpi_power_probe()
230 platform_set_drvdata(pdev, rpi_domains); in rpi_power_probe()