linux/drivers/irqchip/irq-imx-intmux.c

// SPDX-License-Identifier: GPL-2.0
// Copyright 2017 NXP

/*                     INTMUX Block Diagram
 *
 *                               ________________
 * interrupt source #  0  +---->|                |
 *                        |     |                |
 * interrupt source #  1  +++-->|                |
 *            ...         | |   |   channel # 0  |--------->interrupt out # 0
 *            ...         | |   |                |
 *            ...         | |   |                |
 * interrupt source # X-1 +++-->|________________|
 *                        | | |
 *                        | | |
 *                        | | |  ________________
 *                        +---->|                |
 *                        | | | |                |
 *                        | +-->|                |
 *                        | | | |   channel # 1  |--------->interrupt out # 1
 *                        | | +>|                |
 *                        | | | |                |
 *                        | | | |________________|
 *                        | | |
 *                        | | |
 *                        | | |       ...
 *                        | | |       ...
 *                        | | |
 *                        | | |  ________________
 *                        +---->|                |
 *                          | | |                |
 *                          +-->|                |
 *                            | |   channel # N  |--------->interrupt out # N
 *                            +>|                |
 *                              |                |
 *                              |________________|
 *
 *
 * N: Interrupt Channel Instance Number (N=7)
 * X: Interrupt Source Number for each channel (X=32)
 *
 * The INTMUX interrupt multiplexer has 8 channels, each channel receives 32
 * interrupt sources and generates 1 interrupt output.
 *
 */

#include <linux/clk.h>
#include <linux/interrupt.h>
#include <linux/irq.h>
#include <linux/irqchip/chained_irq.h>
#include <linux/irqdomain.h>
#include <linux/kernel.h>
#include <linux/mod_devicetable.h>
#include <linux/of_irq.h>
#include <linux/platform_device.h>
#include <linux/spinlock.h>
#include <linux/pm_runtime.h>

#define CHANIER(n)
#define CHANIPR(n)

#define CHAN_MAX_NUM

struct intmux_irqchip_data {};

struct intmux_data {};

static void imx_intmux_irq_mask(struct irq_data *d)
{}

static void imx_intmux_irq_unmask(struct irq_data *d)
{}

static struct irq_chip imx_intmux_irq_chip __ro_after_init =;

static int imx_intmux_irq_map(struct irq_domain *h, unsigned int irq,
			      irq_hw_number_t hwirq)
{}

static int imx_intmux_irq_xlate(struct irq_domain *d, struct device_node *node,
				const u32 *intspec, unsigned int intsize,
				unsigned long *out_hwirq, unsigned int *out_type)
{}

static int imx_intmux_irq_select(struct irq_domain *d, struct irq_fwspec *fwspec,
				 enum irq_domain_bus_token bus_token)
{}

static const struct irq_domain_ops imx_intmux_domain_ops =;

static void imx_intmux_irq_handler(struct irq_desc *desc)
{}

static int imx_intmux_probe(struct platform_device *pdev)
{}

static void imx_intmux_remove(struct platform_device *pdev)
{}

#ifdef CONFIG_PM
static int imx_intmux_runtime_suspend(struct device *dev)
{}

static int imx_intmux_runtime_resume(struct device *dev)
{}
#endif

static const struct dev_pm_ops imx_intmux_pm_ops =;

static const struct of_device_id imx_intmux_id[] =;

static struct platform_driver imx_intmux_driver =;
builtin_platform_driver();