aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mfd/stmpe.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2010-10-28 18:54:04 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2010-10-28 18:54:04 -0400
commitb779b332d0e1ef68f40867948ae5526a3e925163 (patch)
treed2fc8bb455d696fbdb288055ce0a4f0cfcee31fd /drivers/mfd/stmpe.c
parenta0cadc2777a71b1fde62e6417284b38e52128e88 (diff)
parent0f48285755991b73c14b6eeeee464590f490ac25 (diff)
Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo/mfd-2.6
* 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo/mfd-2.6: (73 commits) power: Revert "power_supply: Mark twl4030_charger as broken" mfd: Fix a memory leak when unload mc13xxx-core module mfd: Fix resource reclaim for max8998 mfd: Remove unneeded ret value checking for max8998 register updates mfd: Add free max8998->ono irq in max8998_irq_exit() mfd: Fix resource reclaim in pcf50633_remove() omap4: pandaboard: fix up mmc card detect logic mfd: Fix ezx_pcap_probe error path mfd: Fix off-by-one value range checking for tps6507x mfd: Remove __devinitdata from tc6393xb_mmc_resources mfd: Add WM831x SPI support mfd: Factor out WM831x I2C I/O from the core driver mfd: Remove DEBUG defines from mc13xxx-core mfd: Fix jz4740_adc_set_enabled mfd: Add TPS658621C device ID mfd: Fix twl-irq function declaration warnings regulator: max8998 BUCK1/2 voltage change with use of GPIOs mfd: Voltages and GPIOs platform_data definitions for max8998 regulator: max8998 BUCK1/2 internal voltages and indexes defined mfd: Support for ICs compliant with max8998 ...
Diffstat (limited to 'drivers/mfd/stmpe.c')
-rw-r--r--drivers/mfd/stmpe.c32
1 files changed, 32 insertions, 0 deletions
diff --git a/drivers/mfd/stmpe.c b/drivers/mfd/stmpe.c
index 0754c5e91995..b11487f1e1cb 100644
--- a/drivers/mfd/stmpe.c
+++ b/drivers/mfd/stmpe.c
@@ -873,6 +873,28 @@ static int __devinit stmpe_devices_init(struct stmpe *stmpe)
873 return ret; 873 return ret;
874} 874}
875 875
876#ifdef CONFIG_PM
877static int stmpe_suspend(struct device *dev)
878{
879 struct i2c_client *i2c = to_i2c_client(dev);
880
881 if (device_may_wakeup(&i2c->dev))
882 enable_irq_wake(i2c->irq);
883
884 return 0;
885}
886
887static int stmpe_resume(struct device *dev)
888{
889 struct i2c_client *i2c = to_i2c_client(dev);
890
891 if (device_may_wakeup(&i2c->dev))
892 disable_irq_wake(i2c->irq);
893
894 return 0;
895}
896#endif
897
876static int __devinit stmpe_probe(struct i2c_client *i2c, 898static int __devinit stmpe_probe(struct i2c_client *i2c,
877 const struct i2c_device_id *id) 899 const struct i2c_device_id *id)
878{ 900{
@@ -960,9 +982,19 @@ static const struct i2c_device_id stmpe_id[] = {
960}; 982};
961MODULE_DEVICE_TABLE(i2c, stmpe_id); 983MODULE_DEVICE_TABLE(i2c, stmpe_id);
962 984
985#ifdef CONFIG_PM
986static const struct dev_pm_ops stmpe_dev_pm_ops = {
987 .suspend = stmpe_suspend,
988 .resume = stmpe_resume,
989};
990#endif
991
963static struct i2c_driver stmpe_driver = { 992static struct i2c_driver stmpe_driver = {
964 .driver.name = "stmpe", 993 .driver.name = "stmpe",
965 .driver.owner = THIS_MODULE, 994 .driver.owner = THIS_MODULE,
995#ifdef CONFIG_PM
996 .driver.pm = &stmpe_dev_pm_ops,
997#endif
966 .probe = stmpe_probe, 998 .probe = stmpe_probe,
967 .remove = __devexit_p(stmpe_remove), 999 .remove = __devexit_p(stmpe_remove),
968 .id_table = stmpe_id, 1000 .id_table = stmpe_id,