i2c: tegra: Factor out hardware initialization into separate function
authorDmitry Osipenko <digetx@gmail.com>
Tue, 29 Sep 2020 22:19:08 +0000 (01:19 +0300)
committerWolfram Sang <wsa@kernel.org>
Mon, 5 Oct 2020 20:57:43 +0000 (22:57 +0200)
commitd380d48ff376d6e98ce0c07a70487beb5d05cb4b
tree6980c336ef78304f9d546239cd6f270b66bf9e44
parent507ae6ab724b780d72c010ffb106e580799ba641
i2c: tegra: Factor out hardware initialization into separate function

Factor out hardware initialization into a separate function from the probe
function. The only place where runtime PM needs to be resumed during probe
is the place of hardware initialization, hence it makes sense to factor
out it in order to have a bit cleaner error handling in tegra_i2c_probe().

Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Acked-by: Thierry Reding <treding@nvidia.com>
Tested-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
Signed-off-by: Wolfram Sang <wsa@kernel.org>
drivers/i2c/busses/i2c-tegra.c