Anirudh Ghayal | 9f77e96 | 2011-12-06 12:38:21 +0530 | [diff] [blame^] | 1 | /* Copyright (c) 2011, Code Aurora Forum. 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 __ARCH_ARM_MACH_MSM_BOARD_MSM8660_H |
| 14 | #define __ARCH_ARM_MACH_MSM_BOARD_MSM8660_H |
| 15 | |
| 16 | #include <linux/mfd/pmic8058.h> |
| 17 | #include <linux/mfd/pmic8901.h> |
| 18 | #include <mach/irqs.h> |
| 19 | |
| 20 | /* Macros assume PMIC GPIOs start at 0 */ |
| 21 | #define PM8058_GPIO_BASE NR_MSM_GPIOS |
| 22 | #define PM8058_GPIO_PM_TO_SYS(pm_gpio) (pm_gpio + PM8058_GPIO_BASE) |
| 23 | #define PM8058_GPIO_SYS_TO_PM(sys_gpio) (sys_gpio - PM8058_GPIO_BASE) |
| 24 | #define PM8058_MPP_BASE (PM8058_GPIO_BASE + PM8058_GPIOS) |
| 25 | #define PM8058_MPP_PM_TO_SYS(pm_gpio) (pm_gpio + PM8058_MPP_BASE) |
| 26 | #define PM8058_MPP_SYS_TO_PM(sys_gpio) (sys_gpio - PM8058_MPP_BASE) |
| 27 | #define PM8058_IRQ_BASE (NR_MSM_IRQS + NR_GPIO_IRQS) |
| 28 | |
| 29 | #define PM8901_MPP_BASE (PM8058_GPIO_BASE + \ |
| 30 | PM8058_GPIOS + PM8058_MPPS) |
| 31 | #define PM8901_MPP_PM_TO_SYS(pm_gpio) (pm_gpio + PM8901_MPP_BASE) |
| 32 | #define PM8901_MPP_SYS_TO_PM(sys_gpio) (sys_gpio - PM901_MPP_BASE) |
| 33 | #define PM8901_IRQ_BASE (PM8058_IRQ_BASE + \ |
| 34 | NR_PMIC8058_IRQS) |
| 35 | |
| 36 | #endif |