summaryrefslogtreecommitdiff
path: root/drivers/mfd/max8998.c
diff options
context:
space:
mode:
authorJonghwan Choi <jhbird.choi@samsung.com>2011-11-29 17:17:51 +0900
committerSamuel Ortiz <sameo@linux.intel.com>2012-01-09 00:37:36 +0100
commit7ef73598d4ca8add089d5eb9f3b78e9540a1a98d (patch)
tree438e1d669b4cdcbbcda3e45a0599aa87d7afd985 /drivers/mfd/max8998.c
parentbdd6a67a3936f4da5ef382ec640b8d1eb1f209fa (diff)
mfd: Use standard device wakeup for handling max8998 wakeup device
Use device_init_wakeup & device_may_wakeup to init wakeup Signed-off-by: Jonghwan Choi <jhbird.choi@samsung.com> Acked-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'drivers/mfd/max8998.c')
-rw-r--r--drivers/mfd/max8998.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/mfd/max8998.c b/drivers/mfd/max8998.c
index de4096aee248..6ef56d28c056 100644
--- a/drivers/mfd/max8998.c
+++ b/drivers/mfd/max8998.c
@@ -176,6 +176,8 @@ static int max8998_i2c_probe(struct i2c_client *i2c,
if (ret < 0)
goto err;
+ device_init_wakeup(max8998->dev, max8998->wakeup);
+
return ret;
err:
@@ -210,7 +212,7 @@ static int max8998_suspend(struct device *dev)
struct i2c_client *i2c = container_of(dev, struct i2c_client, dev);
struct max8998_dev *max8998 = i2c_get_clientdata(i2c);
- if (max8998->wakeup)
+ if (device_may_wakeup(dev))
irq_set_irq_wake(max8998->irq, 1);
return 0;
}
@@ -220,7 +222,7 @@ static int max8998_resume(struct device *dev)
struct i2c_client *i2c = container_of(dev, struct i2c_client, dev);
struct max8998_dev *max8998 = i2c_get_clientdata(i2c);
- if (max8998->wakeup)
+ if (device_may_wakeup(dev))
irq_set_irq_wake(max8998->irq, 0);
/*
* In LP3974, if IRQ registers are not "read & clear"