Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 1 | /* Copyright (c) 2010-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 __PMIC8901_H__ |
| 14 | #define __PMIC8901_H__ |
| 15 | /* |
| 16 | * Qualcomm PMIC8901 driver header file |
| 17 | * |
| 18 | */ |
| 19 | |
| 20 | #include <linux/irq.h> |
| 21 | #include <linux/mfd/core.h> |
Anirudh Ghayal | 9f77e96 | 2011-12-06 12:38:21 +0530 | [diff] [blame] | 22 | #include <linux/mfd/pm8xxx/irq.h> |
| 23 | #include <linux/mfd/pm8xxx/mpp.h> |
| 24 | #include <linux/mfd/pm8xxx/tm.h> |
| 25 | #include <linux/regulator/pmic8901-regulator.h> |
Anirudh Ghayal | 934b271 | 2011-12-13 12:49:51 +0530 | [diff] [blame] | 26 | #include <linux/mfd/pm8xxx/misc.h> |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 27 | |
| 28 | #define PM8901_IRQ_BLOCK_BIT(block, bit) ((block) * 8 + (bit)) |
| 29 | |
Anirudh Ghayal | 9f77e96 | 2011-12-06 12:38:21 +0530 | [diff] [blame] | 30 | #define PM8901_NR_IRQS 72 |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 31 | |
Anirudh Ghayal | 9f77e96 | 2011-12-06 12:38:21 +0530 | [diff] [blame] | 32 | /* PM8901 MPP */ |
| 33 | #define PM8901_MPP_BLOCK_START 6 |
| 34 | #define PM8901_MPPS 4 |
| 35 | |
| 36 | /* PM8901 IRQs */ |
| 37 | #define PM8901_MPP_IRQ(mpp) PM8901_IRQ_BLOCK_BIT(6, (mpp)) |
| 38 | #define PM8901_TEMPSTAT_IRQ PM8901_IRQ_BLOCK_BIT(6, 4) |
| 39 | #define PM8901_OVERTEMP_IRQ PM8901_IRQ_BLOCK_BIT(6, 5) |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 40 | |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 41 | struct pm8901_platform_data { |
Anirudh Ghayal | 934b271 | 2011-12-13 12:49:51 +0530 | [diff] [blame] | 42 | struct pm8xxx_irq_platform_data *irq_pdata; |
| 43 | struct pm8xxx_mpp_platform_data *mpp_pdata; |
| 44 | struct pm8xxx_misc_platform_data *misc_pdata; |
| 45 | struct pm8901_vreg_pdata *regulator_pdatas; |
| 46 | int num_regulators; |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 47 | }; |
| 48 | |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 49 | #endif /* __PMIC8901_H__ */ |