lkml.org 
[lkml]   [2020]   [Sep]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH v7 12/34] i2c: tegra: Use clk-bulk helpers
On Thu, Sep 17, 2020 at 2:38 PM Thierry Reding <thierry.reding@gmail.com> wrote:
> On Wed, Sep 09, 2020 at 01:39:44AM +0300, Dmitry Osipenko wrote:
> > 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>
> > Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
> > ---
> > drivers/i2c/busses/i2c-tegra.c | 187 ++++++++++++---------------------
> > 1 file changed, 67 insertions(+), 120 deletions(-)
>
> This is tempting from a diffstat point of view, but the downside is that
> we can now no longer validate that all of the necessary clocks are given
> in device tree.
>
> Previously the driver would fail to probe the I2C controller if any of
> the expected clocks were not defined in device tree, but now it's just
> going to continue without it and not give any indication as to what's
> wrong.

You may print an error in the error path as previously. Since both
clocks are mandatory (as far as I understood the code) user will need
to check DT in any case.

--
With Best Regards,
Andy Shevchenko

\
 
 \ /
  Last update: 2020-09-17 16:00    [W:0.145 / U:1.992 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site