18c2ecf20Sopenharmony_ci// SPDX-License-Identifier: GPL-2.0-or-later 28c2ecf20Sopenharmony_ci/* 38c2ecf20Sopenharmony_ci * Copyright (C) BitBox Ltd 2010 48c2ecf20Sopenharmony_ci */ 58c2ecf20Sopenharmony_ci 68c2ecf20Sopenharmony_ci#include <linux/module.h> 78c2ecf20Sopenharmony_ci#include <linux/irq.h> 88c2ecf20Sopenharmony_ci#include <linux/platform_data/asoc-imx-ssi.h> 98c2ecf20Sopenharmony_ci 108c2ecf20Sopenharmony_ci#include "irq-common.h" 118c2ecf20Sopenharmony_ci 128c2ecf20Sopenharmony_ciint mxc_set_irq_fiq(unsigned int irq, unsigned int type) 138c2ecf20Sopenharmony_ci{ 148c2ecf20Sopenharmony_ci struct irq_chip_generic *gc; 158c2ecf20Sopenharmony_ci struct mxc_extra_irq *exirq; 168c2ecf20Sopenharmony_ci int ret; 178c2ecf20Sopenharmony_ci 188c2ecf20Sopenharmony_ci ret = -ENOSYS; 198c2ecf20Sopenharmony_ci 208c2ecf20Sopenharmony_ci gc = irq_get_chip_data(irq); 218c2ecf20Sopenharmony_ci if (gc && gc->private) { 228c2ecf20Sopenharmony_ci exirq = gc->private; 238c2ecf20Sopenharmony_ci if (exirq->set_irq_fiq) { 248c2ecf20Sopenharmony_ci struct irq_data *d = irq_get_irq_data(irq); 258c2ecf20Sopenharmony_ci ret = exirq->set_irq_fiq(irqd_to_hwirq(d), type); 268c2ecf20Sopenharmony_ci } 278c2ecf20Sopenharmony_ci } 288c2ecf20Sopenharmony_ci 298c2ecf20Sopenharmony_ci return ret; 308c2ecf20Sopenharmony_ci} 318c2ecf20Sopenharmony_ciEXPORT_SYMBOL(mxc_set_irq_fiq); 32