]> git.baikalelectronics.ru Git - kernel.git/commit
i2c: rcar: disable runtime PM correctly in slave mode
authorWolfram Sang <wsa+renesas@sang-engineering.com>
Wed, 16 Dec 2015 19:05:18 +0000 (20:05 +0100)
committerWolfram Sang <wsa@the-dreams.de>
Sat, 19 Dec 2015 11:00:37 +0000 (12:00 +0100)
commitbd476f20de0ecbf65fec99f568cc19309a216a42
tree58141870b6398365cb1a4b7a98e0b94161e0c0b3
parent602629329074f3dfd4cb1cedaa716b49bda5f587
i2c: rcar: disable runtime PM correctly in slave mode

When we also are I2C slave, we need to disable runtime PM because the
address detection mechanism needs to be active all the time. However, we
can reenable runtime PM once the slave instance was unregistered. So,
use pm_runtime_get_sync/put to achieve this, since it has proper
refcounting. pm_runtime_allow/forbid is like a global knob controllable
from userspace which is unsuitable here.

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Cc: stable@kernel.org
drivers/i2c/busses/i2c-rcar.c