summaryrefslogtreecommitdiff
path: root/virt
diff options
context:
space:
mode:
authorJon Hunter <jonathanh@nvidia.com>2016-08-26 14:09:04 +0100
committerWolfram Sang <wsa@the-dreams.de>2016-08-30 22:00:40 +0200
commit1f50ad2c86cdecc223e4098adfc5aa3a4e8d7e49 (patch)
tree6efea27dc15260ea4faaeea4d595df428fd57404 /virt
parentf4c2d89bd4b13ec448f6c5dc07f445883685ea4b (diff)
i2c: tegra: Add runtime power-management support
Update the Tegra I2C driver to use runtime PM and move the code in the tegra_i2c_clock_enable/disable() functions to the PM runtime resume and suspend callbacks, respectively. Note that given that CONFIG_PM is not mandatory for Tegra, if CONFIG_PM is not enabled and so runtime PM is not enabled, ensure that the I2C clocks are turned on during probe and kept on by calling the resume callback directly. In the function tegra_i2c_init(), the variable 'err' does not need to be initialised to zero in tegra_i2c_init() because it is initialised when pm_runtime_get_sync() is called. Furthermore, to ensure we only return 0 from tegra_i2c_init(), it is necessary to re-initialise 'err' to 0 after a successful call to pm_runtime_get_sync() because it can return a positive value on success. However, alternatively re-initialise 'err' by using the return value of the function tegra_i2c_flush_fifos() because it can only be 0 or -ETIMEDOUT. Signed-off-by: Jon Hunter <jonathanh@nvidia.com> Acked-by: Laxman Dewangan <ldewangan@nvidia.com> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Diffstat (limited to 'virt')
0 files changed, 0 insertions, 0 deletions