linux/drivers/irqchip/irq-sp7021-intc.c

// SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
/*
 * Copyright (C) Sunplus Technology Co., Ltd.
 *       All rights reserved.
 */
#include <linux/irq.h>
#include <linux/irqdomain.h>
#include <linux/io.h>
#include <linux/irqchip.h>
#include <linux/irqchip/chained_irq.h>
#include <linux/of_address.h>
#include <linux/of_irq.h>

#define SP_INTC_HWIRQ_MIN
#define SP_INTC_HWIRQ_MAX

#define SP_INTC_NR_IRQS
#define SP_INTC_NR_GROUPS
#define SP_INTC_REG_SIZE

/* REG_GROUP_0 regs */
#define REG_INTR_TYPE
#define REG_INTR_POLARITY
#define REG_INTR_PRIORITY
#define REG_INTR_MASK

/* REG_GROUP_1 regs */
#define REG_INTR_CLEAR
#define REG_MASKED_EXT1
#define REG_MASKED_EXT0
#define REG_INTR_GROUP

#define GROUP_MASK
#define GROUP_SHIFT_EXT1
#define GROUP_SHIFT_EXT0

/*
 * When GPIO_INT0~7 set to edge trigger, doesn't work properly.
 * WORKAROUND: change it to level trigger, and toggle the polarity
 * at ACK/Handler to make the HW work.
 */
#define GPIO_INT0_HWIRQ
#define GPIO_INT7_HWIRQ
#define IS_GPIO_INT(irq)

/* index of states */
enum {};

#define STATE_BIT(irq, idx)
#define ASSIGN_STATE(irq, idx, v)
#define TEST_STATE(irq, idx)

static struct sp_intctl {} sp_intc;

static struct irq_chip sp_intc_chip;

static void sp_intc_assign_bit(u32 hwirq, void __iomem *base, bool value)
{}

static void sp_intc_ack_irq(struct irq_data *d)
{}

static void sp_intc_mask_irq(struct irq_data *d)
{}

static void sp_intc_unmask_irq(struct irq_data *d)
{}

static int sp_intc_set_type(struct irq_data *d, unsigned int type)
{}

static int sp_intc_get_ext_irq(int ext_num)
{}

static void sp_intc_handle_ext_cascaded(struct irq_desc *desc)
{}

static struct irq_chip sp_intc_chip =;

static int sp_intc_irq_domain_map(struct irq_domain *domain,
				  unsigned int irq, irq_hw_number_t hwirq)
{}

static const struct irq_domain_ops sp_intc_dm_ops =;

static int sp_intc_irq_map(struct device_node *node, int i)
{}

static int __init sp_intc_init_dt(struct device_node *node, struct device_node *parent)
{}

IRQCHIP_DECLARE(sp_intc, "sunplus,sp7021-intc", sp_intc_init_dt);