diff options
Diffstat (limited to 'include/linux/mfd')
-rw-r--r-- | include/linux/mfd/88pm860x.h | 2 | ||||
-rw-r--r-- | include/linux/mfd/ab8500.h | 28 | ||||
-rw-r--r-- | include/linux/mfd/abx500.h | 4 | ||||
-rw-r--r-- | include/linux/mfd/core.h | 3 | ||||
-rw-r--r-- | include/linux/mfd/max8998-private.h | 129 | ||||
-rw-r--r-- | include/linux/mfd/max8998.h | 23 | ||||
-rw-r--r-- | include/linux/mfd/mc13783.h | 239 | ||||
-rw-r--r-- | include/linux/mfd/mc13xxx.h | 154 | ||||
-rw-r--r-- | include/linux/mfd/pcf50633/core.h | 7 | ||||
-rw-r--r-- | include/linux/mfd/sh_mobile_sdhi.h | 2 | ||||
-rw-r--r-- | include/linux/mfd/stmpe.h | 6 | ||||
-rw-r--r-- | include/linux/mfd/tc35892.h | 4 | ||||
-rw-r--r-- | include/linux/mfd/tmio.h | 6 | ||||
-rw-r--r-- | include/linux/mfd/tps6586x.h | 31 | ||||
-rw-r--r-- | include/linux/mfd/wm831x/core.h | 12 |
15 files changed, 465 insertions, 185 deletions
diff --git a/include/linux/mfd/88pm860x.h b/include/linux/mfd/88pm860x.h index bfd23bef7363..4db1fbd8969e 100644 --- a/include/linux/mfd/88pm860x.h +++ b/include/linux/mfd/88pm860x.h | |||
@@ -138,7 +138,7 @@ enum { | |||
138 | PM8607_ID_RG_MAX, | 138 | PM8607_ID_RG_MAX, |
139 | }; | 139 | }; |
140 | 140 | ||
141 | #define PM8607_VERSION (0x40) /* 8607 chip ID */ | 141 | /* 8607 chip ID is 0x40 or 0x50 */ |
142 | #define PM8607_VERSION_MASK (0xF0) /* 8607 chip ID mask */ | 142 | #define PM8607_VERSION_MASK (0xF0) /* 8607 chip ID mask */ |
143 | 143 | ||
144 | /* Interrupt Registers */ | 144 | /* Interrupt Registers */ |
diff --git a/include/linux/mfd/ab8500.h b/include/linux/mfd/ab8500.h index f5cec4500f38..d63b6050b183 100644 --- a/include/linux/mfd/ab8500.h +++ b/include/linux/mfd/ab8500.h | |||
@@ -10,6 +10,29 @@ | |||
10 | #include <linux/device.h> | 10 | #include <linux/device.h> |
11 | 11 | ||
12 | /* | 12 | /* |
13 | * AB8500 bank addresses | ||
14 | */ | ||
15 | #define AB8500_SYS_CTRL1_BLOCK 0x1 | ||
16 | #define AB8500_SYS_CTRL2_BLOCK 0x2 | ||
17 | #define AB8500_REGU_CTRL1 0x3 | ||
18 | #define AB8500_REGU_CTRL2 0x4 | ||
19 | #define AB8500_USB 0x5 | ||
20 | #define AB8500_TVOUT 0x6 | ||
21 | #define AB8500_DBI 0x7 | ||
22 | #define AB8500_ECI_AV_ACC 0x8 | ||
23 | #define AB8500_RESERVED 0x9 | ||
24 | #define AB8500_GPADC 0xA | ||
25 | #define AB8500_CHARGER 0xB | ||
26 | #define AB8500_GAS_GAUGE 0xC | ||
27 | #define AB8500_AUDIO 0xD | ||
28 | #define AB8500_INTERRUPT 0xE | ||
29 | #define AB8500_RTC 0xF | ||
30 | #define AB8500_MISC 0x10 | ||
31 | #define AB8500_DEBUG 0x12 | ||
32 | #define AB8500_PROD_TEST 0x13 | ||
33 | #define AB8500_OTP_EMUL 0x15 | ||
34 | |||
35 | /* | ||
13 | * Interrupts | 36 | * Interrupts |
14 | */ | 37 | */ |
15 | 38 | ||
@@ -99,6 +122,7 @@ struct ab8500 { | |||
99 | int revision; | 122 | int revision; |
100 | int irq_base; | 123 | int irq_base; |
101 | int irq; | 124 | int irq; |
125 | u8 chip_id; | ||
102 | 126 | ||
103 | int (*write) (struct ab8500 *a8500, u16 addr, u8 data); | 127 | int (*write) (struct ab8500 *a8500, u16 addr, u8 data); |
104 | int (*read) (struct ab8500 *a8500, u16 addr); | 128 | int (*read) (struct ab8500 *a8500, u16 addr); |
@@ -124,10 +148,6 @@ struct ab8500_platform_data { | |||
124 | struct regulator_init_data *regulator[AB8500_NUM_REGULATORS]; | 148 | struct regulator_init_data *regulator[AB8500_NUM_REGULATORS]; |
125 | }; | 149 | }; |
126 | 150 | ||
127 | extern int ab8500_write(struct ab8500 *a8500, u16 addr, u8 data); | ||
128 | extern int ab8500_read(struct ab8500 *a8500, u16 addr); | ||
129 | extern int ab8500_set_bits(struct ab8500 *a8500, u16 addr, u8 mask, u8 data); | ||
130 | |||
131 | extern int __devinit ab8500_init(struct ab8500 *ab8500); | 151 | extern int __devinit ab8500_init(struct ab8500 *ab8500); |
132 | extern int __devexit ab8500_exit(struct ab8500 *ab8500); | 152 | extern int __devexit ab8500_exit(struct ab8500 *ab8500); |
133 | 153 | ||
diff --git a/include/linux/mfd/abx500.h b/include/linux/mfd/abx500.h index 390726fcbcb1..67bd6f7ecf32 100644 --- a/include/linux/mfd/abx500.h +++ b/include/linux/mfd/abx500.h | |||
@@ -6,8 +6,7 @@ | |||
6 | * | 6 | * |
7 | * ABX500 core access functions. | 7 | * ABX500 core access functions. |
8 | * The abx500 interface is used for the Analog Baseband chip | 8 | * The abx500 interface is used for the Analog Baseband chip |
9 | * ab3100, ab3550, ab5500 and possibly comming. It is not used for | 9 | * ab3100, ab3550, ab5500, and ab8500. |
10 | * ab4500 and ab8500 since they are another family of chip. | ||
11 | * | 10 | * |
12 | * Author: Mattias Wallin <mattias.wallin@stericsson.com> | 11 | * Author: Mattias Wallin <mattias.wallin@stericsson.com> |
13 | * Author: Mattias Nilsson <mattias.i.nilsson@stericsson.com> | 12 | * Author: Mattias Nilsson <mattias.i.nilsson@stericsson.com> |
@@ -230,4 +229,5 @@ struct abx500_ops { | |||
230 | }; | 229 | }; |
231 | 230 | ||
232 | int abx500_register_ops(struct device *core_dev, struct abx500_ops *ops); | 231 | int abx500_register_ops(struct device *core_dev, struct abx500_ops *ops); |
232 | void abx500_remove_ops(struct device *dev); | ||
233 | #endif | 233 | #endif |
diff --git a/include/linux/mfd/core.h b/include/linux/mfd/core.h index 11d740b8831d..cb93d80aa642 100644 --- a/include/linux/mfd/core.h +++ b/include/linux/mfd/core.h | |||
@@ -44,6 +44,9 @@ struct mfd_cell { | |||
44 | */ | 44 | */ |
45 | int num_resources; | 45 | int num_resources; |
46 | const struct resource *resources; | 46 | const struct resource *resources; |
47 | |||
48 | /* don't check for resource conflicts */ | ||
49 | bool ignore_resource_conflicts; | ||
47 | }; | 50 | }; |
48 | 51 | ||
49 | extern int mfd_add_devices(struct device *parent, int id, | 52 | extern int mfd_add_devices(struct device *parent, int id, |
diff --git a/include/linux/mfd/max8998-private.h b/include/linux/mfd/max8998-private.h index 6dc75b3e2d33..7363dea6bbcd 100644 --- a/include/linux/mfd/max8998-private.h +++ b/include/linux/mfd/max8998-private.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * max8698.h - Voltage regulator driver for the Maxim 8998 | 2 | * max8998.h - Voltage regulator driver for the Maxim 8998 |
3 | * | 3 | * |
4 | * Copyright (C) 2009-2010 Samsung Electrnoics | 4 | * Copyright (C) 2009-2010 Samsung Electrnoics |
5 | * Kyungmin Park <kyungmin.park@samsung.com> | 5 | * Kyungmin Park <kyungmin.park@samsung.com> |
@@ -23,6 +23,8 @@ | |||
23 | #ifndef __LINUX_MFD_MAX8998_PRIV_H | 23 | #ifndef __LINUX_MFD_MAX8998_PRIV_H |
24 | #define __LINUX_MFD_MAX8998_PRIV_H | 24 | #define __LINUX_MFD_MAX8998_PRIV_H |
25 | 25 | ||
26 | #define MAX8998_NUM_IRQ_REGS 4 | ||
27 | |||
26 | /* MAX 8998 registers */ | 28 | /* MAX 8998 registers */ |
27 | enum { | 29 | enum { |
28 | MAX8998_REG_IRQ1, | 30 | MAX8998_REG_IRQ1, |
@@ -46,12 +48,12 @@ enum { | |||
46 | MAX8998_REG_ONOFF2, | 48 | MAX8998_REG_ONOFF2, |
47 | MAX8998_REG_ONOFF3, | 49 | MAX8998_REG_ONOFF3, |
48 | MAX8998_REG_ONOFF4, | 50 | MAX8998_REG_ONOFF4, |
49 | MAX8998_REG_BUCK1_DVSARM1, | 51 | MAX8998_REG_BUCK1_VOLTAGE1, |
50 | MAX8998_REG_BUCK1_DVSARM2, | 52 | MAX8998_REG_BUCK1_VOLTAGE2, |
51 | MAX8998_REG_BUCK1_DVSARM3, | 53 | MAX8998_REG_BUCK1_VOLTAGE3, |
52 | MAX8998_REG_BUCK1_DVSARM4, | 54 | MAX8998_REG_BUCK1_VOLTAGE4, |
53 | MAX8998_REG_BUCK2_DVSINT1, | 55 | MAX8998_REG_BUCK2_VOLTAGE1, |
54 | MAX8998_REG_BUCK2_DVSINT2, | 56 | MAX8998_REG_BUCK2_VOLTAGE2, |
55 | MAX8998_REG_BUCK3, | 57 | MAX8998_REG_BUCK3, |
56 | MAX8998_REG_BUCK4, | 58 | MAX8998_REG_BUCK4, |
57 | MAX8998_REG_LDO2_LDO3, | 59 | MAX8998_REG_LDO2_LDO3, |
@@ -72,41 +74,102 @@ enum { | |||
72 | MAX8998_REG_LBCNFG2, | 74 | MAX8998_REG_LBCNFG2, |
73 | }; | 75 | }; |
74 | 76 | ||
77 | /* IRQ definitions */ | ||
78 | enum { | ||
79 | MAX8998_IRQ_DCINF, | ||
80 | MAX8998_IRQ_DCINR, | ||
81 | MAX8998_IRQ_JIGF, | ||
82 | MAX8998_IRQ_JIGR, | ||
83 | MAX8998_IRQ_PWRONF, | ||
84 | MAX8998_IRQ_PWRONR, | ||
85 | |||
86 | MAX8998_IRQ_WTSREVNT, | ||
87 | MAX8998_IRQ_SMPLEVNT, | ||
88 | MAX8998_IRQ_ALARM1, | ||
89 | MAX8998_IRQ_ALARM0, | ||
90 | |||
91 | MAX8998_IRQ_ONKEY1S, | ||
92 | MAX8998_IRQ_TOPOFFR, | ||
93 | MAX8998_IRQ_DCINOVPR, | ||
94 | MAX8998_IRQ_CHGRSTF, | ||
95 | MAX8998_IRQ_DONER, | ||
96 | MAX8998_IRQ_CHGFAULT, | ||
97 | |||
98 | MAX8998_IRQ_LOBAT1, | ||
99 | MAX8998_IRQ_LOBAT2, | ||
100 | |||
101 | MAX8998_IRQ_NR, | ||
102 | }; | ||
103 | |||
104 | /* MAX8998 various variants */ | ||
105 | enum { | ||
106 | TYPE_MAX8998 = 0, /* Default */ | ||
107 | TYPE_LP3974, /* National version of MAX8998 */ | ||
108 | TYPE_LP3979, /* Added AVS */ | ||
109 | }; | ||
110 | |||
111 | #define MAX8998_IRQ_DCINF_MASK (1 << 2) | ||
112 | #define MAX8998_IRQ_DCINR_MASK (1 << 3) | ||
113 | #define MAX8998_IRQ_JIGF_MASK (1 << 4) | ||
114 | #define MAX8998_IRQ_JIGR_MASK (1 << 5) | ||
115 | #define MAX8998_IRQ_PWRONF_MASK (1 << 6) | ||
116 | #define MAX8998_IRQ_PWRONR_MASK (1 << 7) | ||
117 | |||
118 | #define MAX8998_IRQ_WTSREVNT_MASK (1 << 0) | ||
119 | #define MAX8998_IRQ_SMPLEVNT_MASK (1 << 1) | ||
120 | #define MAX8998_IRQ_ALARM1_MASK (1 << 2) | ||
121 | #define MAX8998_IRQ_ALARM0_MASK (1 << 3) | ||
122 | |||
123 | #define MAX8998_IRQ_ONKEY1S_MASK (1 << 0) | ||
124 | #define MAX8998_IRQ_TOPOFFR_MASK (1 << 2) | ||
125 | #define MAX8998_IRQ_DCINOVPR_MASK (1 << 3) | ||
126 | #define MAX8998_IRQ_CHGRSTF_MASK (1 << 4) | ||
127 | #define MAX8998_IRQ_DONER_MASK (1 << 5) | ||
128 | #define MAX8998_IRQ_CHGFAULT_MASK (1 << 7) | ||
129 | |||
130 | #define MAX8998_IRQ_LOBAT1_MASK (1 << 0) | ||
131 | #define MAX8998_IRQ_LOBAT2_MASK (1 << 1) | ||
132 | |||
133 | #define MAX8998_ENRAMP (1 << 4) | ||
134 | |||
75 | /** | 135 | /** |
76 | * struct max8998_dev - max8998 master device for sub-drivers | 136 | * struct max8998_dev - max8998 master device for sub-drivers |
77 | * @dev: master device of the chip (can be used to access platform data) | 137 | * @dev: master device of the chip (can be used to access platform data) |
78 | * @i2c_client: i2c client private data | 138 | * @i2c: i2c client private data for regulator |
79 | * @dev_read(): chip register read function | 139 | * @rtc: i2c client private data for rtc |
80 | * @dev_write(): chip register write function | ||
81 | * @dev_update(): chip register update function | ||
82 | * @iolock: mutex for serializing io access | 140 | * @iolock: mutex for serializing io access |
141 | * @irqlock: mutex for buslock | ||
142 | * @irq_base: base IRQ number for max8998, required for IRQs | ||
143 | * @irq: generic IRQ number for max8998 | ||
144 | * @ono: power onoff IRQ number for max8998 | ||
145 | * @irq_masks_cur: currently active value | ||
146 | * @irq_masks_cache: cached hardware value | ||
147 | * @type: indicate which max8998 "variant" is used | ||
83 | */ | 148 | */ |
84 | |||
85 | struct max8998_dev { | 149 | struct max8998_dev { |
86 | struct device *dev; | 150 | struct device *dev; |
87 | struct i2c_client *i2c_client; | 151 | struct i2c_client *i2c; |
88 | int (*dev_read)(struct max8998_dev *max8998, u8 reg, u8 *dest); | 152 | struct i2c_client *rtc; |
89 | int (*dev_write)(struct max8998_dev *max8998, u8 reg, u8 val); | ||
90 | int (*dev_update)(struct max8998_dev *max8998, u8 reg, u8 val, u8 mask); | ||
91 | struct mutex iolock; | 153 | struct mutex iolock; |
154 | struct mutex irqlock; | ||
155 | |||
156 | int irq_base; | ||
157 | int irq; | ||
158 | int ono; | ||
159 | u8 irq_masks_cur[MAX8998_NUM_IRQ_REGS]; | ||
160 | u8 irq_masks_cache[MAX8998_NUM_IRQ_REGS]; | ||
161 | int type; | ||
92 | }; | 162 | }; |
93 | 163 | ||
94 | static inline int max8998_read_reg(struct max8998_dev *max8998, u8 reg, | 164 | int max8998_irq_init(struct max8998_dev *max8998); |
95 | u8 *value) | 165 | void max8998_irq_exit(struct max8998_dev *max8998); |
96 | { | 166 | |
97 | return max8998->dev_read(max8998, reg, value); | 167 | extern int max8998_read_reg(struct i2c_client *i2c, u8 reg, u8 *dest); |
98 | } | 168 | extern int max8998_bulk_read(struct i2c_client *i2c, u8 reg, int count, |
99 | 169 | u8 *buf); | |
100 | static inline int max8998_write_reg(struct max8998_dev *max8998, u8 reg, | 170 | extern int max8998_write_reg(struct i2c_client *i2c, u8 reg, u8 value); |
101 | u8 value) | 171 | extern int max8998_bulk_write(struct i2c_client *i2c, u8 reg, int count, |
102 | { | 172 | u8 *buf); |
103 | return max8998->dev_write(max8998, reg, value); | 173 | extern int max8998_update_reg(struct i2c_client *i2c, u8 reg, u8 val, u8 mask); |
104 | } | ||
105 | |||
106 | static inline int max8998_update_reg(struct max8998_dev *max8998, u8 reg, | ||
107 | u8 value, u8 mask) | ||
108 | { | ||
109 | return max8998->dev_update(max8998, reg, value, mask); | ||
110 | } | ||
111 | 174 | ||
112 | #endif /* __LINUX_MFD_MAX8998_PRIV_H */ | 175 | #endif /* __LINUX_MFD_MAX8998_PRIV_H */ |
diff --git a/include/linux/mfd/max8998.h b/include/linux/mfd/max8998.h index 1d3601a2d853..f8c9f884aff2 100644 --- a/include/linux/mfd/max8998.h +++ b/include/linux/mfd/max8998.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * max8698.h - Voltage regulator driver for the Maxim 8998 | 2 | * max8998.h - Voltage regulator driver for the Maxim 8998 |
3 | * | 3 | * |
4 | * Copyright (C) 2009-2010 Samsung Electrnoics | 4 | * Copyright (C) 2009-2010 Samsung Electrnoics |
5 | * Kyungmin Park <kyungmin.park@samsung.com> | 5 | * Kyungmin Park <kyungmin.park@samsung.com> |
@@ -66,13 +66,28 @@ struct max8998_regulator_data { | |||
66 | 66 | ||
67 | /** | 67 | /** |
68 | * struct max8998_board - packages regulator init data | 68 | * struct max8998_board - packages regulator init data |
69 | * @num_regulators: number of regultors used | ||
70 | * @regulators: array of defined regulators | 69 | * @regulators: array of defined regulators |
70 | * @num_regulators: number of regultors used | ||
71 | * @irq_base: base IRQ number for max8998, required for IRQs | ||
72 | * @ono: power onoff IRQ number for max8998 | ||
73 | * @buck1_max_voltage1: BUCK1 maximum alowed voltage register 1 | ||
74 | * @buck1_max_voltage2: BUCK1 maximum alowed voltage register 2 | ||
75 | * @buck2_max_voltage: BUCK2 maximum alowed voltage | ||
76 | * @buck1_set1: BUCK1 gpio pin 1 to set output voltage | ||
77 | * @buck1_set2: BUCK1 gpio pin 2 to set output voltage | ||
78 | * @buck2_set3: BUCK2 gpio pin to set output voltage | ||
71 | */ | 79 | */ |
72 | |||
73 | struct max8998_platform_data { | 80 | struct max8998_platform_data { |
74 | int num_regulators; | ||
75 | struct max8998_regulator_data *regulators; | 81 | struct max8998_regulator_data *regulators; |
82 | int num_regulators; | ||
83 | int irq_base; | ||
84 | int ono; | ||
85 | int buck1_max_voltage1; | ||
86 | int buck1_max_voltage2; | ||
87 | int buck2_max_voltage; | ||
88 | int buck1_set1; | ||
89 | int buck1_set2; | ||
90 | int buck2_set3; | ||
76 | }; | 91 | }; |
77 | 92 | ||
78 | #endif /* __LINUX_MFD_MAX8998_H */ | 93 | #endif /* __LINUX_MFD_MAX8998_H */ |
diff --git a/include/linux/mfd/mc13783.h b/include/linux/mfd/mc13783.h index 0fa44fb8dd26..b4c741e352c2 100644 --- a/include/linux/mfd/mc13783.h +++ b/include/linux/mfd/mc13783.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright 2009 Pengutronix | 2 | * Copyright 2009-2010 Pengutronix |
3 | * Uwe Kleine-Koenig <u.kleine-koenig@pengutronix.de> | 3 | * Uwe Kleine-Koenig <u.kleine-koenig@pengutronix.de> |
4 | * | 4 | * |
5 | * This program is free software; you can redistribute it and/or modify it under | 5 | * This program is free software; you can redistribute it and/or modify it under |
@@ -9,48 +9,83 @@ | |||
9 | #ifndef __LINUX_MFD_MC13783_H | 9 | #ifndef __LINUX_MFD_MC13783_H |
10 | #define __LINUX_MFD_MC13783_H | 10 | #define __LINUX_MFD_MC13783_H |
11 | 11 | ||
12 | #include <linux/interrupt.h> | 12 | #include <linux/mfd/mc13xxx.h> |
13 | 13 | ||
14 | struct mc13783; | 14 | struct mc13783; |
15 | 15 | ||
16 | void mc13783_lock(struct mc13783 *mc13783); | 16 | struct mc13xxx *mc13783_to_mc13xxx(struct mc13783 *mc13783); |
17 | void mc13783_unlock(struct mc13783 *mc13783); | ||
18 | 17 | ||
19 | int mc13783_reg_read(struct mc13783 *mc13783, unsigned int offset, u32 *val); | 18 | static inline void mc13783_lock(struct mc13783 *mc13783) |
20 | int mc13783_reg_write(struct mc13783 *mc13783, unsigned int offset, u32 val); | 19 | { |
21 | int mc13783_reg_rmw(struct mc13783 *mc13783, unsigned int offset, | 20 | mc13xxx_lock(mc13783_to_mc13xxx(mc13783)); |
22 | u32 mask, u32 val); | 21 | } |
22 | |||
23 | static inline void mc13783_unlock(struct mc13783 *mc13783) | ||
24 | { | ||
25 | mc13xxx_unlock(mc13783_to_mc13xxx(mc13783)); | ||
26 | } | ||
27 | |||
28 | static inline int mc13783_reg_read(struct mc13783 *mc13783, | ||
29 | unsigned int offset, u32 *val) | ||
30 | { | ||
31 | return mc13xxx_reg_read(mc13783_to_mc13xxx(mc13783), offset, val); | ||
32 | } | ||
33 | |||
34 | static inline int mc13783_reg_write(struct mc13783 *mc13783, | ||
35 | unsigned int offset, u32 val) | ||
36 | { | ||
37 | return mc13xxx_reg_write(mc13783_to_mc13xxx(mc13783), offset, val); | ||
38 | } | ||
39 | |||
40 | static inline int mc13783_reg_rmw(struct mc13783 *mc13783, | ||
41 | unsigned int offset, u32 mask, u32 val) | ||
42 | { | ||
43 | return mc13xxx_reg_rmw(mc13783_to_mc13xxx(mc13783), offset, mask, val); | ||
44 | } | ||
23 | 45 | ||
24 | int mc13783_get_flags(struct mc13783 *mc13783); | 46 | static inline int mc13783_get_flags(struct mc13783 *mc13783) |
47 | { | ||
48 | return mc13xxx_get_flags(mc13783_to_mc13xxx(mc13783)); | ||
49 | } | ||
25 | 50 | ||
26 | int mc13783_irq_request(struct mc13783 *mc13783, int irq, | 51 | static inline int mc13783_irq_request(struct mc13783 *mc13783, int irq, |
27 | irq_handler_t handler, const char *name, void *dev); | 52 | irq_handler_t handler, const char *name, void *dev) |
28 | int mc13783_irq_request_nounmask(struct mc13783 *mc13783, int irq, | 53 | { |
29 | irq_handler_t handler, const char *name, void *dev); | 54 | return mc13xxx_irq_request(mc13783_to_mc13xxx(mc13783), irq, |
30 | int mc13783_irq_free(struct mc13783 *mc13783, int irq, void *dev); | 55 | handler, name, dev); |
56 | } | ||
31 | 57 | ||
32 | int mc13783_irq_mask(struct mc13783 *mc13783, int irq); | 58 | static inline int mc13783_irq_request_nounmask(struct mc13783 *mc13783, int irq, |
33 | int mc13783_irq_unmask(struct mc13783 *mc13783, int irq); | 59 | irq_handler_t handler, const char *name, void *dev) |
34 | int mc13783_irq_status(struct mc13783 *mc13783, int irq, | 60 | { |
35 | int *enabled, int *pending); | 61 | return mc13xxx_irq_request_nounmask(mc13783_to_mc13xxx(mc13783), irq, |
36 | int mc13783_irq_ack(struct mc13783 *mc13783, int irq); | 62 | handler, name, dev); |
63 | } | ||
37 | 64 | ||
38 | static inline int mc13783_mask(struct mc13783 *mc13783, int irq) __deprecated; | 65 | static inline int mc13783_irq_free(struct mc13783 *mc13783, int irq, void *dev) |
39 | static inline int mc13783_mask(struct mc13783 *mc13783, int irq) | ||
40 | { | 66 | { |
41 | return mc13783_irq_mask(mc13783, irq); | 67 | return mc13xxx_irq_free(mc13783_to_mc13xxx(mc13783), irq, dev); |
42 | } | 68 | } |
43 | 69 | ||
44 | static inline int mc13783_unmask(struct mc13783 *mc13783, int irq) __deprecated; | 70 | static inline int mc13783_irq_mask(struct mc13783 *mc13783, int irq) |
45 | static inline int mc13783_unmask(struct mc13783 *mc13783, int irq) | ||
46 | { | 71 | { |
47 | return mc13783_irq_unmask(mc13783, irq); | 72 | return mc13xxx_irq_mask(mc13783_to_mc13xxx(mc13783), irq); |
48 | } | 73 | } |
49 | 74 | ||
50 | static inline int mc13783_ackirq(struct mc13783 *mc13783, int irq) __deprecated; | 75 | static inline int mc13783_irq_unmask(struct mc13783 *mc13783, int irq) |
51 | static inline int mc13783_ackirq(struct mc13783 *mc13783, int irq) | ||
52 | { | 76 | { |
53 | return mc13783_irq_ack(mc13783, irq); | 77 | return mc13xxx_irq_unmask(mc13783_to_mc13xxx(mc13783), irq); |
78 | } | ||
79 | static inline int mc13783_irq_status(struct mc13783 *mc13783, int irq, | ||
80 | int *enabled, int *pending) | ||
81 | { | ||
82 | return mc13xxx_irq_status(mc13783_to_mc13xxx(mc13783), | ||
83 | irq, enabled, pending); | ||
84 | } | ||
85 | |||
86 | static inline int mc13783_irq_ack(struct mc13783 *mc13783, int irq) | ||
87 | { | ||
88 | return mc13xxx_irq_ack(mc13783_to_mc13xxx(mc13783), irq); | ||
54 | } | 89 | } |
55 | 90 | ||
56 | #define MC13783_ADC0 43 | 91 | #define MC13783_ADC0 43 |
@@ -66,96 +101,18 @@ static inline int mc13783_ackirq(struct mc13783 *mc13783, int irq) | |||
66 | MC13783_ADC0_TSMOD1 | \ | 101 | MC13783_ADC0_TSMOD1 | \ |
67 | MC13783_ADC0_TSMOD2) | 102 | MC13783_ADC0_TSMOD2) |
68 | 103 | ||
69 | struct mc13783_led_platform_data { | 104 | #define mc13783_regulator_init_data mc13xxx_regulator_init_data |
70 | #define MC13783_LED_MD 0 | 105 | #define mc13783_regulator_platform_data mc13xxx_regulator_platform_data |
71 | #define MC13783_LED_AD 1 | 106 | #define mc13783_led_platform_data mc13xxx_led_platform_data |
72 | #define MC13783_LED_KP 2 | 107 | #define mc13783_leds_platform_data mc13xxx_leds_platform_data |
73 | #define MC13783_LED_R1 3 | 108 | |
74 | #define MC13783_LED_G1 4 | 109 | #define mc13783_platform_data mc13xxx_platform_data |
75 | #define MC13783_LED_B1 5 | 110 | #define MC13783_USE_TOUCHSCREEN MC13XXX_USE_TOUCHSCREEN |
76 | #define MC13783_LED_R2 6 | 111 | #define MC13783_USE_CODEC MC13XXX_USE_CODEC |
77 | #define MC13783_LED_G2 7 | 112 | #define MC13783_USE_ADC MC13XXX_USE_ADC |
78 | #define MC13783_LED_B2 8 | 113 | #define MC13783_USE_RTC MC13XXX_USE_RTC |
79 | #define MC13783_LED_R3 9 | 114 | #define MC13783_USE_REGULATOR MC13XXX_USE_REGULATOR |
80 | #define MC13783_LED_G3 10 | 115 | #define MC13783_USE_LED MC13XXX_USE_LED |
81 | #define MC13783_LED_B3 11 | ||
82 | #define MC13783_LED_MAX MC13783_LED_B3 | ||
83 | int id; | ||
84 | const char *name; | ||
85 | const char *default_trigger; | ||
86 | |||
87 | /* Three or two bits current selection depending on the led */ | ||
88 | char max_current; | ||
89 | }; | ||
90 | |||
91 | struct mc13783_leds_platform_data { | ||
92 | int num_leds; | ||
93 | struct mc13783_led_platform_data *led; | ||
94 | |||
95 | #define MC13783_LED_TRIODE_MD (1 << 0) | ||
96 | #define MC13783_LED_TRIODE_AD (1 << 1) | ||
97 | #define MC13783_LED_TRIODE_KP (1 << 2) | ||
98 | #define MC13783_LED_BOOST_EN (1 << 3) | ||
99 | #define MC13783_LED_TC1HALF (1 << 4) | ||
100 | #define MC13783_LED_SLEWLIMTC (1 << 5) | ||
101 | #define MC13783_LED_SLEWLIMBL (1 << 6) | ||
102 | #define MC13783_LED_TRIODE_TC1 (1 << 7) | ||
103 | #define MC13783_LED_TRIODE_TC2 (1 << 8) | ||
104 | #define MC13783_LED_TRIODE_TC3 (1 << 9) | ||
105 | int flags; | ||
106 | |||
107 | #define MC13783_LED_AB_DISABLED 0 | ||
108 | #define MC13783_LED_AB_MD1 1 | ||
109 | #define MC13783_LED_AB_MD12 2 | ||
110 | #define MC13783_LED_AB_MD123 3 | ||
111 | #define MC13783_LED_AB_MD1234 4 | ||
112 | #define MC13783_LED_AB_MD1234_AD1 5 | ||
113 | #define MC13783_LED_AB_MD1234_AD12 6 | ||
114 | #define MC13783_LED_AB_MD1_AD 7 | ||
115 | char abmode; | ||
116 | |||
117 | #define MC13783_LED_ABREF_200MV 0 | ||
118 | #define MC13783_LED_ABREF_400MV 1 | ||
119 | #define MC13783_LED_ABREF_600MV 2 | ||
120 | #define MC13783_LED_ABREF_800MV 3 | ||
121 | char abref; | ||
122 | |||
123 | #define MC13783_LED_PERIOD_10MS 0 | ||
124 | #define MC13783_LED_PERIOD_100MS 1 | ||
125 | #define MC13783_LED_PERIOD_500MS 2 | ||
126 | #define MC13783_LED_PERIOD_2S 3 | ||
127 | char bl_period; | ||
128 | char tc1_period; | ||
129 | char tc2_period; | ||
130 | char tc3_period; | ||
131 | }; | ||
132 | |||
133 | /* to be cleaned up */ | ||
134 | struct regulator_init_data; | ||
135 | |||
136 | struct mc13783_regulator_init_data { | ||
137 | int id; | ||
138 | struct regulator_init_data *init_data; | ||
139 | }; | ||
140 | |||
141 | struct mc13783_regulator_platform_data { | ||
142 | int num_regulators; | ||
143 | struct mc13783_regulator_init_data *regulators; | ||
144 | }; | ||
145 | |||
146 | struct mc13783_platform_data { | ||
147 | int num_regulators; | ||
148 | struct mc13783_regulator_init_data *regulators; | ||
149 | struct mc13783_leds_platform_data *leds; | ||
150 | |||
151 | #define MC13783_USE_TOUCHSCREEN (1 << 0) | ||
152 | #define MC13783_USE_CODEC (1 << 1) | ||
153 | #define MC13783_USE_ADC (1 << 2) | ||
154 | #define MC13783_USE_RTC (1 << 3) | ||
155 | #define MC13783_USE_REGULATOR (1 << 4) | ||
156 | #define MC13783_USE_LED (1 << 5) | ||
157 | unsigned int flags; | ||
158 | }; | ||
159 | 116 | ||
160 | #define MC13783_ADC_MODE_TS 1 | 117 | #define MC13783_ADC_MODE_TS 1 |
161 | #define MC13783_ADC_MODE_SINGLE_CHAN 2 | 118 | #define MC13783_ADC_MODE_SINGLE_CHAN 2 |
@@ -199,46 +156,46 @@ int mc13783_adc_do_conversion(struct mc13783 *mc13783, unsigned int mode, | |||
199 | #define MC13783_REGU_PWGT1SPI 31 | 156 | #define MC13783_REGU_PWGT1SPI 31 |
200 | #define MC13783_REGU_PWGT2SPI 32 | 157 | #define MC13783_REGU_PWGT2SPI 32 |
201 | 158 | ||
202 | #define MC13783_IRQ_ADCDONE 0 | 159 | #define MC13783_IRQ_ADCDONE MC13XXX_IRQ_ADCDONE |
203 | #define MC13783_IRQ_ADCBISDONE 1 | 160 | #define MC13783_IRQ_ADCBISDONE MC13XXX_IRQ_ADCBISDONE |
204 | #define MC13783_IRQ_TS 2 | 161 | #define MC13783_IRQ_TS MC13XXX_IRQ_TS |
205 | #define MC13783_IRQ_WHIGH 3 | 162 | #define MC13783_IRQ_WHIGH 3 |
206 | #define MC13783_IRQ_WLOW 4 | 163 | #define MC13783_IRQ_WLOW 4 |
207 | #define MC13783_IRQ_CHGDET 6 | 164 | #define MC13783_IRQ_CHGDET MC13XXX_IRQ_CHGDET |
208 | #define MC13783_IRQ_CHGOV 7 | 165 | #define MC13783_IRQ_CHGOV 7 |
209 | #define MC13783_IRQ_CHGREV 8 | 166 | #define MC13783_IRQ_CHGREV MC13XXX_IRQ_CHGREV |
210 | #define MC13783_IRQ_CHGSHORT 9 | 167 | #define MC13783_IRQ_CHGSHORT MC13XXX_IRQ_CHGSHORT |
211 | #define MC13783_IRQ_CCCV 10 | 168 | #define MC13783_IRQ_CCCV MC13XXX_IRQ_CCCV |
212 | #define MC13783_IRQ_CHGCURR 11 | 169 | #define MC13783_IRQ_CHGCURR MC13XXX_IRQ_CHGCURR |
213 | #define MC13783_IRQ_BPON 12 | 170 | #define MC13783_IRQ_BPON MC13XXX_IRQ_BPON |
214 | #define MC13783_IRQ_LOBATL 13 | 171 | #define MC13783_IRQ_LOBATL MC13XXX_IRQ_LOBATL |
215 | #define MC13783_IRQ_LOBATH 14 | 172 | #define MC13783_IRQ_LOBATH MC13XXX_IRQ_LOBATH |
216 | #define MC13783_IRQ_UDP 15 | 173 | #define MC13783_IRQ_UDP 15 |
217 | #define MC13783_IRQ_USB 16 | 174 | #define MC13783_IRQ_USB 16 |
218 | #define MC13783_IRQ_ID 19 | 175 | #define MC13783_IRQ_ID 19 |
219 | #define MC13783_IRQ_SE1 21 | 176 | #define MC13783_IRQ_SE1 21 |
220 | #define MC13783_IRQ_CKDET 22 | 177 | #define MC13783_IRQ_CKDET 22 |
221 | #define MC13783_IRQ_UDM 23 | 178 | #define MC13783_IRQ_UDM 23 |
222 | #define MC13783_IRQ_1HZ 24 | 179 | #define MC13783_IRQ_1HZ MC13XXX_IRQ_1HZ |
223 | #define MC13783_IRQ_TODA 25 | 180 | #define MC13783_IRQ_TODA MC13XXX_IRQ_TODA |
224 | #define MC13783_IRQ_ONOFD1 27 | 181 | #define MC13783_IRQ_ONOFD1 27 |
225 | #define MC13783_IRQ_ONOFD2 28 | 182 | #define MC13783_IRQ_ONOFD2 28 |
226 | #define MC13783_IRQ_ONOFD3 29 | 183 | #define MC13783_IRQ_ONOFD3 29 |
227 | #define MC13783_IRQ_SYSRST 30 | 184 | #define MC13783_IRQ_SYSRST MC13XXX_IRQ_SYSRST |
228 | #define MC13783_IRQ_RTCRST 31 | 185 | #define MC13783_IRQ_RTCRST MC13XXX_IRQ_RTCRST |
229 | #define MC13783_IRQ_PC 32 | 186 | #define MC13783_IRQ_PC MC13XXX_IRQ_PC |
230 | #define MC13783_IRQ_WARM 33 | 187 | #define MC13783_IRQ_WARM MC13XXX_IRQ_WARM |
231 | #define MC13783_IRQ_MEMHLD 34 | 188 | #define MC13783_IRQ_MEMHLD MC13XXX_IRQ_MEMHLD |
232 | #define MC13783_IRQ_PWRRDY 35 | 189 | #define MC13783_IRQ_PWRRDY 35 |
233 | #define MC13783_IRQ_THWARNL 36 | 190 | #define MC13783_IRQ_THWARNL MC13XXX_IRQ_THWARNL |
234 | #define MC13783_IRQ_THWARNH 37 | 191 | #define MC13783_IRQ_THWARNH MC13XXX_IRQ_THWARNH |
235 | #define MC13783_IRQ_CLK 38 | 192 | #define MC13783_IRQ_CLK MC13XXX_IRQ_CLK |
236 | #define MC13783_IRQ_SEMAF 39 | 193 | #define MC13783_IRQ_SEMAF 39 |
237 | #define MC13783_IRQ_MC2B 41 | 194 | #define MC13783_IRQ_MC2B 41 |
238 | #define MC13783_IRQ_HSDET 42 | 195 | #define MC13783_IRQ_HSDET 42 |
239 | #define MC13783_IRQ_HSL 43 | 196 | #define MC13783_IRQ_HSL 43 |
240 | #define MC13783_IRQ_ALSPTH 44 | 197 | #define MC13783_IRQ_ALSPTH 44 |
241 | #define MC13783_IRQ_AHSSHORT 45 | 198 | #define MC13783_IRQ_AHSSHORT 45 |
242 | #define MC13783_NUM_IRQ 46 | 199 | #define MC13783_NUM_IRQ MC13XXX_NUM_IRQ |
243 | 200 | ||
244 | #endif /* __LINUX_MFD_MC13783_H */ | 201 | #endif /* ifndef __LINUX_MFD_MC13783_H */ |
diff --git a/include/linux/mfd/mc13xxx.h b/include/linux/mfd/mc13xxx.h new file mode 100644 index 000000000000..a1d391b40e68 --- /dev/null +++ b/include/linux/mfd/mc13xxx.h | |||
@@ -0,0 +1,154 @@ | |||
1 | /* | ||
2 | * Copyright 2009-2010 Pengutronix | ||
3 | * Uwe Kleine-Koenig <u.kleine-koenig@pengutronix.de> | ||
4 | * | ||
5 | * This program is free software; you can redistribute it and/or modify it under | ||
6 | * the terms of the GNU General Public License version 2 as published by the | ||
7 | * Free Software Foundation. | ||
8 | */ | ||
9 | #ifndef __LINUX_MFD_MC13XXX_H | ||
10 | #define __LINUX_MFD_MC13XXX_H | ||
11 | |||
12 | #include <linux/interrupt.h> | ||
13 | |||
14 | struct mc13xxx; | ||
15 | |||
16 | void mc13xxx_lock(struct mc13xxx *mc13xxx); | ||
17 | void mc13xxx_unlock(struct mc13xxx *mc13xxx); | ||
18 | |||
19 | int mc13xxx_reg_read(struct mc13xxx *mc13xxx, unsigned int offset, u32 *val); | ||
20 | int mc13xxx_reg_write(struct mc13xxx *mc13xxx, unsigned int offset, u32 val); | ||
21 | int mc13xxx_reg_rmw(struct mc13xxx *mc13xxx, unsigned int offset, | ||
22 | u32 mask, u32 val); | ||
23 | |||
24 | int mc13xxx_get_flags(struct mc13xxx *mc13xxx); | ||
25 | |||
26 | int mc13xxx_irq_request(struct mc13xxx *mc13xxx, int irq, | ||
27 | irq_handler_t handler, const char *name, void *dev); | ||
28 | int mc13xxx_irq_request_nounmask(struct mc13xxx *mc13xxx, int irq, | ||
29 | irq_handler_t handler, const char *name, void *dev); | ||
30 | int mc13xxx_irq_free(struct mc13xxx *mc13xxx, int irq, void *dev); | ||
31 | |||
32 | int mc13xxx_irq_mask(struct mc13xxx *mc13xxx, int irq); | ||
33 | int mc13xxx_irq_unmask(struct mc13xxx *mc13xxx, int irq); | ||
34 | int mc13xxx_irq_status(struct mc13xxx *mc13xxx, int irq, | ||
35 | int *enabled, int *pending); | ||
36 | int mc13xxx_irq_ack(struct mc13xxx *mc13xxx, int irq); | ||
37 | |||
38 | int mc13xxx_get_flags(struct mc13xxx *mc13xxx); | ||
39 | |||
40 | #define MC13XXX_IRQ_ADCDONE 0 | ||
41 | #define MC13XXX_IRQ_ADCBISDONE 1 | ||
42 | #define MC13XXX_IRQ_TS 2 | ||
43 | #define MC13XXX_IRQ_CHGDET 6 | ||
44 | #define MC13XXX_IRQ_CHGREV 8 | ||
45 | #define MC13XXX_IRQ_CHGSHORT 9 | ||
46 | #define MC13XXX_IRQ_CCCV 10 | ||
47 | #define MC13XXX_IRQ_CHGCURR 11 | ||
48 | #define MC13XXX_IRQ_BPON 12 | ||
49 | #define MC13XXX_IRQ_LOBATL 13 | ||
50 | #define MC13XXX_IRQ_LOBATH 14 | ||
51 | #define MC13XXX_IRQ_1HZ 24 | ||
52 | #define MC13XXX_IRQ_TODA 25 | ||
53 | #define MC13XXX_IRQ_SYSRST 30 | ||
54 | #define MC13XXX_IRQ_RTCRST 31 | ||
55 | #define MC13XXX_IRQ_PC 32 | ||
56 | #define MC13XXX_IRQ_WARM 33 | ||
57 | #define MC13XXX_IRQ_MEMHLD 34 | ||
58 | #define MC13XXX_IRQ_THWARNL 36 | ||
59 | #define MC13XXX_IRQ_THWARNH 37 | ||
60 | #define MC13XXX_IRQ_CLK 38 | ||
61 | |||
62 | #define MC13XXX_NUM_IRQ 46 | ||
63 | |||
64 | struct regulator_init_data; | ||
65 | |||
66 | struct mc13xxx_regulator_init_data { | ||
67 | int id; | ||
68 | struct regulator_init_data *init_data; | ||
69 | }; | ||
70 | |||
71 | struct mc13xxx_regulator_platform_data { | ||
72 | int num_regulators; | ||
73 | struct mc13xxx_regulator_init_data *regulators; | ||
74 | }; | ||
75 | |||
76 | struct mc13xxx_led_platform_data { | ||
77 | #define MC13783_LED_MD 0 | ||
78 | #define MC13783_LED_AD 1 | ||
79 | #define MC13783_LED_KP 2 | ||
80 | #define MC13783_LED_R1 3 | ||
81 | #define MC13783_LED_G1 4 | ||
82 | #define MC13783_LED_B1 5 | ||
83 | #define MC13783_LED_R2 6 | ||
84 | #define MC13783_LED_G2 7 | ||
85 | #define MC13783_LED_B2 8 | ||
86 | #define MC13783_LED_R3 9 | ||
87 | #define MC13783_LED_G3 10 | ||
88 | #define MC13783_LED_B3 11 | ||
89 | #define MC13783_LED_MAX MC13783_LED_B3 | ||
90 | int id; | ||
91 | const char *name; | ||
92 | const char *default_trigger; | ||
93 | |||
94 | /* Three or two bits current selection depending on the led */ | ||
95 | char max_current; | ||
96 | }; | ||
97 | |||
98 | struct mc13xxx_leds_platform_data { | ||
99 | int num_leds; | ||
100 | struct mc13xxx_led_platform_data *led; | ||
101 | |||
102 | #define MC13783_LED_TRIODE_MD (1 << 0) | ||
103 | #define MC13783_LED_TRIODE_AD (1 << 1) | ||
104 | #define MC13783_LED_TRIODE_KP (1 << 2) | ||
105 | #define MC13783_LED_BOOST_EN (1 << 3) | ||
106 | #define MC13783_LED_TC1HALF (1 << 4) | ||
107 | #define MC13783_LED_SLEWLIMTC (1 << 5) | ||
108 | #define MC13783_LED_SLEWLIMBL (1 << 6) | ||
109 | #define MC13783_LED_TRIODE_TC1 (1 << 7) | ||
110 | #define MC13783_LED_TRIODE_TC2 (1 << 8) | ||
111 | #define MC13783_LED_TRIODE_TC3 (1 << 9) | ||
112 | int flags; | ||
113 | |||
114 | #define MC13783_LED_AB_DISABLED 0 | ||
115 | #define MC13783_LED_AB_MD1 1 | ||
116 | #define MC13783_LED_AB_MD12 2 | ||
117 | #define MC13783_LED_AB_MD123 3 | ||
118 | #define MC13783_LED_AB_MD1234 4 | ||
119 | #define MC13783_LED_AB_MD1234_AD1 5 | ||
120 | #define MC13783_LED_AB_MD1234_AD12 6 | ||
121 | #define MC13783_LED_AB_MD1_AD 7 | ||
122 | char abmode; | ||
123 | |||
124 | #define MC13783_LED_ABREF_200MV 0 | ||
125 | #define MC13783_LED_ABREF_400MV 1 | ||
126 | #define MC13783_LED_ABREF_600MV 2 | ||
127 | #define MC13783_LED_ABREF_800MV 3 | ||
128 | char abref; | ||
129 | |||
130 | #define MC13783_LED_PERIOD_10MS 0 | ||
131 | #define MC13783_LED_PERIOD_100MS 1 | ||
132 | #define MC13783_LED_PERIOD_500MS 2 | ||
133 | #define MC13783_LED_PERIOD_2S 3 | ||
134 | char bl_period; | ||
135 | char tc1_period; | ||
136 | char tc2_period; | ||
137 | char tc3_period; | ||
138 | }; | ||
139 | |||
140 | struct mc13xxx_platform_data { | ||
141 | #define MC13XXX_USE_TOUCHSCREEN (1 << 0) | ||
142 | #define MC13XXX_USE_CODEC (1 << 1) | ||
143 | #define MC13XXX_USE_ADC (1 << 2) | ||
144 | #define MC13XXX_USE_RTC (1 << 3) | ||
145 | #define MC13XXX_USE_REGULATOR (1 << 4) | ||
146 | #define MC13XXX_USE_LED (1 << 5) | ||
147 | unsigned int flags; | ||
148 | |||
149 | int num_regulators; | ||
150 | struct mc13xxx_regulator_init_data *regulators; | ||
151 | struct mc13xxx_leds_platform_data *leds; | ||
152 | }; | ||
153 | |||
154 | #endif /* ifndef __LINUX_MFD_MC13XXX_H */ | ||
diff --git a/include/linux/mfd/pcf50633/core.h b/include/linux/mfd/pcf50633/core.h index ad411a78870c..50d4a047118d 100644 --- a/include/linux/mfd/pcf50633/core.h +++ b/include/linux/mfd/pcf50633/core.h | |||
@@ -227,4 +227,11 @@ static inline struct pcf50633 *dev_to_pcf50633(struct device *dev) | |||
227 | return dev_get_drvdata(dev); | 227 | return dev_get_drvdata(dev); |
228 | } | 228 | } |
229 | 229 | ||
230 | int pcf50633_irq_init(struct pcf50633 *pcf, int irq); | ||
231 | void pcf50633_irq_free(struct pcf50633 *pcf); | ||
232 | #ifdef CONFIG_PM | ||
233 | int pcf50633_irq_suspend(struct pcf50633 *pcf); | ||
234 | int pcf50633_irq_resume(struct pcf50633 *pcf); | ||
235 | #endif | ||
236 | |||
230 | #endif | 237 | #endif |
diff --git a/include/linux/mfd/sh_mobile_sdhi.h b/include/linux/mfd/sh_mobile_sdhi.h index 49067802a6d7..c981b959760f 100644 --- a/include/linux/mfd/sh_mobile_sdhi.h +++ b/include/linux/mfd/sh_mobile_sdhi.h | |||
@@ -7,8 +7,10 @@ struct sh_mobile_sdhi_info { | |||
7 | int dma_slave_tx; | 7 | int dma_slave_tx; |
8 | int dma_slave_rx; | 8 | int dma_slave_rx; |
9 | unsigned long tmio_flags; | 9 | unsigned long tmio_flags; |
10 | unsigned long tmio_caps; | ||
10 | u32 tmio_ocr_mask; /* available MMC voltages */ | 11 | u32 tmio_ocr_mask; /* available MMC voltages */ |
11 | void (*set_pwr)(struct platform_device *pdev, int state); | 12 | void (*set_pwr)(struct platform_device *pdev, int state); |
13 | int (*get_cd)(struct platform_device *pdev); | ||
12 | }; | 14 | }; |
13 | 15 | ||
14 | #endif /* __SH_MOBILE_SDHI_H__ */ | 16 | #endif /* __SH_MOBILE_SDHI_H__ */ |
diff --git a/include/linux/mfd/stmpe.h b/include/linux/mfd/stmpe.h index 39ca7588659b..e762c270d8d4 100644 --- a/include/linux/mfd/stmpe.h +++ b/include/linux/mfd/stmpe.h | |||
@@ -112,13 +112,19 @@ struct stmpe_keypad_platform_data { | |||
112 | bool no_autorepeat; | 112 | bool no_autorepeat; |
113 | }; | 113 | }; |
114 | 114 | ||
115 | #define STMPE_GPIO_NOREQ_811_TOUCH (0xf0) | ||
116 | |||
115 | /** | 117 | /** |
116 | * struct stmpe_gpio_platform_data - STMPE GPIO platform data | 118 | * struct stmpe_gpio_platform_data - STMPE GPIO platform data |
117 | * @gpio_base: first gpio number assigned. A maximum of | 119 | * @gpio_base: first gpio number assigned. A maximum of |
118 | * %STMPE_NR_GPIOS GPIOs will be allocated. | 120 | * %STMPE_NR_GPIOS GPIOs will be allocated. |
121 | * @norequest_mask: bitmask specifying which GPIOs should _not_ be | ||
122 | * requestable due to different usage (e.g. touch, keypad) | ||
123 | * STMPE_GPIO_NOREQ_* macros can be used here. | ||
119 | */ | 124 | */ |
120 | struct stmpe_gpio_platform_data { | 125 | struct stmpe_gpio_platform_data { |
121 | int gpio_base; | 126 | int gpio_base; |
127 | unsigned norequest_mask; | ||
122 | void (*setup)(struct stmpe *stmpe, unsigned gpio_base); | 128 | void (*setup)(struct stmpe *stmpe, unsigned gpio_base); |
123 | void (*remove)(struct stmpe *stmpe, unsigned gpio_base); | 129 | void (*remove)(struct stmpe *stmpe, unsigned gpio_base); |
124 | }; | 130 | }; |
diff --git a/include/linux/mfd/tc35892.h b/include/linux/mfd/tc35892.h index e47f770d3068..eff3094ca84e 100644 --- a/include/linux/mfd/tc35892.h +++ b/include/linux/mfd/tc35892.h | |||
@@ -111,9 +111,13 @@ extern int tc35892_set_bits(struct tc35892 *tc35892, u8 reg, u8 mask, u8 val); | |||
111 | * struct tc35892_gpio_platform_data - TC35892 GPIO platform data | 111 | * struct tc35892_gpio_platform_data - TC35892 GPIO platform data |
112 | * @gpio_base: first gpio number assigned to TC35892. A maximum of | 112 | * @gpio_base: first gpio number assigned to TC35892. A maximum of |
113 | * %TC35892_NR_GPIOS GPIOs will be allocated. | 113 | * %TC35892_NR_GPIOS GPIOs will be allocated. |
114 | * @setup: callback for board-specific initialization | ||
115 | * @remove: callback for board-specific teardown | ||
114 | */ | 116 | */ |
115 | struct tc35892_gpio_platform_data { | 117 | struct tc35892_gpio_platform_data { |
116 | int gpio_base; | 118 | int gpio_base; |
119 | void (*setup)(struct tc35892 *tc35892, unsigned gpio_base); | ||
120 | void (*remove)(struct tc35892 *tc35892, unsigned gpio_base); | ||
117 | }; | 121 | }; |
118 | 122 | ||
119 | /** | 123 | /** |
diff --git a/include/linux/mfd/tmio.h b/include/linux/mfd/tmio.h index f07425bc3dcd..085f041197dc 100644 --- a/include/linux/mfd/tmio.h +++ b/include/linux/mfd/tmio.h | |||
@@ -52,6 +52,11 @@ | |||
52 | 52 | ||
53 | /* tmio MMC platform flags */ | 53 | /* tmio MMC platform flags */ |
54 | #define TMIO_MMC_WRPROTECT_DISABLE (1 << 0) | 54 | #define TMIO_MMC_WRPROTECT_DISABLE (1 << 0) |
55 | /* | ||
56 | * Some controllers can support a 2-byte block size when the bus width | ||
57 | * is configured in 4-bit mode. | ||
58 | */ | ||
59 | #define TMIO_MMC_BLKSZ_2BYTES (1 << 1) | ||
55 | 60 | ||
56 | int tmio_core_mmc_enable(void __iomem *cnf, int shift, unsigned long base); | 61 | int tmio_core_mmc_enable(void __iomem *cnf, int shift, unsigned long base); |
57 | int tmio_core_mmc_resume(void __iomem *cnf, int shift, unsigned long base); | 62 | int tmio_core_mmc_resume(void __iomem *cnf, int shift, unsigned long base); |
@@ -74,6 +79,7 @@ struct tmio_mmc_data { | |||
74 | struct tmio_mmc_dma *dma; | 79 | struct tmio_mmc_dma *dma; |
75 | void (*set_pwr)(struct platform_device *host, int state); | 80 | void (*set_pwr)(struct platform_device *host, int state); |
76 | void (*set_clk_div)(struct platform_device *host, int state); | 81 | void (*set_clk_div)(struct platform_device *host, int state); |
82 | int (*get_cd)(struct platform_device *host); | ||
77 | }; | 83 | }; |
78 | 84 | ||
79 | /* | 85 | /* |
diff --git a/include/linux/mfd/tps6586x.h b/include/linux/mfd/tps6586x.h index 772b3ae640af..b6bab1b04e25 100644 --- a/include/linux/mfd/tps6586x.h +++ b/include/linux/mfd/tps6586x.h | |||
@@ -18,6 +18,36 @@ enum { | |||
18 | TPS6586X_ID_LDO_RTC, | 18 | TPS6586X_ID_LDO_RTC, |
19 | }; | 19 | }; |
20 | 20 | ||
21 | enum { | ||
22 | TPS6586X_INT_PLDO_0, | ||
23 | TPS6586X_INT_PLDO_1, | ||
24 | TPS6586X_INT_PLDO_2, | ||
25 | TPS6586X_INT_PLDO_3, | ||
26 | TPS6586X_INT_PLDO_4, | ||
27 | TPS6586X_INT_PLDO_5, | ||
28 | TPS6586X_INT_PLDO_6, | ||
29 | TPS6586X_INT_PLDO_7, | ||
30 | TPS6586X_INT_COMP_DET, | ||
31 | TPS6586X_INT_ADC, | ||
32 | TPS6586X_INT_PLDO_8, | ||
33 | TPS6586X_INT_PLDO_9, | ||
34 | TPS6586X_INT_PSM_0, | ||
35 | TPS6586X_INT_PSM_1, | ||
36 | TPS6586X_INT_PSM_2, | ||
37 | TPS6586X_INT_PSM_3, | ||
38 | TPS6586X_INT_RTC_ALM1, | ||
39 | TPS6586X_INT_ACUSB_OVP, | ||
40 | TPS6586X_INT_USB_DET, | ||
41 | TPS6586X_INT_AC_DET, | ||
42 | TPS6586X_INT_BAT_DET, | ||
43 | TPS6586X_INT_CHG_STAT, | ||
44 | TPS6586X_INT_CHG_TEMP, | ||
45 | TPS6586X_INT_PP, | ||
46 | TPS6586X_INT_RESUME, | ||
47 | TPS6586X_INT_LOW_SYS, | ||
48 | TPS6586X_INT_RTC_ALM2, | ||
49 | }; | ||
50 | |||
21 | struct tps6586x_subdev_info { | 51 | struct tps6586x_subdev_info { |
22 | int id; | 52 | int id; |
23 | const char *name; | 53 | const char *name; |
@@ -29,6 +59,7 @@ struct tps6586x_platform_data { | |||
29 | struct tps6586x_subdev_info *subdevs; | 59 | struct tps6586x_subdev_info *subdevs; |
30 | 60 | ||
31 | int gpio_base; | 61 | int gpio_base; |
62 | int irq_base; | ||
32 | }; | 63 | }; |
33 | 64 | ||
34 | /* | 65 | /* |
diff --git a/include/linux/mfd/wm831x/core.h b/include/linux/mfd/wm831x/core.h index eb5bd4e0e03c..a1239c48b41a 100644 --- a/include/linux/mfd/wm831x/core.h +++ b/include/linux/mfd/wm831x/core.h | |||
@@ -238,6 +238,15 @@ struct regulator_dev; | |||
238 | 238 | ||
239 | #define WM831X_NUM_IRQ_REGS 5 | 239 | #define WM831X_NUM_IRQ_REGS 5 |
240 | 240 | ||
241 | enum wm831x_parent { | ||
242 | WM8310 = 0x8310, | ||
243 | WM8311 = 0x8311, | ||
244 | WM8312 = 0x8312, | ||
245 | WM8320 = 0x8320, | ||
246 | WM8321 = 0x8321, | ||
247 | WM8325 = 0x8325, | ||
248 | }; | ||
249 | |||
241 | struct wm831x { | 250 | struct wm831x { |
242 | struct mutex io_lock; | 251 | struct mutex io_lock; |
243 | 252 | ||
@@ -285,6 +294,9 @@ int wm831x_set_bits(struct wm831x *wm831x, unsigned short reg, | |||
285 | int wm831x_bulk_read(struct wm831x *wm831x, unsigned short reg, | 294 | int wm831x_bulk_read(struct wm831x *wm831x, unsigned short reg, |
286 | int count, u16 *buf); | 295 | int count, u16 *buf); |
287 | 296 | ||
297 | int wm831x_device_init(struct wm831x *wm831x, unsigned long id, int irq); | ||
298 | void wm831x_device_exit(struct wm831x *wm831x); | ||
299 | int wm831x_device_suspend(struct wm831x *wm831x); | ||
288 | int wm831x_irq_init(struct wm831x *wm831x, int irq); | 300 | int wm831x_irq_init(struct wm831x *wm831x, int irq); |
289 | void wm831x_irq_exit(struct wm831x *wm831x); | 301 | void wm831x_irq_exit(struct wm831x *wm831x); |
290 | 302 | ||