diff options
author | Joel Stanley <joel@jms.id.au> | 2019-05-08 16:48:45 +0300 |
---|---|---|
committer | Joel Stanley <joel@jms.id.au> | 2019-05-08 16:48:48 +0300 |
commit | d09fc0c4bdfbcbe251df247b5a94e2a07dec9c2f (patch) | |
tree | 893d98100d3ede2ff76905a67e1b9798c8c88868 /drivers/mfd/twl-core.c | |
parent | 76cc3bd0c342199b0bc0fd6afc7035274bf7a718 (diff) | |
parent | 274ede3e1a5fb3d0fd33acafb08993e95972c51f (diff) | |
download | linux-dev-5.0.tar.xz |
Merge tag 'v5.0.14' into dev-5.0dev-5.0
This is the 5.0.14 stable release
Signed-off-by: Joel Stanley <joel@jms.id.au>
Diffstat (limited to 'drivers/mfd/twl-core.c')
-rw-r--r-- | drivers/mfd/twl-core.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/drivers/mfd/twl-core.c b/drivers/mfd/twl-core.c index 299016bc46d9..104477b512a2 100644 --- a/drivers/mfd/twl-core.c +++ b/drivers/mfd/twl-core.c @@ -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, |