Lines Matching refs:irq_data
518 struct irq_data *irq_data) in irq_domain_set_mapping() argument
525 rcu_assign_pointer(domain->revmap[hwirq], irq_data); in irq_domain_set_mapping()
527 radix_tree_insert(&domain->revmap_tree, hwirq, irq_data); in irq_domain_set_mapping()
533 struct irq_data *irq_data = irq_get_irq_data(irq); in irq_domain_disassociate() local
536 if (WARN(!irq_data || irq_data->domain != domain, in irq_domain_disassociate()
540 hwirq = irq_data->hwirq; in irq_domain_disassociate()
554 irq_data->domain = NULL; in irq_domain_disassociate()
555 irq_data->hwirq = 0; in irq_domain_disassociate()
565 struct irq_data *irq_data = irq_get_irq_data(virq); in irq_domain_associate() local
571 if (WARN(!irq_data, "error: virq%i is not allocated", virq)) in irq_domain_associate()
573 if (WARN(irq_data->domain, "error: virq%i is already associated", virq)) in irq_domain_associate()
577 irq_data->hwirq = hwirq; in irq_domain_associate()
578 irq_data->domain = domain; in irq_domain_associate()
591 irq_data->domain = NULL; in irq_domain_associate()
592 irq_data->hwirq = 0; in irq_domain_associate()
598 if (!domain->name && irq_data->chip) in irq_domain_associate()
599 domain->name = irq_data->chip->name; in irq_domain_associate()
603 irq_domain_set_mapping(domain, hwirq, irq_data); in irq_domain_associate()
763 struct irq_data *irq_data; in irq_create_fwspec_mapping() local
811 irq_data = irq_get_irq_data(virq); in irq_create_fwspec_mapping()
812 if (!irq_data) in irq_create_fwspec_mapping()
815 irqd_set_trigger_type(irq_data, type); in irq_create_fwspec_mapping()
835 irq_data = irq_get_irq_data(virq); in irq_create_fwspec_mapping()
836 if (!irq_data) { in irq_create_fwspec_mapping()
845 irqd_set_trigger_type(irq_data, type); in irq_create_fwspec_mapping()
851 unsigned int irq_create_of_mapping(struct of_phandle_args *irq_data) in irq_create_of_mapping() argument
855 of_phandle_args_to_fwspec(irq_data->np, irq_data->args, in irq_create_of_mapping()
856 irq_data->args_count, &fwspec); in irq_create_of_mapping()
868 struct irq_data *irq_data = irq_get_irq_data(virq); in irq_dispose_mapping() local
871 if (!virq || !irq_data) in irq_dispose_mapping()
874 domain = irq_data->domain; in irq_dispose_mapping()
900 struct irq_data *data; in __irq_resolve_mapping()
1069 void irq_domain_reset_irq_data(struct irq_data *irq_data) in irq_domain_reset_irq_data() argument
1071 irq_data->hwirq = 0; in irq_domain_reset_irq_data()
1072 irq_data->chip = &no_irq_chip; in irq_domain_reset_irq_data()
1073 irq_data->chip_data = NULL; in irq_domain_reset_irq_data()
1117 struct irq_data *data; in irq_domain_insert_irq()
1135 struct irq_data *data; in irq_domain_remove_irq()
1151 static struct irq_data *irq_domain_insert_irq_data(struct irq_domain *domain, in irq_domain_insert_irq_data()
1152 struct irq_data *child) in irq_domain_insert_irq_data()
1154 struct irq_data *irq_data; in irq_domain_insert_irq_data() local
1156 irq_data = kzalloc_node(sizeof(*irq_data), GFP_KERNEL, in irq_domain_insert_irq_data()
1158 if (irq_data) { in irq_domain_insert_irq_data()
1159 child->parent_data = irq_data; in irq_domain_insert_irq_data()
1160 irq_data->irq = child->irq; in irq_domain_insert_irq_data()
1161 irq_data->common = child->common; in irq_domain_insert_irq_data()
1162 irq_data->domain = domain; in irq_domain_insert_irq_data()
1165 return irq_data; in irq_domain_insert_irq_data()
1168 static void __irq_domain_free_hierarchy(struct irq_data *irq_data) in __irq_domain_free_hierarchy() argument
1170 struct irq_data *tmp; in __irq_domain_free_hierarchy()
1172 while (irq_data) { in __irq_domain_free_hierarchy()
1173 tmp = irq_data; in __irq_domain_free_hierarchy()
1174 irq_data = irq_data->parent_data; in __irq_domain_free_hierarchy()
1181 struct irq_data *irq_data, *tmp; in irq_domain_free_irq_data() local
1185 irq_data = irq_get_irq_data(virq + i); in irq_domain_free_irq_data()
1186 tmp = irq_data->parent_data; in irq_domain_free_irq_data()
1187 irq_data->parent_data = NULL; in irq_domain_free_irq_data()
1188 irq_data->domain = NULL; in irq_domain_free_irq_data()
1210 struct irq_data *irqd; in irq_domain_disconnect_hierarchy()
1223 struct irq_data *tail, *irqd, *irq_data; in irq_domain_trim_hierarchy() local
1225 irq_data = irq_get_irq_data(virq); in irq_domain_trim_hierarchy()
1229 if (!irq_data->chip || IS_ERR(irq_data->chip)) in irq_domain_trim_hierarchy()
1236 for (irqd = irq_data->parent_data; irqd; irq_data = irqd, irqd = irqd->parent_data) { in irq_domain_trim_hierarchy()
1250 tail = irq_data; in irq_domain_trim_hierarchy()
1273 struct irq_data *irq_data; in irq_domain_alloc_irq_data() local
1279 irq_data = irq_get_irq_data(virq + i); in irq_domain_alloc_irq_data()
1280 irq_data->domain = domain; in irq_domain_alloc_irq_data()
1283 irq_data = irq_domain_insert_irq_data(parent, irq_data); in irq_domain_alloc_irq_data()
1284 if (!irq_data) { in irq_domain_alloc_irq_data()
1299 struct irq_data *irq_domain_get_irq_data(struct irq_domain *domain, in irq_domain_get_irq_data()
1302 struct irq_data *irq_data; in irq_domain_get_irq_data() local
1304 for (irq_data = irq_get_irq_data(virq); irq_data; in irq_domain_get_irq_data()
1305 irq_data = irq_data->parent_data) in irq_domain_get_irq_data()
1306 if (irq_data->domain == domain) in irq_domain_get_irq_data()
1307 return irq_data; in irq_domain_get_irq_data()
1325 struct irq_data *irq_data = irq_domain_get_irq_data(domain, virq); in irq_domain_set_hwirq_and_chip() local
1327 if (!irq_data) in irq_domain_set_hwirq_and_chip()
1330 irq_data->hwirq = hwirq; in irq_domain_set_hwirq_and_chip()
1331 irq_data->chip = chip ? chip : &no_irq_chip; in irq_domain_set_hwirq_and_chip()
1332 irq_data->chip_data = chip_data; in irq_domain_set_hwirq_and_chip()
1369 struct irq_data *irq_data; in irq_domain_free_irqs_common() local
1373 irq_data = irq_domain_get_irq_data(domain, virq + i); in irq_domain_free_irqs_common()
1374 if (irq_data) in irq_domain_free_irqs_common()
1375 irq_domain_reset_irq_data(irq_data); in irq_domain_free_irqs_common()
1508 static void irq_domain_fix_revmap(struct irq_data *d) in irq_domain_fix_revmap()
1541 struct irq_data *child_irq_data; in irq_domain_push_irq()
1542 struct irq_data *root_irq_data = irq_get_irq_data(virq); in irq_domain_push_irq()
1623 struct irq_data *root_irq_data = irq_get_irq_data(virq); in irq_domain_pop_irq()
1624 struct irq_data *child_irq_data; in irq_domain_pop_irq()
1625 struct irq_data *tmp_irq_data; in irq_domain_pop_irq()
1689 struct irq_data *data = irq_get_irq_data(virq); in irq_domain_free_irqs()
1741 static void __irq_domain_deactivate_irq(struct irq_data *irq_data) in __irq_domain_deactivate_irq() argument
1743 if (irq_data && irq_data->domain) { in __irq_domain_deactivate_irq()
1744 struct irq_domain *domain = irq_data->domain; in __irq_domain_deactivate_irq()
1747 domain->ops->deactivate(domain, irq_data); in __irq_domain_deactivate_irq()
1748 if (irq_data->parent_data) in __irq_domain_deactivate_irq()
1749 __irq_domain_deactivate_irq(irq_data->parent_data); in __irq_domain_deactivate_irq()
1753 static int __irq_domain_activate_irq(struct irq_data *irqd, bool reserve) in __irq_domain_activate_irq()
1782 int irq_domain_activate_irq(struct irq_data *irq_data, bool reserve) in irq_domain_activate_irq() argument
1786 if (!irqd_is_activated(irq_data)) in irq_domain_activate_irq()
1787 ret = __irq_domain_activate_irq(irq_data, reserve); in irq_domain_activate_irq()
1789 irqd_set_activated(irq_data); in irq_domain_activate_irq()
1801 void irq_domain_deactivate_irq(struct irq_data *irq_data) in irq_domain_deactivate_irq() argument
1803 if (irqd_is_activated(irq_data)) { in irq_domain_deactivate_irq()
1804 __irq_domain_deactivate_irq(irq_data); in irq_domain_deactivate_irq()
1805 irqd_clr_activated(irq_data); in irq_domain_deactivate_irq()
1835 struct irq_data *irq_domain_get_irq_data(struct irq_domain *domain, in irq_domain_get_irq_data()
1838 struct irq_data *irq_data = irq_get_irq_data(virq); in irq_domain_get_irq_data() local
1840 return (irq_data && irq_data->domain == domain) ? irq_data : NULL; in irq_domain_get_irq_data()