blob: 4d9b8b855ade50974cd1260321e5c911ef4b29d2 [file] [log] [blame]
Jay Chokshi9e3cbf72012-05-25 13:00:28 -07001/*
Duy Truonge833aca2013-02-12 13:35:08 -08002 * Copyright (c) 2012, The Linux Foundation. All rights reserved.
Jay Chokshi9e3cbf72012-05-25 13:00:28 -07003 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 and
6 * only version 2 as published by the Free Software Foundation.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 */
13/*
14 * Qualcomm PMIC irq 8821 driver header file
15 *
16 */
17
18#ifndef __MFD_PM8821_IRQ_H
19#define __MFD_PM8821_IRQ_H
20
21#include <linux/errno.h>
22#include <linux/err.h>
23#include <linux/mfd/pm8xxx/irq.h>
24
25#ifdef CONFIG_MFD_PM8821_IRQ
26int pm8821_get_irq_stat(struct pm_irq_chip *chip, int irq);
27struct pm_irq_chip *pm8821_irq_init(struct device *dev,
28 const struct pm8xxx_irq_platform_data *pdata);
29int pm8821_irq_exit(struct pm_irq_chip *chip);
30#else
31static inline int pm8821_get_irq_stat(struct pm_irq_chip *chip, int irq)
32{
33 return -ENXIO;
34}
35static inline struct pm_irq_chip *pm8821_irq_init(const struct device *dev,
36 const struct pm8xxx_irq_platform_data *pdata)
37{
38 return ERR_PTR(-ENXIO);
39}
40static inline int pm8821_irq_exit(struct pm_irq_chip *chip)
41{
42 return -ENXIO;
43}
44#endif /* CONFIG_MFD_PM8821_IRQ */
45#endif /* __MFD_PM8821_IRQ_H */