|
@@ -327,6 +327,8 @@ static int i2c_device_probe(struct device *dev)
|
|
|
|
|
|
|
|
if (client->flags & I2C_CLIENT_HOST_NOTIFY) {
|
|
if (client->flags & I2C_CLIENT_HOST_NOTIFY) {
|
|
|
dev_dbg(dev, "Using Host Notify IRQ\n");
|
|
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);
|
|
irq = i2c_smbus_host_notify_to_irq(client);
|
|
|
} else if (dev->of_node) {
|
|
} else if (dev->of_node) {
|
|
|
irq = of_irq_get_byname(dev->of_node, "irq");
|
|
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);
|
|
device_init_wakeup(&client->dev, false);
|
|
|
|
|
|
|
|
client->irq = client->init_irq;
|
|
client->irq = client->init_irq;
|
|
|
|
|
+ if (client->flags & I2C_CLIENT_HOST_NOTIFY)
|
|
|
|
|
+ pm_runtime_put(&client->adapter->dev);
|
|
|
|
|
|
|
|
return status;
|
|
return status;
|
|
|
}
|
|
}
|