linux/kernel/irq/irq_sim.c

// SPDX-License-Identifier: GPL-2.0+
/*
 * Copyright (C) 2017-2018 Bartosz Golaszewski <[email protected]>
 * Copyright (C) 2020 Bartosz Golaszewski <[email protected]>
 */

#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 =;

/**
 * irq_domain_create_sim - Create a new interrupt simulator irq_domain and
 *                         allocate a range of dummy interrupts.
 *
 * @fwnode:     struct fwnode_handle to be associated with this domain.
 * @num_irqs:   Number of interrupts to allocate.
 *
 * On success: return a new irq_domain object.
 * On failure: a negative errno wrapped with ERR_PTR().
 */
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();

/**
 * irq_domain_remove_sim - Deinitialize the interrupt simulator domain: free
 *                         the interrupt descriptors and allocated memory.
 *
 * @domain:     The interrupt simulator domain to tear down.
 */
void irq_domain_remove_sim(struct irq_domain *domain)
{}
EXPORT_SYMBOL_GPL();

static void devm_irq_domain_remove_sim(void *data)
{}

/**
 * devm_irq_domain_create_sim - Create a new interrupt simulator for
 *                              a managed device.
 *
 * @dev:        Device to initialize the simulator object for.
 * @fwnode:     struct fwnode_handle to be associated with this domain.
 * @num_irqs:   Number of interrupts to allocate
 *
 * On success: return a new irq_domain object.
 * On failure: a negative errno wrapped with ERR_PTR().
 */
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();