i2c: tegra: Use clk-bulk helpers
authorDmitry Osipenko <digetx@gmail.com>
Tue, 29 Sep 2020 22:18:55 +0000 (01:18 +0300)
committerWolfram Sang <wsa@kernel.org>
Mon, 5 Oct 2020 20:57:41 +0000 (22:57 +0200)
commit586a97d907ac348c96bae1b994e59ca6b8643fb6
tree39f519754871185ff175acdb913c60c8bd5e211b
parent20b9a6c3ef2cb41de1bde1a89cbbb2e4abe58467
i2c: tegra: Use clk-bulk helpers

Use clk-bulk helpers and factor out clocks initialization into separate
function in order to make code cleaner.

The clocks initialization now performed after reset-control initialization
in order to avoid a noisy -PROBE_DEFER errors on T186+ from the clk-bulk
helper which doesn't silence this error code. Hence reset_control_get()
now may return -EPROBE_DEFER on newer Tegra SoCs because they use BPMP
driver that provides reset controls and BPMP doesn't come up early during
boot. Previously rst was protected by the clocks retrieval and now this
patch makes dev_err_probe() to be used for the rst error handling.

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