[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <1496335440.3204.22.camel@pengutronix.de>
Date: Thu, 01 Jun 2017 18:44:00 +0200
From: Philipp Zabel <p.zabel@...gutronix.de>
To: Jon Hunter <jonathanh@...dia.com>
Cc: Vivek Gautam <vivek.gautam@...eaurora.org>,
linux-kernel@...r.kernel.org, linux-tegra@...r.kernel.org,
linux-usb@...r.kernel.org, balbi@...nel.org,
gregkh@...uxfoundation.org, linux-arm-msm@...r.kernel.org,
Thierry Reding <treding@...dia.com>
Subject: Re: [PATCH v4 4/4] soc/tegra: pmc: Use the new reset APIs to manage
reset controllers
Hi,
On Wed, 2017-05-31 at 15:23 +0100, Jon Hunter wrote:
> On 22/05/17 12:23, Vivek Gautam wrote:
> > Make use of reset_control_array_*() set of APIs to manage
> > an array of reset controllers available with the device.
> >
> > Cc: Jon Hunter <jonathanh@...dia.com>
> > Cc: Thierry Reding <treding@...dia.com>
> > Cc: Philipp Zabel <p.zabel@...gutronix.de>
> > Signed-off-by: Vivek Gautam <vivek.gautam@...eaurora.org>
> > ---
> > drivers/soc/tegra/pmc.c | 91 +++++++++++++++++--------------------------------
> > 1 file changed, 31 insertions(+), 60 deletions(-)
> >
> > diff --git a/drivers/soc/tegra/pmc.c b/drivers/soc/tegra/pmc.c
> > index e233dd5dcab3..668f5d3d3635 100644
> > --- a/drivers/soc/tegra/pmc.c
> > +++ b/drivers/soc/tegra/pmc.c
> > @@ -124,8 +124,8 @@ struct tegra_powergate {
> > unsigned int id;
> > struct clk **clks;
> > unsigned int num_clks;
> > - struct reset_control **resets;
> > - unsigned int num_resets;
> > + struct reset_control *reset;
> > + struct reset_control_array *resets;
>
> It's a shame we can't avoid this additional reset pointer, but maybe
> there is no good alternative for now. So ...
>
> Acked-by: Jon Hunter <jonathanh@...dia.com>
> Tested-by: Jon Hunter <jonathanh@...dia.com>
Thanks. I don't see a big functional difference between a
reset_control_array and a reset_control, given that a single reset
control bit already controls multiple reset lines on some devices.
Maybe it would be preferable to let the reset_control_array_get
functions return a struct reset_control that hides the array.
I'll send a v5 to see if that would be sensible.
regards
Philipp
Powered by blists - more mailing lists