pm8821-irq.h 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. /*
  2. * Copyright (c) 2012, The Linux Foundation. All rights reserved.
  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. #ifndef __MFD_PM8821_IRQ_H
  18. #define __MFD_PM8821_IRQ_H
  19. #include <linux/errno.h>
  20. #include <linux/err.h>
  21. #include <linux/mfd/pm8xxx/irq.h>
  22. #ifdef CONFIG_MFD_PM8821_IRQ
  23. int pm8821_get_irq_stat(struct pm_irq_chip *chip, int irq);
  24. struct pm_irq_chip *pm8821_irq_init(struct device *dev,
  25. const struct pm8xxx_irq_platform_data *pdata);
  26. int pm8821_irq_exit(struct pm_irq_chip *chip);
  27. #else
  28. static inline int pm8821_get_irq_stat(struct pm_irq_chip *chip, int irq)
  29. {
  30. return -ENXIO;
  31. }
  32. static inline struct pm_irq_chip *pm8821_irq_init(const struct device *dev,
  33. const struct pm8xxx_irq_platform_data *pdata)
  34. {
  35. return ERR_PTR(-ENXIO);
  36. }
  37. static inline int pm8821_irq_exit(struct pm_irq_chip *chip)
  38. {
  39. return -ENXIO;
  40. }
  41. #endif /* CONFIG_MFD_PM8821_IRQ */
  42. #endif /* __MFD_PM8821_IRQ_H */