diff options
| -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 38af18645133..8149c9e32b69 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) | |||
| 327 | 327 | ||
| 328 | if (client->flags & I2C_CLIENT_HOST_NOTIFY) { | 328 | if (client->flags & I2C_CLIENT_HOST_NOTIFY) { |
| 329 | dev_dbg(dev, "Using Host Notify IRQ\n"); | 329 | dev_dbg(dev, "Using Host Notify IRQ\n"); |
| 330 | /* Keep adapter active when Host Notify is required */ | ||
| 331 | pm_runtime_get_sync(&client->adapter->dev); | ||
| 330 | irq = i2c_smbus_host_notify_to_irq(client); | 332 | irq = i2c_smbus_host_notify_to_irq(client); |
| 331 | } else if (dev->of_node) { | 333 | } else if (dev->of_node) { |
| 332 | irq = of_irq_get_byname(dev->of_node, "irq"); | 334 | irq = of_irq_get_byname(dev->of_node, "irq"); |
| @@ -431,6 +433,8 @@ static int i2c_device_remove(struct device *dev) | |||
| 431 | device_init_wakeup(&client->dev, false); | 433 | device_init_wakeup(&client->dev, false); |
| 432 | 434 | ||
| 433 | client->irq = client->init_irq; | 435 | client->irq = client->init_irq; |
| 436 | if (client->flags & I2C_CLIENT_HOST_NOTIFY) | ||
| 437 | pm_runtime_put(&client->adapter->dev); | ||
| 434 | 438 | ||
| 435 | return status; | 439 | return status; |
| 436 | } | 440 | } |
