|
|
@@ -1245,6 +1245,28 @@ free:
|
|
|
return status;
|
|
|
}
|
|
|
|
|
|
+static int __maybe_unused twl_suspend(struct device *dev)
|
|
|
+{
|
|
|
+ struct i2c_client *client = to_i2c_client(dev);
|
|
|
+
|
|
|
+ if (client->irq)
|
|
|
+ disable_irq(client->irq);
|
|
|
+
|
|
|
+ return 0;
|
|
|
+}
|
|
|
+
|
|
|
+static int __maybe_unused twl_resume(struct device *dev)
|
|
|
+{
|
|
|
+ struct i2c_client *client = to_i2c_client(dev);
|
|
|
+
|
|
|
+ if (client->irq)
|
|
|
+ enable_irq(client->irq);
|
|
|
+
|
|
|
+ return 0;
|
|
|
+}
|
|
|
+
|
|
|
+static SIMPLE_DEV_PM_OPS(twl_dev_pm_ops, twl_suspend, twl_resume);
|
|
|
+
|
|
|
static const struct i2c_device_id twl_ids[] = {
|
|
|
{ "twl4030", TWL4030_VAUX2 }, /* "Triton 2" */
|
|
|
{ "twl5030", 0 }, /* T2 updated */
|
|
|
@@ -1262,6 +1284,7 @@ static const struct i2c_device_id twl_ids[] = {
|
|
|
/* One Client Driver , 4 Clients */
|
|
|
static struct i2c_driver twl_driver = {
|
|
|
.driver.name = DRIVER_NAME,
|
|
|
+ .driver.pm = &twl_dev_pm_ops,
|
|
|
.id_table = twl_ids,
|
|
|
.probe = twl_probe,
|
|
|
.remove = twl_remove,
|