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/i2c/i2c-core-base.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/i2c/i2c-core-base.c')
-rw-r--r-- | drivers/i2c/i2c-core-base.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/i2c/i2c-core-base.c b/drivers/i2c/i2c-core-base.c index af87a16ac3a5..60fb2afc0e50 100644 --- a/drivers/i2c/i2c-core-base.c +++ b/drivers/i2c/i2c-core-base.c @@ -327,6 +327,8 @@ static int i2c_device_probe(struct device *dev) if (client->flags & I2C_CLIENT_HOST_NOTIFY) { dev_dbg(dev, "Using Host Notify IRQ\n"); + /* Keep adapter active when Host Notify is required */ + pm_runtime_get_sync(&client->adapter->dev); irq = i2c_smbus_host_notify_to_irq(client); } else if (dev->of_node) { irq = of_irq_get_byname(dev->of_node, "irq"); @@ -431,6 +433,8 @@ static int i2c_device_remove(struct device *dev) device_init_wakeup(&client->dev, false); client->irq = client->init_irq; + if (client->flags & I2C_CLIENT_HOST_NOTIFY) + pm_runtime_put(&client->adapter->dev); return status; } |