irq_sim.h 789 B

1234567891011121314151617181920212223242526
  1. /* SPDX-License-Identifier: GPL-2.0+ */
  2. /*
  3. * Copyright (C) 2017-2018 Bartosz Golaszewski <brgl@bgdev.pl>
  4. * Copyright (C) 2020 Bartosz Golaszewski <bgolaszewski@baylibre.com>
  5. */
  6. #ifndef _LINUX_IRQ_SIM_H
  7. #define _LINUX_IRQ_SIM_H
  8. #include <linux/device.h>
  9. #include <linux/fwnode.h>
  10. #include <linux/irqdomain.h>
  11. /*
  12. * Provides a framework for allocating simulated interrupts which can be
  13. * requested like normal irqs and enqueued from process context.
  14. */
  15. struct irq_domain *irq_domain_create_sim(struct fwnode_handle *fwnode,
  16. unsigned int num_irqs);
  17. struct irq_domain *devm_irq_domain_create_sim(struct device *dev,
  18. struct fwnode_handle *fwnode,
  19. unsigned int num_irqs);
  20. void irq_domain_remove_sim(struct irq_domain *domain);
  21. #endif /* _LINUX_IRQ_SIM_H */