]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
genirq: Introduce irq_chip_{request,release}_resource_parent() apis
authorLokesh Vutla <lokeshvutla@ti.com>
Tue, 30 Apr 2019 10:12:22 +0000 (15:42 +0530)
committerMarc Zyngier <marc.zyngier@arm.com>
Wed, 1 May 2019 09:41:38 +0000 (10:41 +0100)
Introduce irq_chip_{request,release}_resource_parent() apis so
that these can be used in hierarchical irqchips.

Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
include/linux/irq.h
kernel/irq/chip.c

index 7ae8de5ad0f2fae4a5c50ad30903ecdf631bb0fd..fb301cf291480a0639691c7496df6f4317c8bedb 100644 (file)
@@ -625,6 +625,8 @@ extern int irq_chip_set_wake_parent(struct irq_data *data, unsigned int on);
 extern int irq_chip_set_vcpu_affinity_parent(struct irq_data *data,
                                             void *vcpu_info);
 extern int irq_chip_set_type_parent(struct irq_data *data, unsigned int type);
+extern int irq_chip_request_resources_parent(struct irq_data *data);
+extern void irq_chip_release_resources_parent(struct irq_data *data);
 #endif
 
 /* Handling of unhandled and spurious interrupts: */
index 51128bea3846ca1c15cd622f0889602cd1688b78..29d6c7d070b4fdcbc423fed183e389d06ed2bd73 100644 (file)
@@ -1459,6 +1459,33 @@ int irq_chip_set_wake_parent(struct irq_data *data, unsigned int on)
        return -ENOSYS;
 }
 EXPORT_SYMBOL_GPL(irq_chip_set_wake_parent);
+
+/**
+ * irq_chip_request_resources_parent - Request resources on the parent interrupt
+ * @data:      Pointer to interrupt specific data
+ */
+int irq_chip_request_resources_parent(struct irq_data *data)
+{
+       data = data->parent_data;
+
+       if (data->chip->irq_request_resources)
+               return data->chip->irq_request_resources(data);
+
+       return -ENOSYS;
+}
+EXPORT_SYMBOL_GPL(irq_chip_request_resources_parent);
+
+/**
+ * irq_chip_release_resources_parent - Release resources on the parent interrupt
+ * @data:      Pointer to interrupt specific data
+ */
+void irq_chip_release_resources_parent(struct irq_data *data)
+{
+       data = data->parent_data;
+       if (data->chip->irq_release_resources)
+               data->chip->irq_release_resources(data);
+}
+EXPORT_SYMBOL_GPL(irq_chip_release_resources_parent);
 #endif
 
 /**