msm: 9615: Add support for PMIC PM8018
Add device structure declarations to the 9615 board file for the
PMIC PM8018 core and its subdevices.
Signed-off-by: David Collins <collinsd@codeaurora.org>
diff --git a/arch/arm/mach-msm/board-9615.h b/arch/arm/mach-msm/board-9615.h
new file mode 100644
index 0000000..16c5187
--- /dev/null
+++ b/arch/arm/mach-msm/board-9615.h
@@ -0,0 +1,27 @@
+/* Copyright (c) 2011, Code Aurora Forum. All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 and
+ * only version 2 as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ */
+
+#ifndef __ARCH_ARM_MACH_MSM_BOARD_9615_H
+#define __ARCH_ARM_MACH_MSM_BOARD_9615_H
+
+#include <mach/irqs.h>
+#include <linux/mfd/pm8xxx/pm8018.h>
+
+/* Macros assume PMIC GPIOs and MPPs start at 1 */
+#define PM8018_GPIO_BASE NR_GPIO_IRQS
+#define PM8018_GPIO_PM_TO_SYS(pm_gpio) (pm_gpio - 1 + PM8018_GPIO_BASE)
+#define PM8018_MPP_BASE (PM8018_GPIO_BASE + PM8018_NR_GPIOS)
+#define PM8018_MPP_PM_TO_SYS(pm_gpio) (pm_gpio - 1 + PM8018_MPP_BASE)
+#define PM8018_IRQ_BASE (NR_MSM_IRQS + NR_GPIO_IRQS)
+#define PM8018_MPP_IRQ_BASE (PM8018_IRQ_BASE + NR_GPIO_IRQS)
+
+#endif