Jay Chokshi | 9e3cbf7 | 2012-05-25 13:00:28 -0700 | [diff] [blame] | 1 | /* |
Duy Truong | e833aca | 2013-02-12 13:35:08 -0800 | [diff] [blame] | 2 | * Copyright (c) 2012, The Linux Foundation. All rights reserved. |
Jay Chokshi | 9e3cbf7 | 2012-05-25 13:00:28 -0700 | [diff] [blame] | 3 | * |
| 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 |
| 26 | int pm8821_get_irq_stat(struct pm_irq_chip *chip, int irq); |
| 27 | struct pm_irq_chip *pm8821_irq_init(struct device *dev, |
| 28 | const struct pm8xxx_irq_platform_data *pdata); |
| 29 | int pm8821_irq_exit(struct pm_irq_chip *chip); |
| 30 | #else |
| 31 | static inline int pm8821_get_irq_stat(struct pm_irq_chip *chip, int irq) |
| 32 | { |
| 33 | return -ENXIO; |
| 34 | } |
| 35 | static 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 | } |
| 40 | static 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 */ |