Jay Chokshi | 24fc9b6 | 2011-07-18 10:51:05 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2011, Code Aurora Forum. All rights reserved. |
| 3 | * |
| 4 | * This program is free software; you can redistribute it and/or modify |
| 5 | * it under the terms of the GNU General Public License version 2 and |
| 6 | * only version 2 as published by the Free Software Foundation. |
| 7 | * |
| 8 | * This program is distributed in the hope that it will be useful, |
| 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 11 | * GNU General Public License for more details. |
| 12 | */ |
| 13 | /* |
| 14 | * Qualcomm PMIC 8821 driver header file |
| 15 | * |
| 16 | */ |
| 17 | |
| 18 | #ifndef __MFD_PM8821_H |
| 19 | #define __MFD_PM8821_H |
| 20 | |
| 21 | #include <linux/device.h> |
| 22 | #include <linux/mfd/pm8xxx/irq.h> |
| 23 | #include <linux/mfd/pm8xxx/mpp.h> |
| 24 | |
| 25 | #define PM8821_NR_IRQS (64) |
| 26 | #define PM8821_NR_MPPS (4) |
| 27 | |
| 28 | #define PM8821_MPP_BLOCK_START (16) |
| 29 | #define PM8821_IRQ_BLOCK_BIT(block, bit) ((block) * 8 + (bit)) |
| 30 | |
| 31 | /* MPPs [1,N] */ |
| 32 | #define PM8821_MPP_IRQ(base, mpp) ((base) + \ |
| 33 | PM8821_IRQ_BLOCK_BIT(PM8821_MPP_BLOCK_START, (mpp)-1)) |
| 34 | |
| 35 | /* PMIC Interrupts */ |
| 36 | |
| 37 | struct pm8821_platform_data { |
| 38 | int irq_base; |
| 39 | struct pm8xxx_irq_platform_data *irq_pdata; |
| 40 | struct pm8xxx_mpp_platform_data *mpp_pdata; |
| 41 | }; |
| 42 | |
| 43 | #endif |