driver core: platform: Add devm_platform_get_irqs_affinity()
Drivers for multi-queue platform devices may also want managed interrupts for handling HW queue completion interrupts, so add support. The function accepts an affinity descriptor pointer, which covers all IRQs expected for the device. The function is devm class as the only current in-tree user will also use devm method for requesting the interrupts; as such, the function is made as devm as it can ensure ordering of freeing the irq and disposing of the mapping. Signed-off-by: John Garry <john.garry@huawei.com> Signed-off-by: Marc Zyngier <maz@kernel.org> Acked-by: Marc Zyngier <maz@kernel.org> Link: https://lore.kernel.org/r/1606905417-183214-5-git-send-email-john.garry@huawei.com
This commit is contained in:
parent
1c3f69b454
commit
e15f2fa959
2 changed files with 127 additions and 0 deletions
|
|
@ -15,6 +15,7 @@
|
|||
#define PLATFORM_DEVID_NONE (-1)
|
||||
#define PLATFORM_DEVID_AUTO (-2)
|
||||
|
||||
struct irq_affinity;
|
||||
struct mfd_cell;
|
||||
struct property_entry;
|
||||
struct platform_device_id;
|
||||
|
|
@ -70,6 +71,11 @@ devm_platform_ioremap_resource_byname(struct platform_device *pdev,
|
|||
extern int platform_get_irq(struct platform_device *, unsigned int);
|
||||
extern int platform_get_irq_optional(struct platform_device *, unsigned int);
|
||||
extern int platform_irq_count(struct platform_device *);
|
||||
extern int devm_platform_get_irqs_affinity(struct platform_device *dev,
|
||||
struct irq_affinity *affd,
|
||||
unsigned int minvec,
|
||||
unsigned int maxvec,
|
||||
int **irqs);
|
||||
extern struct resource *platform_get_resource_byname(struct platform_device *,
|
||||
unsigned int,
|
||||
const char *);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue