pmic8901.h 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. /* Copyright (c) 2010-2011, The Linux Foundation. All rights reserved.
  2. *
  3. * This program is free software; you can redistribute it and/or modify
  4. * it under the terms of the GNU General Public License version 2 and
  5. * only version 2 as published by the Free Software Foundation.
  6. *
  7. * This program is distributed in the hope that it will be useful,
  8. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  10. * GNU General Public License for more details.
  11. *
  12. */
  13. #ifndef __PMIC8901_H__
  14. #define __PMIC8901_H__
  15. /*
  16. * Qualcomm PMIC8901 driver header file
  17. *
  18. */
  19. #include <linux/irq.h>
  20. #include <linux/mfd/core.h>
  21. #include <linux/mfd/pm8xxx/irq.h>
  22. #include <linux/mfd/pm8xxx/mpp.h>
  23. #include <linux/mfd/pm8xxx/tm.h>
  24. #include <linux/regulator/pmic8901-regulator.h>
  25. #include <linux/mfd/pm8xxx/misc.h>
  26. #define PM8901_IRQ_BLOCK_BIT(block, bit) ((block) * 8 + (bit))
  27. #define PM8901_NR_IRQS 72
  28. /* PM8901 MPP */
  29. #define PM8901_MPP_BLOCK_START 6
  30. #define PM8901_MPPS 4
  31. /* PM8901 IRQs */
  32. #define PM8901_MPP_IRQ(mpp) PM8901_IRQ_BLOCK_BIT(6, (mpp))
  33. #define PM8901_TEMPSTAT_IRQ PM8901_IRQ_BLOCK_BIT(6, 4)
  34. #define PM8901_OVERTEMP_IRQ PM8901_IRQ_BLOCK_BIT(6, 5)
  35. struct pm8901_platform_data {
  36. struct pm8xxx_irq_platform_data *irq_pdata;
  37. struct pm8xxx_mpp_platform_data *mpp_pdata;
  38. struct pm8xxx_misc_platform_data *misc_pdata;
  39. struct pm8901_vreg_pdata *regulator_pdatas;
  40. int num_regulators;
  41. };
  42. #endif /* __PMIC8901_H__ */