Skip to content

Commit 2bd1298

Browse files
lokeshvutlaMarc Zyngier
authored andcommitted
genirq: Introduce irq_chip_{request,release}_resource_parent() apis
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>
1 parent 032a1ec commit 2bd1298

File tree

2 files changed

+29
-0
lines changed

2 files changed

+29
-0
lines changed

include/linux/irq.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -625,6 +625,8 @@ extern int irq_chip_set_wake_parent(struct irq_data *data, unsigned int on);
625625
extern int irq_chip_set_vcpu_affinity_parent(struct irq_data *data,
626626
void *vcpu_info);
627627
extern int irq_chip_set_type_parent(struct irq_data *data, unsigned int type);
628+
extern int irq_chip_request_resources_parent(struct irq_data *data);
629+
extern void irq_chip_release_resources_parent(struct irq_data *data);
628630
#endif
629631

630632
/* Handling of unhandled and spurious interrupts: */

kernel/irq/chip.c

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1459,6 +1459,33 @@ int irq_chip_set_wake_parent(struct irq_data *data, unsigned int on)
14591459
return -ENOSYS;
14601460
}
14611461
EXPORT_SYMBOL_GPL(irq_chip_set_wake_parent);
1462+
1463+
/**
1464+
* irq_chip_request_resources_parent - Request resources on the parent interrupt
1465+
* @data: Pointer to interrupt specific data
1466+
*/
1467+
int irq_chip_request_resources_parent(struct irq_data *data)
1468+
{
1469+
data = data->parent_data;
1470+
1471+
if (data->chip->irq_request_resources)
1472+
return data->chip->irq_request_resources(data);
1473+
1474+
return -ENOSYS;
1475+
}
1476+
EXPORT_SYMBOL_GPL(irq_chip_request_resources_parent);
1477+
1478+
/**
1479+
* irq_chip_release_resources_parent - Release resources on the parent interrupt
1480+
* @data: Pointer to interrupt specific data
1481+
*/
1482+
void irq_chip_release_resources_parent(struct irq_data *data)
1483+
{
1484+
data = data->parent_data;
1485+
if (data->chip->irq_release_resources)
1486+
data->chip->irq_release_resources(data);
1487+
}
1488+
EXPORT_SYMBOL_GPL(irq_chip_release_resources_parent);
14621489
#endif
14631490

14641491
/**

0 commit comments

Comments
 (0)