diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-11-03 12:40:51 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-11-03 12:40:51 -0400 |
commit | a0a4194c943bc64dd7b6e26cccb036cb26b81363 (patch) | |
tree | 4282f0dd573344d10f69616eb05868b5cd563cc1 /drivers/input | |
parent | cf0223503e6198292cdcc864e01eeb5fe7490752 (diff) | |
parent | b958f7a7cbdfbf59ba61de7ebb9c59b0ee3a7967 (diff) |
Merge branch 'for-next' of git://git.infradead.org/users/sameo/mfd-2.6
* 'for-next' of git://git.infradead.org/users/sameo/mfd-2.6: (80 commits)
mfd: Fix missing abx500 header file updates
mfd: Add missing <linux/io.h> include to intel_msic
x86, mrst: add platform support for MSIC MFD driver
mfd: Expose TurnOnStatus in ab8500 sysfs
mfd: Remove support for early drop ab8500 chip
mfd: Add support for ab8500 v3.3
mfd: Add ab8500 interrupt disable hook
mfd: Convert db8500-prcmu panic() into pr_crit()
mfd: Refactor db8500-prcmu request_clock() function
mfd: Rename db8500-prcmu init function
mfd: Fix db5500-prcmu defines
mfd: db8500-prcmu voltage domain consumers additions
mfd: db8500-prcmu reset code retrieval
mfd: db8500-prcmu tweak for modem wakeup
mfd: Add db8500-pcmu watchdog accessor functions for watchdog
mfd: hwacc power state db8500-prcmu accessor
mfd: Add db8500-prcmu accessors for PLL and SGA clock
mfd: Move to the new db500 PRCMU API
mfd: Create a common interface for dbx500 PRCMU drivers
mfd: Initialize DB8500 PRCMU regs
...
Fix up trivial conflicts in
arch/arm/mach-imx/mach-mx31moboard.c
arch/arm/mach-omap2/board-omap3beagle.c
arch/arm/mach-u300/include/mach/irqs.h
drivers/mfd/wm831x-spi.c
Diffstat (limited to 'drivers/input')
-rw-r--r-- | drivers/input/misc/Kconfig | 10 | ||||
-rw-r--r-- | drivers/input/misc/Makefile | 1 | ||||
-rw-r--r-- | drivers/input/misc/mc13783-pwrbutton.c | 282 | ||||
-rw-r--r-- | drivers/input/touchscreen/mc13783_ts.c | 34 |
4 files changed, 310 insertions, 17 deletions
diff --git a/drivers/input/misc/Kconfig b/drivers/input/misc/Kconfig index 56aa465d1b99..22d875fde53a 100644 --- a/drivers/input/misc/Kconfig +++ b/drivers/input/misc/Kconfig | |||
@@ -134,6 +134,16 @@ config INPUT_MAX8925_ONKEY | |||
134 | To compile this driver as a module, choose M here: the module | 134 | To compile this driver as a module, choose M here: the module |
135 | will be called max8925_onkey. | 135 | will be called max8925_onkey. |
136 | 136 | ||
137 | config INPUT_MC13783_PWRBUTTON | ||
138 | tristate "MC13783 ON buttons" | ||
139 | depends on MFD_MC13783 | ||
140 | help | ||
141 | Support the ON buttons of MC13783 PMIC as an input device | ||
142 | reporting power button status. | ||
143 | |||
144 | To compile this driver as a module, choose M here: the module | ||
145 | will be called mc13783-pwrbutton. | ||
146 | |||
137 | config INPUT_MMA8450 | 147 | config INPUT_MMA8450 |
138 | tristate "MMA8450 - Freescale's 3-Axis, 8/12-bit Digital Accelerometer" | 148 | tristate "MMA8450 - Freescale's 3-Axis, 8/12-bit Digital Accelerometer" |
139 | depends on I2C | 149 | depends on I2C |
diff --git a/drivers/input/misc/Makefile b/drivers/input/misc/Makefile index 62dcd79d548f..a244fc6a781c 100644 --- a/drivers/input/misc/Makefile +++ b/drivers/input/misc/Makefile | |||
@@ -28,6 +28,7 @@ obj-$(CONFIG_INPUT_KEYSPAN_REMOTE) += keyspan_remote.o | |||
28 | obj-$(CONFIG_INPUT_KXTJ9) += kxtj9.o | 28 | obj-$(CONFIG_INPUT_KXTJ9) += kxtj9.o |
29 | obj-$(CONFIG_INPUT_M68K_BEEP) += m68kspkr.o | 29 | obj-$(CONFIG_INPUT_M68K_BEEP) += m68kspkr.o |
30 | obj-$(CONFIG_INPUT_MAX8925_ONKEY) += max8925_onkey.o | 30 | obj-$(CONFIG_INPUT_MAX8925_ONKEY) += max8925_onkey.o |
31 | obj-$(CONFIG_INPUT_MC13783_PWRBUTTON) += mc13783-pwrbutton.o | ||
31 | obj-$(CONFIG_INPUT_MMA8450) += mma8450.o | 32 | obj-$(CONFIG_INPUT_MMA8450) += mma8450.o |
32 | obj-$(CONFIG_INPUT_MPU3050) += mpu3050.o | 33 | obj-$(CONFIG_INPUT_MPU3050) += mpu3050.o |
33 | obj-$(CONFIG_INPUT_PCAP) += pcap_keys.o | 34 | obj-$(CONFIG_INPUT_PCAP) += pcap_keys.o |
diff --git a/drivers/input/misc/mc13783-pwrbutton.c b/drivers/input/misc/mc13783-pwrbutton.c new file mode 100644 index 000000000000..09b052288657 --- /dev/null +++ b/drivers/input/misc/mc13783-pwrbutton.c | |||
@@ -0,0 +1,282 @@ | |||
1 | /** | ||
2 | * Copyright (C) 2011 Philippe Rétornaz | ||
3 | * | ||
4 | * Based on twl4030-pwrbutton driver by: | ||
5 | * Peter De Schrijver <peter.de-schrijver@nokia.com> | ||
6 | * Felipe Balbi <felipe.balbi@nokia.com> | ||
7 | * | ||
8 | * This file is subject to the terms and conditions of the GNU General | ||
9 | * Public License. See the file "COPYING" in the main directory of this | ||
10 | * archive for more details. | ||
11 | * | ||
12 | * This program is distributed in the hope that it will be useful, | ||
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
15 | * GNU General Public License for more details. | ||
16 | * | ||
17 | * You should have received a copy of the GNU General Public License | ||
18 | * along with this program; if not, write to the Free Software | ||
19 | * Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA 02110-1335 USA | ||
20 | */ | ||
21 | |||
22 | #include <linux/module.h> | ||
23 | #include <linux/init.h> | ||
24 | #include <linux/kernel.h> | ||
25 | #include <linux/errno.h> | ||
26 | #include <linux/input.h> | ||
27 | #include <linux/interrupt.h> | ||
28 | #include <linux/platform_device.h> | ||
29 | #include <linux/mfd/mc13783.h> | ||
30 | #include <linux/sched.h> | ||
31 | #include <linux/slab.h> | ||
32 | |||
33 | struct mc13783_pwrb { | ||
34 | struct input_dev *pwr; | ||
35 | struct mc13xxx *mc13783; | ||
36 | #define MC13783_PWRB_B1_POL_INVERT (1 << 0) | ||
37 | #define MC13783_PWRB_B2_POL_INVERT (1 << 1) | ||
38 | #define MC13783_PWRB_B3_POL_INVERT (1 << 2) | ||
39 | int flags; | ||
40 | unsigned short keymap[3]; | ||
41 | }; | ||
42 | |||
43 | #define MC13783_REG_INTERRUPT_SENSE_1 5 | ||
44 | #define MC13783_IRQSENSE1_ONOFD1S (1 << 3) | ||
45 | #define MC13783_IRQSENSE1_ONOFD2S (1 << 4) | ||
46 | #define MC13783_IRQSENSE1_ONOFD3S (1 << 5) | ||
47 | |||
48 | #define MC13783_REG_POWER_CONTROL_2 15 | ||
49 | #define MC13783_POWER_CONTROL_2_ON1BDBNC 4 | ||
50 | #define MC13783_POWER_CONTROL_2_ON2BDBNC 6 | ||
51 | #define MC13783_POWER_CONTROL_2_ON3BDBNC 8 | ||
52 | #define MC13783_POWER_CONTROL_2_ON1BRSTEN (1 << 1) | ||
53 | #define MC13783_POWER_CONTROL_2_ON2BRSTEN (1 << 2) | ||
54 | #define MC13783_POWER_CONTROL_2_ON3BRSTEN (1 << 3) | ||
55 | |||
56 | static irqreturn_t button_irq(int irq, void *_priv) | ||
57 | { | ||
58 | struct mc13783_pwrb *priv = _priv; | ||
59 | int val; | ||
60 | |||
61 | mc13xxx_irq_ack(priv->mc13783, irq); | ||
62 | mc13xxx_reg_read(priv->mc13783, MC13783_REG_INTERRUPT_SENSE_1, &val); | ||
63 | |||
64 | switch (irq) { | ||
65 | case MC13783_IRQ_ONOFD1: | ||
66 | val = val & MC13783_IRQSENSE1_ONOFD1S ? 1 : 0; | ||
67 | if (priv->flags & MC13783_PWRB_B1_POL_INVERT) | ||
68 | val ^= 1; | ||
69 | input_report_key(priv->pwr, priv->keymap[0], val); | ||
70 | break; | ||
71 | |||
72 | case MC13783_IRQ_ONOFD2: | ||
73 | val = val & MC13783_IRQSENSE1_ONOFD2S ? 1 : 0; | ||
74 | if (priv->flags & MC13783_PWRB_B2_POL_INVERT) | ||
75 | val ^= 1; | ||
76 | input_report_key(priv->pwr, priv->keymap[1], val); | ||
77 | break; | ||
78 | |||
79 | case MC13783_IRQ_ONOFD3: | ||
80 | val = val & MC13783_IRQSENSE1_ONOFD3S ? 1 : 0; | ||
81 | if (priv->flags & MC13783_PWRB_B3_POL_INVERT) | ||
82 | val ^= 1; | ||
83 | input_report_key(priv->pwr, priv->keymap[2], val); | ||
84 | break; | ||
85 | } | ||
86 | |||
87 | input_sync(priv->pwr); | ||
88 | |||
89 | return IRQ_HANDLED; | ||
90 | } | ||
91 | |||
92 | static int __devinit mc13783_pwrbutton_probe(struct platform_device *pdev) | ||
93 | { | ||
94 | const struct mc13xxx_buttons_platform_data *pdata; | ||
95 | struct mc13xxx *mc13783 = dev_get_drvdata(pdev->dev.parent); | ||
96 | struct input_dev *pwr; | ||
97 | struct mc13783_pwrb *priv; | ||
98 | int err = 0; | ||
99 | int reg = 0; | ||
100 | |||
101 | pdata = dev_get_platdata(&pdev->dev); | ||
102 | if (!pdata) { | ||
103 | dev_err(&pdev->dev, "missing platform data\n"); | ||
104 | return -ENODEV; | ||
105 | } | ||
106 | |||
107 | pwr = input_allocate_device(); | ||
108 | if (!pwr) { | ||
109 | dev_dbg(&pdev->dev, "Can't allocate power button\n"); | ||
110 | return -ENOMEM; | ||
111 | } | ||
112 | |||
113 | priv = kzalloc(sizeof(*priv), GFP_KERNEL); | ||
114 | if (!priv) { | ||
115 | err = -ENOMEM; | ||
116 | dev_dbg(&pdev->dev, "Can't allocate power button\n"); | ||
117 | goto free_input_dev; | ||
118 | } | ||
119 | |||
120 | reg |= (pdata->b1on_flags & 0x3) << MC13783_POWER_CONTROL_2_ON1BDBNC; | ||
121 | reg |= (pdata->b2on_flags & 0x3) << MC13783_POWER_CONTROL_2_ON2BDBNC; | ||
122 | reg |= (pdata->b3on_flags & 0x3) << MC13783_POWER_CONTROL_2_ON3BDBNC; | ||
123 | |||
124 | priv->pwr = pwr; | ||
125 | priv->mc13783 = mc13783; | ||
126 | |||
127 | mc13xxx_lock(mc13783); | ||
128 | |||
129 | if (pdata->b1on_flags & MC13783_BUTTON_ENABLE) { | ||
130 | priv->keymap[0] = pdata->b1on_key; | ||
131 | if (pdata->b1on_key != KEY_RESERVED) | ||
132 | __set_bit(pdata->b1on_key, pwr->keybit); | ||
133 | |||
134 | if (pdata->b1on_flags & MC13783_BUTTON_POL_INVERT) | ||
135 | priv->flags |= MC13783_PWRB_B1_POL_INVERT; | ||
136 | |||
137 | if (pdata->b1on_flags & MC13783_BUTTON_RESET_EN) | ||
138 | reg |= MC13783_POWER_CONTROL_2_ON1BRSTEN; | ||
139 | |||
140 | err = mc13xxx_irq_request(mc13783, MC13783_IRQ_ONOFD1, | ||
141 | button_irq, "b1on", priv); | ||
142 | if (err) { | ||
143 | dev_dbg(&pdev->dev, "Can't request irq\n"); | ||
144 | goto free_priv; | ||
145 | } | ||
146 | } | ||
147 | |||
148 | if (pdata->b2on_flags & MC13783_BUTTON_ENABLE) { | ||
149 | priv->keymap[1] = pdata->b2on_key; | ||
150 | if (pdata->b2on_key != KEY_RESERVED) | ||
151 | __set_bit(pdata->b2on_key, pwr->keybit); | ||
152 | |||
153 | if (pdata->b2on_flags & MC13783_BUTTON_POL_INVERT) | ||
154 | priv->flags |= MC13783_PWRB_B2_POL_INVERT; | ||
155 | |||
156 | if (pdata->b2on_flags & MC13783_BUTTON_RESET_EN) | ||
157 | reg |= MC13783_POWER_CONTROL_2_ON2BRSTEN; | ||
158 | |||
159 | err = mc13xxx_irq_request(mc13783, MC13783_IRQ_ONOFD2, | ||
160 | button_irq, "b2on", priv); | ||
161 | if (err) { | ||
162 | dev_dbg(&pdev->dev, "Can't request irq\n"); | ||
163 | goto free_irq_b1; | ||
164 | } | ||
165 | } | ||
166 | |||
167 | if (pdata->b3on_flags & MC13783_BUTTON_ENABLE) { | ||
168 | priv->keymap[2] = pdata->b3on_key; | ||
169 | if (pdata->b3on_key != KEY_RESERVED) | ||
170 | __set_bit(pdata->b3on_key, pwr->keybit); | ||
171 | |||
172 | if (pdata->b3on_flags & MC13783_BUTTON_POL_INVERT) | ||
173 | priv->flags |= MC13783_PWRB_B3_POL_INVERT; | ||
174 | |||
175 | if (pdata->b3on_flags & MC13783_BUTTON_RESET_EN) | ||
176 | reg |= MC13783_POWER_CONTROL_2_ON3BRSTEN; | ||
177 | |||
178 | err = mc13xxx_irq_request(mc13783, MC13783_IRQ_ONOFD3, | ||
179 | button_irq, "b3on", priv); | ||
180 | if (err) { | ||
181 | dev_dbg(&pdev->dev, "Can't request irq: %d\n", err); | ||
182 | goto free_irq_b2; | ||
183 | } | ||
184 | } | ||
185 | |||
186 | mc13xxx_reg_rmw(mc13783, MC13783_REG_POWER_CONTROL_2, 0x3FE, reg); | ||
187 | |||
188 | mc13xxx_unlock(mc13783); | ||
189 | |||
190 | pwr->name = "mc13783_pwrbutton"; | ||
191 | pwr->phys = "mc13783_pwrbutton/input0"; | ||
192 | pwr->dev.parent = &pdev->dev; | ||
193 | |||
194 | pwr->keycode = priv->keymap; | ||
195 | pwr->keycodemax = ARRAY_SIZE(priv->keymap); | ||
196 | pwr->keycodesize = sizeof(priv->keymap[0]); | ||
197 | __set_bit(EV_KEY, pwr->evbit); | ||
198 | |||
199 | err = input_register_device(pwr); | ||
200 | if (err) { | ||
201 | dev_dbg(&pdev->dev, "Can't register power button: %d\n", err); | ||
202 | goto free_irq; | ||
203 | } | ||
204 | |||
205 | platform_set_drvdata(pdev, priv); | ||
206 | |||
207 | return 0; | ||
208 | |||
209 | free_irq: | ||
210 | mc13xxx_lock(mc13783); | ||
211 | |||
212 | if (pdata->b3on_flags & MC13783_BUTTON_ENABLE) | ||
213 | mc13xxx_irq_free(mc13783, MC13783_IRQ_ONOFD3, priv); | ||
214 | |||
215 | free_irq_b2: | ||
216 | if (pdata->b2on_flags & MC13783_BUTTON_ENABLE) | ||
217 | mc13xxx_irq_free(mc13783, MC13783_IRQ_ONOFD2, priv); | ||
218 | |||
219 | free_irq_b1: | ||
220 | if (pdata->b1on_flags & MC13783_BUTTON_ENABLE) | ||
221 | mc13xxx_irq_free(mc13783, MC13783_IRQ_ONOFD1, priv); | ||
222 | |||
223 | free_priv: | ||
224 | mc13xxx_unlock(mc13783); | ||
225 | kfree(priv); | ||
226 | |||
227 | free_input_dev: | ||
228 | input_free_device(pwr); | ||
229 | |||
230 | return err; | ||
231 | } | ||
232 | |||
233 | static int __devexit mc13783_pwrbutton_remove(struct platform_device *pdev) | ||
234 | { | ||
235 | struct mc13783_pwrb *priv = platform_get_drvdata(pdev); | ||
236 | const struct mc13xxx_buttons_platform_data *pdata; | ||
237 | |||
238 | pdata = dev_get_platdata(&pdev->dev); | ||
239 | |||
240 | mc13xxx_lock(priv->mc13783); | ||
241 | |||
242 | if (pdata->b3on_flags & MC13783_BUTTON_ENABLE) | ||
243 | mc13xxx_irq_free(priv->mc13783, MC13783_IRQ_ONOFD3, priv); | ||
244 | if (pdata->b2on_flags & MC13783_BUTTON_ENABLE) | ||
245 | mc13xxx_irq_free(priv->mc13783, MC13783_IRQ_ONOFD2, priv); | ||
246 | if (pdata->b1on_flags & MC13783_BUTTON_ENABLE) | ||
247 | mc13xxx_irq_free(priv->mc13783, MC13783_IRQ_ONOFD1, priv); | ||
248 | |||
249 | mc13xxx_unlock(priv->mc13783); | ||
250 | |||
251 | input_unregister_device(priv->pwr); | ||
252 | kfree(priv); | ||
253 | platform_set_drvdata(pdev, NULL); | ||
254 | |||
255 | return 0; | ||
256 | } | ||
257 | |||
258 | struct platform_driver mc13783_pwrbutton_driver = { | ||
259 | .probe = mc13783_pwrbutton_probe, | ||
260 | .remove = __devexit_p(mc13783_pwrbutton_remove), | ||
261 | .driver = { | ||
262 | .name = "mc13783-pwrbutton", | ||
263 | .owner = THIS_MODULE, | ||
264 | }, | ||
265 | }; | ||
266 | |||
267 | static int __init mc13783_pwrbutton_init(void) | ||
268 | { | ||
269 | return platform_driver_register(&mc13783_pwrbutton_driver); | ||
270 | } | ||
271 | module_init(mc13783_pwrbutton_init); | ||
272 | |||
273 | static void __exit mc13783_pwrbutton_exit(void) | ||
274 | { | ||
275 | platform_driver_unregister(&mc13783_pwrbutton_driver); | ||
276 | } | ||
277 | module_exit(mc13783_pwrbutton_exit); | ||
278 | |||
279 | MODULE_ALIAS("platform:mc13783-pwrbutton"); | ||
280 | MODULE_DESCRIPTION("MC13783 Power Button"); | ||
281 | MODULE_LICENSE("GPL v2"); | ||
282 | MODULE_AUTHOR("Philippe Retornaz"); | ||
diff --git a/drivers/input/touchscreen/mc13783_ts.c b/drivers/input/touchscreen/mc13783_ts.c index c5bc62d85bb6..ede02743eac1 100644 --- a/drivers/input/touchscreen/mc13783_ts.c +++ b/drivers/input/touchscreen/mc13783_ts.c | |||
@@ -35,7 +35,7 @@ MODULE_PARM_DESC(sample_tolerance, | |||
35 | 35 | ||
36 | struct mc13783_ts_priv { | 36 | struct mc13783_ts_priv { |
37 | struct input_dev *idev; | 37 | struct input_dev *idev; |
38 | struct mc13783 *mc13783; | 38 | struct mc13xxx *mc13xxx; |
39 | struct delayed_work work; | 39 | struct delayed_work work; |
40 | struct workqueue_struct *workq; | 40 | struct workqueue_struct *workq; |
41 | unsigned int sample[4]; | 41 | unsigned int sample[4]; |
@@ -45,7 +45,7 @@ static irqreturn_t mc13783_ts_handler(int irq, void *data) | |||
45 | { | 45 | { |
46 | struct mc13783_ts_priv *priv = data; | 46 | struct mc13783_ts_priv *priv = data; |
47 | 47 | ||
48 | mc13783_irq_ack(priv->mc13783, irq); | 48 | mc13xxx_irq_ack(priv->mc13xxx, irq); |
49 | 49 | ||
50 | /* | 50 | /* |
51 | * Kick off reading coordinates. Note that if work happens already | 51 | * Kick off reading coordinates. Note that if work happens already |
@@ -121,10 +121,10 @@ static void mc13783_ts_work(struct work_struct *work) | |||
121 | { | 121 | { |
122 | struct mc13783_ts_priv *priv = | 122 | struct mc13783_ts_priv *priv = |
123 | container_of(work, struct mc13783_ts_priv, work.work); | 123 | container_of(work, struct mc13783_ts_priv, work.work); |
124 | unsigned int mode = MC13783_ADC_MODE_TS; | 124 | unsigned int mode = MC13XXX_ADC_MODE_TS; |
125 | unsigned int channel = 12; | 125 | unsigned int channel = 12; |
126 | 126 | ||
127 | if (mc13783_adc_do_conversion(priv->mc13783, | 127 | if (mc13xxx_adc_do_conversion(priv->mc13xxx, |
128 | mode, channel, priv->sample) == 0) | 128 | mode, channel, priv->sample) == 0) |
129 | mc13783_ts_report_sample(priv); | 129 | mc13783_ts_report_sample(priv); |
130 | } | 130 | } |
@@ -134,21 +134,21 @@ static int mc13783_ts_open(struct input_dev *dev) | |||
134 | struct mc13783_ts_priv *priv = input_get_drvdata(dev); | 134 | struct mc13783_ts_priv *priv = input_get_drvdata(dev); |
135 | int ret; | 135 | int ret; |
136 | 136 | ||
137 | mc13783_lock(priv->mc13783); | 137 | mc13xxx_lock(priv->mc13xxx); |
138 | 138 | ||
139 | mc13783_irq_ack(priv->mc13783, MC13783_IRQ_TS); | 139 | mc13xxx_irq_ack(priv->mc13xxx, MC13XXX_IRQ_TS); |
140 | 140 | ||
141 | ret = mc13783_irq_request(priv->mc13783, MC13783_IRQ_TS, | 141 | ret = mc13xxx_irq_request(priv->mc13xxx, MC13XXX_IRQ_TS, |
142 | mc13783_ts_handler, MC13783_TS_NAME, priv); | 142 | mc13783_ts_handler, MC13783_TS_NAME, priv); |
143 | if (ret) | 143 | if (ret) |
144 | goto out; | 144 | goto out; |
145 | 145 | ||
146 | ret = mc13783_reg_rmw(priv->mc13783, MC13783_ADC0, | 146 | ret = mc13xxx_reg_rmw(priv->mc13xxx, MC13XXX_ADC0, |
147 | MC13783_ADC0_TSMOD_MASK, MC13783_ADC0_TSMOD0); | 147 | MC13XXX_ADC0_TSMOD_MASK, MC13XXX_ADC0_TSMOD0); |
148 | if (ret) | 148 | if (ret) |
149 | mc13783_irq_free(priv->mc13783, MC13783_IRQ_TS, priv); | 149 | mc13xxx_irq_free(priv->mc13xxx, MC13XXX_IRQ_TS, priv); |
150 | out: | 150 | out: |
151 | mc13783_unlock(priv->mc13783); | 151 | mc13xxx_unlock(priv->mc13xxx); |
152 | return ret; | 152 | return ret; |
153 | } | 153 | } |
154 | 154 | ||
@@ -156,11 +156,11 @@ static void mc13783_ts_close(struct input_dev *dev) | |||
156 | { | 156 | { |
157 | struct mc13783_ts_priv *priv = input_get_drvdata(dev); | 157 | struct mc13783_ts_priv *priv = input_get_drvdata(dev); |
158 | 158 | ||
159 | mc13783_lock(priv->mc13783); | 159 | mc13xxx_lock(priv->mc13xxx); |
160 | mc13783_reg_rmw(priv->mc13783, MC13783_ADC0, | 160 | mc13xxx_reg_rmw(priv->mc13xxx, MC13XXX_ADC0, |
161 | MC13783_ADC0_TSMOD_MASK, 0); | 161 | MC13XXX_ADC0_TSMOD_MASK, 0); |
162 | mc13783_irq_free(priv->mc13783, MC13783_IRQ_TS, priv); | 162 | mc13xxx_irq_free(priv->mc13xxx, MC13XXX_IRQ_TS, priv); |
163 | mc13783_unlock(priv->mc13783); | 163 | mc13xxx_unlock(priv->mc13xxx); |
164 | 164 | ||
165 | cancel_delayed_work_sync(&priv->work); | 165 | cancel_delayed_work_sync(&priv->work); |
166 | } | 166 | } |
@@ -177,7 +177,7 @@ static int __init mc13783_ts_probe(struct platform_device *pdev) | |||
177 | goto err_free_mem; | 177 | goto err_free_mem; |
178 | 178 | ||
179 | INIT_DELAYED_WORK(&priv->work, mc13783_ts_work); | 179 | INIT_DELAYED_WORK(&priv->work, mc13783_ts_work); |
180 | priv->mc13783 = dev_get_drvdata(pdev->dev.parent); | 180 | priv->mc13xxx = dev_get_drvdata(pdev->dev.parent); |
181 | priv->idev = idev; | 181 | priv->idev = idev; |
182 | 182 | ||
183 | /* | 183 | /* |