i2c: designware: Fix runtime PM for I2C slave mode
authorJarkko Nikula <jarkko.nikula@linux.intel.com>
Tue, 15 Aug 2017 14:34:45 +0000 (17:34 +0300)
committerWolfram Sang <wsa@the-dreams.de>
Thu, 17 Aug 2017 15:55:29 +0000 (17:55 +0200)
commit2a86cdd2e7d3c75580f41f89f9b9211e225573cc
tree94351b93ccf3d23512788566d27739dde6a1cd3f
parent733f6563979d96dec180c350abb8ac67cc0367ba
i2c: designware: Fix runtime PM for I2C slave mode

I2C slave controller must be powered and active all the time when I2C
slave backend is registered in order to let master address and
communicate with us.

Now if the controller is runtime PM capable it will be suspended after
probe and cannot ever respond to the master or generate interrupts.

Fix this by resuming the controller when I2C slave backend is registered
and let it suspend after unregistering.

Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
drivers/i2c/busses/i2c-designware-slave.c