From mboxrd@z Thu Jan 1 00:00:00 1970 From: Philipp Zabel Subject: Re: [PATCH v4 4/4] soc/tegra: pmc: Use the new reset APIs to manage reset controllers Date: Thu, 01 Jun 2017 18:44:00 +0200 Message-ID: <1496335440.3204.22.camel@pengutronix.de> References: <1495452207-6129-1-git-send-email-vivek.gautam@codeaurora.org> <1495452207-6129-5-git-send-email-vivek.gautam@codeaurora.org> <53360973-098e-14fa-88e9-b0864822359a@nvidia.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <53360973-098e-14fa-88e9-b0864822359a-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org> Sender: linux-tegra-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Jon Hunter Cc: Vivek Gautam , linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, balbi-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org, gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org, linux-arm-msm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Thierry Reding List-Id: linux-tegra@vger.kernel.org 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 > > Cc: Thierry Reding > > Cc: Philipp Zabel > > Signed-off-by: Vivek Gautam > > --- > > 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 > Tested-by: Jon Hunter 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 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751921AbdFAQoN (ORCPT ); Thu, 1 Jun 2017 12:44:13 -0400 Received: from metis.ext.4.pengutronix.de ([92.198.50.35]:60297 "EHLO metis.ext.4.pengutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752235AbdFAQoK (ORCPT ); Thu, 1 Jun 2017 12:44:10 -0400 Message-ID: <1496335440.3204.22.camel@pengutronix.de> Subject: Re: [PATCH v4 4/4] soc/tegra: pmc: Use the new reset APIs to manage reset controllers From: Philipp Zabel To: Jon Hunter Cc: Vivek Gautam , linux-kernel@vger.kernel.org, linux-tegra@vger.kernel.org, linux-usb@vger.kernel.org, balbi@kernel.org, gregkh@linuxfoundation.org, linux-arm-msm@vger.kernel.org, Thierry Reding Date: Thu, 01 Jun 2017 18:44:00 +0200 In-Reply-To: <53360973-098e-14fa-88e9-b0864822359a@nvidia.com> References: <1495452207-6129-1-git-send-email-vivek.gautam@codeaurora.org> <1495452207-6129-5-git-send-email-vivek.gautam@codeaurora.org> <53360973-098e-14fa-88e9-b0864822359a@nvidia.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.12.9-1+b1 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-SA-Exim-Connect-IP: 2001:67c:670:100:3ad5:47ff:feaf:1a17 X-SA-Exim-Mail-From: p.zabel@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 > > Cc: Thierry Reding > > Cc: Philipp Zabel > > Signed-off-by: Vivek Gautam > > --- > > 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 > Tested-by: Jon Hunter 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