Merge tag 'trace-printf-v6.13' of git://git.kernel.org/pub/scm/linux/kernel/git/trace...
[drm/drm-misc.git] / drivers / irqchip / irq-msi-lib.h
blob681ceabb7bc74080dec7e8d0dee6fa0bd80b1ca7
1 // SPDX-License-Identifier: GPL-2.0-only
2 // Copyright (C) 2022 Linutronix GmbH
3 // Copyright (C) 2022 Intel
5 #ifndef _DRIVERS_IRQCHIP_IRQ_MSI_LIB_H
6 #define _DRIVERS_IRQCHIP_IRQ_MSI_LIB_H
8 #include <linux/bits.h>
9 #include <linux/irqdomain.h>
10 #include <linux/msi.h>
12 #ifdef CONFIG_PCI_MSI
13 #define MATCH_PCI_MSI BIT(DOMAIN_BUS_PCI_MSI)
14 #else
15 #define MATCH_PCI_MSI (0)
16 #endif
18 #define MATCH_PLATFORM_MSI BIT(DOMAIN_BUS_PLATFORM_MSI)
20 int msi_lib_irq_domain_select(struct irq_domain *d, struct irq_fwspec *fwspec,
21 enum irq_domain_bus_token bus_token);
23 bool msi_lib_init_dev_msi_info(struct device *dev, struct irq_domain *domain,
24 struct irq_domain *real_parent,
25 struct msi_domain_info *info);
27 #endif /* _DRIVERS_IRQCHIP_IRQ_MSI_LIB_H */