linux/drivers/mfd/twl6030-irq.c

// SPDX-License-Identifier: GPL-2.0-or-later
/*
 * twl6030-irq.c - TWL6030 irq support
 *
 * Copyright (C) 2005-2009 Texas Instruments, Inc.
 *
 * Modifications to defer interrupt handling to a kernel thread:
 * Copyright (C) 2006 MontaVista Software, Inc.
 *
 * Based on tlv320aic23.c:
 * Copyright (c) by Kai Svahn <[email protected]>
 *
 * Code cleanup and modifications to IRQ handler.
 * by syed khasim <[email protected]>
 *
 * TWL6030 specific code and IRQ handling changes by
 * Jagadeesh Bhaskar Pakaravoor <[email protected]>
 * Balaji T K <[email protected]>
 */

#include <linux/export.h>
#include <linux/interrupt.h>
#include <linux/irq.h>
#include <linux/kthread.h>
#include <linux/mfd/twl.h>
#include <linux/platform_device.h>
#include <linux/suspend.h>
#include <linux/of.h>
#include <linux/irqdomain.h>
#include <linux/of_device.h>

#include "twl-core.h"

/*
 * TWL6030 (unlike its predecessors, which had two level interrupt handling)
 * three interrupt registers INT_STS_A, INT_STS_B and INT_STS_C.
 * It exposes status bits saying who has raised an interrupt. There are
 * three mask registers that corresponds to these status registers, that
 * enables/disables these interrupts.
 *
 * We set up IRQs starting at a platform-specified base. An interrupt map table,
 * specifies mapping between interrupt number and the associated module.
 */
#define TWL6030_NR_IRQS

static int twl6030_interrupt_mapping[24] =;

static int twl6032_interrupt_mapping[24] =;

/*----------------------------------------------------------------------*/

struct twl6030_irq {};

static struct twl6030_irq *twl6030_irq;

static int twl6030_irq_pm_notifier(struct notifier_block *notifier,
				   unsigned long pm_event, void *unused)
{}

/*
* Threaded irq handler for the twl6030 interrupt.
* We query the interrupt controller in the twl6030 to determine
* which module is generating the interrupt request and call
* handle_nested_irq for that module.
*/
static irqreturn_t twl6030_irq_thread(int irq, void *data)
{}

/*----------------------------------------------------------------------*/

static int twl6030_irq_set_wake(struct irq_data *d, unsigned int on)
{}

int twl6030_interrupt_unmask(u8 bit_mask, u8 offset)
{}
EXPORT_SYMBOL();

int twl6030_interrupt_mask(u8 bit_mask, u8 offset)
{}
EXPORT_SYMBOL();

int twl6030_mmc_card_detect_config(void)
{}
EXPORT_SYMBOL();

int twl6030_mmc_card_detect(struct device *dev, int slot)
{}
EXPORT_SYMBOL();

static int twl6030_irq_map(struct irq_domain *d, unsigned int virq,
			      irq_hw_number_t hwirq)
{}

static void twl6030_irq_unmap(struct irq_domain *d, unsigned int virq)
{}

static const struct irq_domain_ops twl6030_irq_domain_ops =;

static const struct of_device_id twl6030_of_match[] __maybe_unused =;

int twl6030_init_irq(struct device *dev, int irq_num)
{}

void twl6030_exit_irq(void)
{}