|
@@ -245,6 +245,37 @@ void irq_domain_remove(struct irq_domain *domain)
|
|
|
}
|
|
|
EXPORT_SYMBOL_GPL(irq_domain_remove);
|
|
|
|
|
|
+void irq_domain_update_bus_token(struct irq_domain *domain,
|
|
|
+ enum irq_domain_bus_token bus_token)
|
|
|
+{
|
|
|
+ char *name;
|
|
|
+
|
|
|
+ if (domain->bus_token == bus_token)
|
|
|
+ return;
|
|
|
+
|
|
|
+ mutex_lock(&irq_domain_mutex);
|
|
|
+
|
|
|
+ domain->bus_token = bus_token;
|
|
|
+
|
|
|
+ name = kasprintf(GFP_KERNEL, "%s-%d", domain->name, bus_token);
|
|
|
+ if (!name) {
|
|
|
+ mutex_unlock(&irq_domain_mutex);
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ debugfs_remove_domain_dir(domain);
|
|
|
+
|
|
|
+ if (domain->flags & IRQ_DOMAIN_NAME_ALLOCATED)
|
|
|
+ kfree(domain->name);
|
|
|
+ else
|
|
|
+ domain->flags |= IRQ_DOMAIN_NAME_ALLOCATED;
|
|
|
+
|
|
|
+ domain->name = name;
|
|
|
+ debugfs_add_domain_dir(domain);
|
|
|
+
|
|
|
+ mutex_unlock(&irq_domain_mutex);
|
|
|
+}
|
|
|
+
|
|
|
/**
|
|
|
* irq_domain_add_simple() - Register an irq_domain and optionally map a range of irqs
|
|
|
* @of_node: pointer to interrupt controller's device tree node.
|