msm: 8064: Enable irq, gpio, and mpp for pm8921
Add platform data for irq, gpio, and mpp
Signed-off-by: Jay Chokshi <jchokshi@codeaurora.org>
diff --git a/arch/arm/mach-msm/board-apq8064.h b/arch/arm/mach-msm/board-apq8064.h
index 39513db..2728914 100644
--- a/arch/arm/mach-msm/board-apq8064.h
+++ b/arch/arm/mach-msm/board-apq8064.h
@@ -15,6 +15,13 @@
#include <linux/mfd/pm8xxx/pm8921.h>
+/* Macros assume PMIC GPIOs and MPPs start at 1 */
+#define PM8921_GPIO_BASE NR_GPIO_IRQS
+#define PM8921_GPIO_PM_TO_SYS(pm_gpio) (pm_gpio - 1 + PM8921_GPIO_BASE)
+#define PM8921_MPP_BASE (PM8921_GPIO_BASE + PM8921_NR_GPIOS)
+#define PM8921_MPP_PM_TO_SYS(pm_mpp) (pm_mpp - 1 + PM8921_MPP_BASE)
+#define PM8921_IRQ_BASE (NR_MSM_IRQS + NR_GPIO_IRQS)
+
extern struct pm8921_regulator_platform_data
msm8064_pm8921_regulator_pdata[] __devinitdata;