Re: [PATCH v2 20/20] media: venus: pm_helpers: Use reset_bulk API

From: Philipp Zabel
Date: Wed Feb 21 2024 - 08:35:55 EST


On Mi, 2024-02-14 at 22:20 +0100, Konrad Dybcio wrote:
> On 14.02.2024 14:31, Philipp Zabel wrote:
> > Hi Konrad,
> >
> > On Fr, 2024-02-09 at 22:10 +0100, Konrad Dybcio wrote:
> > > All of the resets are toggled together. Use the bulk api to save on some
> > > code complexity.
> > >
> > > The delay between resets is now correctly determined by the reset
> > > framework.
> >
> > If this is a recent change, could you reference the commit?
>
> It's a series that recently landed in -next [1]

Missing link?

> [...]
>
> >
> > Since VIDC_RESETS_NUM_MAX is only 2, I don't think a separate
> > allocation is worth it.
>
> It's 2 today, anyway. I wanted to keep it flexible

If this is expected to grow, fine.

> [...]
>
> > > + ret = reset_control_bulk_reset(res->resets_num, core->resets);
> > > + if (ret)
> > > + dev_err(core->dev, "Failed to toggle resets: %d\n", ret);
> > >
> > > -err:
> > > return ret;
> >
> > Could be simplified to:
> >
> > return reset_control_bulk_reset(res->resets_num, core-
> > > resets);
>
> I intentionally kept the if (ret) to print a specific error message
> in case the call fails, this driver doesn't go a good job of telling
> the user/developer what went wrong.

Oh, ok.

regards
Philipp