diff options
| author | Sachin Kamat <sachin.kamat@linaro.org> | 2014-03-14 07:51:57 -0400 |
|---|---|---|
| committer | Lee Jones <lee.jones@linaro.org> | 2014-03-18 06:56:17 -0400 |
| commit | ce24991e1e4d7bee05bcc0e156b0b1c2ef791dd3 (patch) | |
| tree | 385fd59e3e0f233b43e9180ca2eb01d61c9760d5 /include/linux/mfd/samsung | |
| parent | 8f695de515b9e08e30c5b7fae48c0672c8361c51 (diff) | |
mfd: Add support for S2MPA01 device
Add the necessary entries required for S2MPA01 multi-function
device. While at it also convert whitespaces to tabs in core.h.
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Diffstat (limited to 'include/linux/mfd/samsung')
| -rw-r--r-- | include/linux/mfd/samsung/core.h | 16 | ||||
| -rw-r--r-- | include/linux/mfd/samsung/irq.h | 50 | ||||
| -rw-r--r-- | include/linux/mfd/samsung/s2mpa01.h | 192 |
3 files changed, 253 insertions, 5 deletions
diff --git a/include/linux/mfd/samsung/core.h b/include/linux/mfd/samsung/core.h index 5073d81660e7..900bc9e1888b 100644 --- a/include/linux/mfd/samsung/core.h +++ b/include/linux/mfd/samsung/core.h | |||
| @@ -18,6 +18,7 @@ enum sec_device_type { | |||
| 18 | S5M8751X, | 18 | S5M8751X, |
| 19 | S5M8763X, | 19 | S5M8763X, |
| 20 | S5M8767X, | 20 | S5M8767X, |
| 21 | S2MPA01, | ||
| 21 | S2MPS11X, | 22 | S2MPS11X, |
| 22 | S2MPS14X, | 23 | S2MPS14X, |
| 23 | }; | 24 | }; |
| @@ -93,7 +94,7 @@ struct sec_platform_data { | |||
| 93 | int buck3_default_idx; | 94 | int buck3_default_idx; |
| 94 | int buck4_default_idx; | 95 | int buck4_default_idx; |
| 95 | 96 | ||
| 96 | int buck_ramp_delay; | 97 | int buck_ramp_delay; |
| 97 | 98 | ||
| 98 | int buck2_ramp_delay; | 99 | int buck2_ramp_delay; |
| 99 | int buck34_ramp_delay; | 100 | int buck34_ramp_delay; |
| @@ -101,10 +102,15 @@ struct sec_platform_data { | |||
| 101 | int buck16_ramp_delay; | 102 | int buck16_ramp_delay; |
| 102 | int buck7810_ramp_delay; | 103 | int buck7810_ramp_delay; |
| 103 | int buck9_ramp_delay; | 104 | int buck9_ramp_delay; |
| 104 | 105 | int buck24_ramp_delay; | |
| 105 | bool buck2_ramp_enable; | 106 | int buck3_ramp_delay; |
| 106 | bool buck3_ramp_enable; | 107 | int buck7_ramp_delay; |
| 107 | bool buck4_ramp_enable; | 108 | int buck8910_ramp_delay; |
| 109 | |||
| 110 | bool buck1_ramp_enable; | ||
| 111 | bool buck2_ramp_enable; | ||
| 112 | bool buck3_ramp_enable; | ||
| 113 | bool buck4_ramp_enable; | ||
| 108 | bool buck6_ramp_enable; | 114 | bool buck6_ramp_enable; |
| 109 | 115 | ||
| 110 | int buck2_init; | 116 | int buck2_init; |
diff --git a/include/linux/mfd/samsung/irq.h b/include/linux/mfd/samsung/irq.h index 0065f6f1daf4..1224f447356b 100644 --- a/include/linux/mfd/samsung/irq.h +++ b/include/linux/mfd/samsung/irq.h | |||
| @@ -13,6 +13,56 @@ | |||
| 13 | #ifndef __LINUX_MFD_SEC_IRQ_H | 13 | #ifndef __LINUX_MFD_SEC_IRQ_H |
| 14 | #define __LINUX_MFD_SEC_IRQ_H | 14 | #define __LINUX_MFD_SEC_IRQ_H |
| 15 | 15 | ||
| 16 | enum s2mpa01_irq { | ||
| 17 | S2MPA01_IRQ_PWRONF, | ||
| 18 | S2MPA01_IRQ_PWRONR, | ||
| 19 | S2MPA01_IRQ_JIGONBF, | ||
| 20 | S2MPA01_IRQ_JIGONBR, | ||
| 21 | S2MPA01_IRQ_ACOKBF, | ||
| 22 | S2MPA01_IRQ_ACOKBR, | ||
| 23 | S2MPA01_IRQ_PWRON1S, | ||
| 24 | S2MPA01_IRQ_MRB, | ||
| 25 | |||
| 26 | S2MPA01_IRQ_RTC60S, | ||
| 27 | S2MPA01_IRQ_RTCA1, | ||
| 28 | S2MPA01_IRQ_RTCA0, | ||
| 29 | S2MPA01_IRQ_SMPL, | ||
| 30 | S2MPA01_IRQ_RTC1S, | ||
| 31 | S2MPA01_IRQ_WTSR, | ||
| 32 | |||
| 33 | S2MPA01_IRQ_INT120C, | ||
| 34 | S2MPA01_IRQ_INT140C, | ||
| 35 | S2MPA01_IRQ_LDO3_TSD, | ||
| 36 | S2MPA01_IRQ_B16_TSD, | ||
| 37 | S2MPA01_IRQ_B24_TSD, | ||
| 38 | S2MPA01_IRQ_B35_TSD, | ||
| 39 | |||
| 40 | S2MPA01_IRQ_NR, | ||
| 41 | }; | ||
| 42 | |||
| 43 | #define S2MPA01_IRQ_PWRONF_MASK (1 << 0) | ||
| 44 | #define S2MPA01_IRQ_PWRONR_MASK (1 << 1) | ||
| 45 | #define S2MPA01_IRQ_JIGONBF_MASK (1 << 2) | ||
| 46 | #define S2MPA01_IRQ_JIGONBR_MASK (1 << 3) | ||
| 47 | #define S2MPA01_IRQ_ACOKBF_MASK (1 << 4) | ||
| 48 | #define S2MPA01_IRQ_ACOKBR_MASK (1 << 5) | ||
| 49 | #define S2MPA01_IRQ_PWRON1S_MASK (1 << 6) | ||
| 50 | #define S2MPA01_IRQ_MRB_MASK (1 << 7) | ||
| 51 | |||
| 52 | #define S2MPA01_IRQ_RTC60S_MASK (1 << 0) | ||
| 53 | #define S2MPA01_IRQ_RTCA1_MASK (1 << 1) | ||
| 54 | #define S2MPA01_IRQ_RTCA0_MASK (1 << 2) | ||
| 55 | #define S2MPA01_IRQ_SMPL_MASK (1 << 3) | ||
| 56 | #define S2MPA01_IRQ_RTC1S_MASK (1 << 4) | ||
| 57 | #define S2MPA01_IRQ_WTSR_MASK (1 << 5) | ||
| 58 | |||
| 59 | #define S2MPA01_IRQ_INT120C_MASK (1 << 0) | ||
| 60 | #define S2MPA01_IRQ_INT140C_MASK (1 << 1) | ||
| 61 | #define S2MPA01_IRQ_LDO3_TSD_MASK (1 << 2) | ||
| 62 | #define S2MPA01_IRQ_B16_TSD_MASK (1 << 3) | ||
| 63 | #define S2MPA01_IRQ_B24_TSD_MASK (1 << 4) | ||
| 64 | #define S2MPA01_IRQ_B35_TSD_MASK (1 << 5) | ||
| 65 | |||
| 16 | enum s2mps11_irq { | 66 | enum s2mps11_irq { |
| 17 | S2MPS11_IRQ_PWRONF, | 67 | S2MPS11_IRQ_PWRONF, |
| 18 | S2MPS11_IRQ_PWRONR, | 68 | S2MPS11_IRQ_PWRONR, |
diff --git a/include/linux/mfd/samsung/s2mpa01.h b/include/linux/mfd/samsung/s2mpa01.h new file mode 100644 index 000000000000..fbc63bc0d6a2 --- /dev/null +++ b/include/linux/mfd/samsung/s2mpa01.h | |||
| @@ -0,0 +1,192 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (c) 2013 Samsung Electronics Co., Ltd | ||
| 3 | * http://www.samsung.com | ||
| 4 | * | ||
| 5 | * This program is free software; you can redistribute it and/or modify it | ||
| 6 | * under the terms of the GNU General Public License as published by the | ||
| 7 | * Free Software Foundation; either version 2 of the License, or (at your | ||
| 8 | * option) any later version. | ||
| 9 | * | ||
| 10 | */ | ||
| 11 | |||
| 12 | #ifndef __LINUX_MFD_S2MPA01_H | ||
| 13 | #define __LINUX_MFD_S2MPA01_H | ||
| 14 | |||
| 15 | /* S2MPA01 registers */ | ||
| 16 | enum s2mpa01_reg { | ||
| 17 | S2MPA01_REG_ID, | ||
| 18 | S2MPA01_REG_INT1, | ||
| 19 | S2MPA01_REG_INT2, | ||
| 20 | S2MPA01_REG_INT3, | ||
| 21 | S2MPA01_REG_INT1M, | ||
| 22 | S2MPA01_REG_INT2M, | ||
| 23 | S2MPA01_REG_INT3M, | ||
| 24 | S2MPA01_REG_ST1, | ||
| 25 | S2MPA01_REG_ST2, | ||
| 26 | S2MPA01_REG_PWRONSRC, | ||
| 27 | S2MPA01_REG_OFFSRC, | ||
| 28 | S2MPA01_REG_RTC_BUF, | ||
| 29 | S2MPA01_REG_CTRL1, | ||
| 30 | S2MPA01_REG_ETC_TEST, | ||
| 31 | S2MPA01_REG_RSVD1, | ||
| 32 | S2MPA01_REG_BU_CHG, | ||
| 33 | S2MPA01_REG_RAMP1, | ||
| 34 | S2MPA01_REG_RAMP2, | ||
| 35 | S2MPA01_REG_LDO_DSCH1, | ||
| 36 | S2MPA01_REG_LDO_DSCH2, | ||
| 37 | S2MPA01_REG_LDO_DSCH3, | ||
| 38 | S2MPA01_REG_LDO_DSCH4, | ||
| 39 | S2MPA01_REG_OTP_ADRL, | ||
| 40 | S2MPA01_REG_OTP_ADRH, | ||
| 41 | S2MPA01_REG_OTP_DATA, | ||
| 42 | S2MPA01_REG_MON1SEL, | ||
| 43 | S2MPA01_REG_MON2SEL, | ||
| 44 | S2MPA01_REG_LEE, | ||
| 45 | S2MPA01_REG_RSVD2, | ||
| 46 | S2MPA01_REG_RSVD3, | ||
| 47 | S2MPA01_REG_RSVD4, | ||
| 48 | S2MPA01_REG_RSVD5, | ||
| 49 | S2MPA01_REG_RSVD6, | ||
| 50 | S2MPA01_REG_TOP_RSVD, | ||
| 51 | S2MPA01_REG_DVS_SEL, | ||
| 52 | S2MPA01_REG_DVS_PTR, | ||
| 53 | S2MPA01_REG_DVS_DATA, | ||
| 54 | S2MPA01_REG_RSVD_NO, | ||
| 55 | S2MPA01_REG_UVLO, | ||
| 56 | S2MPA01_REG_LEE_NO, | ||
| 57 | S2MPA01_REG_B1CTRL1, | ||
| 58 | S2MPA01_REG_B1CTRL2, | ||
| 59 | S2MPA01_REG_B2CTRL1, | ||
| 60 | S2MPA01_REG_B2CTRL2, | ||
| 61 | S2MPA01_REG_B3CTRL1, | ||
| 62 | S2MPA01_REG_B3CTRL2, | ||
| 63 | S2MPA01_REG_B4CTRL1, | ||
| 64 | S2MPA01_REG_B4CTRL2, | ||
| 65 | S2MPA01_REG_B5CTRL1, | ||
| 66 | S2MPA01_REG_B5CTRL2, | ||
| 67 | S2MPA01_REG_B5CTRL3, | ||
| 68 | S2MPA01_REG_B5CTRL4, | ||
| 69 | S2MPA01_REG_B5CTRL5, | ||
| 70 | S2MPA01_REG_B5CTRL6, | ||
| 71 | S2MPA01_REG_B6CTRL1, | ||
| 72 | S2MPA01_REG_B6CTRL2, | ||
| 73 | S2MPA01_REG_B7CTRL1, | ||
| 74 | S2MPA01_REG_B7CTRL2, | ||
| 75 | S2MPA01_REG_B8CTRL1, | ||
| 76 | S2MPA01_REG_B8CTRL2, | ||
| 77 | S2MPA01_REG_B9CTRL1, | ||
| 78 | S2MPA01_REG_B9CTRL2, | ||
| 79 | S2MPA01_REG_B10CTRL1, | ||
| 80 | S2MPA01_REG_B10CTRL2, | ||
| 81 | S2MPA01_REG_L1CTRL, | ||
| 82 | S2MPA01_REG_L2CTRL, | ||
| 83 | S2MPA01_REG_L3CTRL, | ||
| 84 | S2MPA01_REG_L4CTRL, | ||
| 85 | S2MPA01_REG_L5CTRL, | ||
| 86 | S2MPA01_REG_L6CTRL, | ||
| 87 | S2MPA01_REG_L7CTRL, | ||
| 88 | S2MPA01_REG_L8CTRL, | ||
| 89 | S2MPA01_REG_L9CTRL, | ||
| 90 | S2MPA01_REG_L10CTRL, | ||
| 91 | S2MPA01_REG_L11CTRL, | ||
| 92 | S2MPA01_REG_L12CTRL, | ||
| 93 | S2MPA01_REG_L13CTRL, | ||
