#include <linux/cleanup.h>
#include <linux/interrupt.h>
#include <linux/irq.h>
#include <linux/irq_sim.h>
#include <linux/irq_work.h>
#include <linux/slab.h>
struct irq_sim_work_ctx { … };
struct irq_sim_irq_ctx { … };
static void irq_sim_irqmask(struct irq_data *data)
{ … }
static void irq_sim_irqunmask(struct irq_data *data)
{ … }
static int irq_sim_set_type(struct irq_data *data, unsigned int type)
{ … }
static int irq_sim_get_irqchip_state(struct irq_data *data,
enum irqchip_irq_state which, bool *state)
{ … }
static int irq_sim_set_irqchip_state(struct irq_data *data,
enum irqchip_irq_state which, bool state)
{ … }
static int irq_sim_request_resources(struct irq_data *data)
{ … }
static void irq_sim_release_resources(struct irq_data *data)
{ … }
static struct irq_chip irq_sim_irqchip = …;
static void irq_sim_handle_irq(struct irq_work *work)
{ … }
static int irq_sim_domain_map(struct irq_domain *domain,
unsigned int virq, irq_hw_number_t hw)
{ … }
static void irq_sim_domain_unmap(struct irq_domain *domain, unsigned int virq)
{ … }
static const struct irq_domain_ops irq_sim_domain_ops = …;
struct irq_domain *irq_domain_create_sim(struct fwnode_handle *fwnode,
unsigned int num_irqs)
{ … }
EXPORT_SYMBOL_GPL(…);
struct irq_domain *irq_domain_create_sim_full(struct fwnode_handle *fwnode,
unsigned int num_irqs,
const struct irq_sim_ops *ops,
void *data)
{ … }
EXPORT_SYMBOL_GPL(…);
void irq_domain_remove_sim(struct irq_domain *domain)
{ … }
EXPORT_SYMBOL_GPL(…);
static void devm_irq_domain_remove_sim(void *data)
{ … }
struct irq_domain *devm_irq_domain_create_sim(struct device *dev,
struct fwnode_handle *fwnode,
unsigned int num_irqs)
{ … }
EXPORT_SYMBOL_GPL(…);
struct irq_domain *
devm_irq_domain_create_sim_full(struct device *dev,
struct fwnode_handle *fwnode,
unsigned int num_irqs,
const struct irq_sim_ops *ops,
void *data)
{ … }
EXPORT_SYMBOL_GPL(…);