core.h 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. /*
  2. * Copyright (c) 2014 MediaTek Inc.
  3. * Author: Flora Fu, MediaTek
  4. *
  5. * This program is free software; you can redistribute it and/or modify
  6. * it under the terms of the GNU General Public License version 2 as
  7. * published by the Free Software Foundation.
  8. *
  9. * This program is distributed in the hope that it will be useful,
  10. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. * GNU General Public License for more details.
  13. */
  14. #ifndef __MFD_MT6323_CORE_H__
  15. #define __MFD_MT6323_CORE_H__
  16. enum mt6323_irq_numbers {
  17. MT6323_IRQ_SPKL_AB = 0,
  18. MT6323_IRQ_SPKR_AB,
  19. MT6323_IRQ_SPKL,
  20. MT6323_IRQ_SPKR,
  21. MT6323_IRQ_BAT_L,
  22. MT6323_IRQ_BAT_H,
  23. MT6323_IRQ_FG_BAT_L,
  24. MT6323_IRQ_FG_BAT_H,
  25. MT6323_IRQ_WATCHDOG,
  26. MT6323_IRQ_PWRKEY,
  27. MT6323_IRQ_THR_L,
  28. MT6323_IRQ_THR_H,
  29. MT6323_IRQ_VBATON_UNDET,
  30. MT6323_IRQ_BVALID_DET,
  31. MT6323_IRQ_CHRDET,
  32. MT6323_IRQ_OV,
  33. MT6323_IRQ_LDO,
  34. MT6323_IRQ_HOMEKEY,
  35. MT6323_IRQ_ACCDET,
  36. MT6323_IRQ_AUDIO,
  37. MT6323_IRQ_RTC,
  38. MT6323_IRQ_PWRKEY_RSTB,
  39. MT6323_IRQ_HDMI_SIFM,
  40. MT6323_IRQ_HDMI_CEC,
  41. MT6323_IRQ_VCA15,
  42. MT6323_IRQ_VSRMCA15,
  43. MT6323_IRQ_VCORE,
  44. MT6323_IRQ_VGPU,
  45. MT6323_IRQ_VIO18,
  46. MT6323_IRQ_VPCA7,
  47. MT6323_IRQ_VSRMCA7,
  48. MT6323_IRQ_VDRM,
  49. MT6323_IRQ_NR,
  50. };
  51. struct mt6323_chip {
  52. struct device *dev;
  53. struct regmap *regmap;
  54. int irq;
  55. struct irq_domain *irq_domain;
  56. struct mutex irqlock;
  57. u16 irq_masks_cur[2];
  58. u16 irq_masks_cache[2];
  59. };
  60. #endif /* __MFD_MT6323_CORE_H__ */