Lines Matching full:cell

54 static void mfd_acpi_add_device(const struct mfd_cell *cell,  in mfd_acpi_add_device()  argument
57 const struct mfd_cell_acpi_match *match = cell->acpi_match; in mfd_acpi_add_device()
93 static inline void mfd_acpi_add_device(const struct mfd_cell *cell, in mfd_acpi_add_device() argument
101 const struct mfd_cell *cell) in mfd_match_of_node_to_dev() argument
112 if (!cell->use_of_reg) in mfd_match_of_node_to_dev()
121 if (cell->of_reg != of_node_addr) in mfd_match_of_node_to_dev()
140 const struct mfd_cell *cell, in mfd_add_device() argument
156 platform_id = id + cell->id; in mfd_add_device()
158 pdev = platform_device_alloc(cell->name, platform_id); in mfd_add_device()
162 pdev->mfd_cell = kmemdup(cell, sizeof(*cell), GFP_KERNEL); in mfd_add_device()
166 res = kcalloc(cell->num_resources, sizeof(*res), GFP_KERNEL); in mfd_add_device()
177 &pdev->dev, cell->parent_supplies, in mfd_add_device()
178 parent, cell->parent_supplies, in mfd_add_device()
179 cell->num_parent_supplies); in mfd_add_device()
183 if (IS_ENABLED(CONFIG_OF) && parent->of_node && cell->of_compatible) { in mfd_add_device()
185 if (of_device_is_compatible(np, cell->of_compatible)) { in mfd_add_device()
192 ret = mfd_match_of_node_to_dev(pdev, np, cell); in mfd_add_device()
212 cell->name, platform_id); in mfd_add_device()
215 mfd_acpi_add_device(cell, pdev); in mfd_add_device()
217 if (cell->pdata_size) { in mfd_add_device()
219 cell->platform_data, cell->pdata_size); in mfd_add_device()
224 if (cell->swnode) { in mfd_add_device()
225 ret = device_add_software_node(&pdev->dev, cell->swnode); in mfd_add_device()
230 for (r = 0; r < cell->num_resources; r++) { in mfd_add_device()
231 res[r].name = cell->resources[r].name; in mfd_add_device()
232 res[r].flags = cell->resources[r].flags; in mfd_add_device()
235 if ((cell->resources[r].flags & IORESOURCE_MEM) && mem_base) { in mfd_add_device()
238 cell->resources[r].start; in mfd_add_device()
240 cell->resources[r].end; in mfd_add_device()
241 } else if (cell->resources[r].flags & IORESOURCE_IRQ) { in mfd_add_device()
244 WARN_ON(cell->resources[r].start != in mfd_add_device()
245 cell->resources[r].end); in mfd_add_device()
247 domain, cell->resources[r].start); in mfd_add_device()
250 cell->resources[r].start; in mfd_add_device()
252 cell->resources[r].end; in mfd_add_device()
255 res[r].parent = cell->resources[r].parent; in mfd_add_device()
256 res[r].start = cell->resources[r].start; in mfd_add_device()
257 res[r].end = cell->resources[r].end; in mfd_add_device()
260 if (!cell->ignore_resource_conflicts) { in mfd_add_device()
269 ret = platform_device_add_resources(pdev, res, cell->num_resources); in mfd_add_device()
277 if (cell->pm_runtime_no_callbacks) in mfd_add_device()
285 if (cell->swnode) in mfd_add_device()
295 cell->parent_supplies, in mfd_add_device()
296 cell->num_parent_supplies); in mfd_add_device()
346 const struct mfd_cell *cell; in mfd_remove_devices_fn() local
354 cell = mfd_get_cell(pdev); in mfd_remove_devices_fn()
356 if (level && cell->level > *level) in mfd_remove_devices_fn()
359 if (cell->swnode) in mfd_remove_devices_fn()
368 regulator_bulk_unregister_supply_alias(dev, cell->parent_supplies, in mfd_remove_devices_fn()
369 cell->num_parent_supplies); in mfd_remove_devices_fn()