aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input/touchscreen/mcs5000_ts.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2011-01-13 12:58:14 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2011-01-13 12:58:14 -0500
commitd24450e2075b9ceeef8ad942e6391bc73eae6933 (patch)
treef8966325219aa28089f9d3dc944433c5658168ab /drivers/input/touchscreen/mcs5000_ts.c
parent5cb2fad28fd8f95e911bed8c9342435a5b8e67de (diff)
parent01c728a246a1072fe9664b91179a47937182b0a0 (diff)
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: Input: add SW_ROTATE_LOCK switch type Input: fix force feedback capability query example Input: wacom_w8001 - add single-touch support Input: add Austria Microsystem AS5011 joystick driver Input: remove aaed2000 keyboard driver Input: i8042 - introduce 'notimeout' blacklist for Dell Vostro V13 Input: cy8ctmg110_ts - Convert to dev_pm_ops Input: migor_ts - convert to dev_pm_ops Input: mcs5000_ts - convert to dev_pm_ops Input: eeti_ts - convert to dev_pm_ops Input: ad7879 - convert I2C to dev_pm_ops
Diffstat (limited to 'drivers/input/touchscreen/mcs5000_ts.c')
-rw-r--r--drivers/input/touchscreen/mcs5000_ts.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/drivers/input/touchscreen/mcs5000_ts.c b/drivers/input/touchscreen/mcs5000_ts.c
index 6ee9940aaf5b..2d84c80ceb66 100644
--- a/drivers/input/touchscreen/mcs5000_ts.c
+++ b/drivers/input/touchscreen/mcs5000_ts.c
@@ -261,25 +261,27 @@ static int __devexit mcs5000_ts_remove(struct i2c_client *client)
261} 261}
262 262
263#ifdef CONFIG_PM 263#ifdef CONFIG_PM
264static int mcs5000_ts_suspend(struct i2c_client *client, pm_message_t mesg) 264static int mcs5000_ts_suspend(struct device *dev)
265{ 265{
266 struct i2c_client *client = to_i2c_client(dev);
267
266 /* Touch sleep mode */ 268 /* Touch sleep mode */
267 i2c_smbus_write_byte_data(client, MCS5000_TS_OP_MODE, OP_MODE_SLEEP); 269 i2c_smbus_write_byte_data(client, MCS5000_TS_OP_MODE, OP_MODE_SLEEP);
268 270
269 return 0; 271 return 0;
270} 272}
271 273
272static int mcs5000_ts_resume(struct i2c_client *client) 274static int mcs5000_ts_resume(struct device *dev)
273{ 275{
276 struct i2c_client *client = to_i2c_client(dev);
274 struct mcs5000_ts_data *data = i2c_get_clientdata(client); 277 struct mcs5000_ts_data *data = i2c_get_clientdata(client);
275 278
276 mcs5000_ts_phys_init(data); 279 mcs5000_ts_phys_init(data);
277 280
278 return 0; 281 return 0;
279} 282}
280#else 283
281#define mcs5000_ts_suspend NULL 284static SIMPLE_DEV_PM_OPS(mcs5000_ts_pm, mcs5000_ts_suspend, mcs5000_ts_resume);
282#define mcs5000_ts_resume NULL
283#endif 285#endif
284 286
285static const struct i2c_device_id mcs5000_ts_id[] = { 287static const struct i2c_device_id mcs5000_ts_id[] = {
@@ -291,10 +293,11 @@ MODULE_DEVICE_TABLE(i2c, mcs5000_ts_id);
291static struct i2c_driver mcs5000_ts_driver = { 293static struct i2c_driver mcs5000_ts_driver = {
292 .probe = mcs5000_ts_probe, 294 .probe = mcs5000_ts_probe,
293 .remove = __devexit_p(mcs5000_ts_remove), 295 .remove = __devexit_p(mcs5000_ts_remove),
294 .suspend = mcs5000_ts_suspend,
295 .resume = mcs5000_ts_resume,
296 .driver = { 296 .driver = {
297 .name = "mcs5000_ts", 297 .name = "mcs5000_ts",
298#ifdef CONFIG_PM
299 .pm = &mcs5000_ts_pm,
300#endif
298 }, 301 },
299 .id_table = mcs5000_ts_id, 302 .id_table = mcs5000_ts_id,
300}; 303};