mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Philipp Zabel <p.zabel@pengutronix.de>
To: Thierry Reding <thierry.reding@gmail.com>
Cc: Jonathan Hunter <jonathanh@nvidia.com>,
	linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 3/5] reset: Add acquire/release support for arrays
Date: Tue, 19 Mar 2019 17:43:37 +0100	[thread overview]
Message-ID: <1553013817.6482.8.camel@pengutronix.de> (raw)
In-Reply-To: <20190221152557.8534-3-thierry.reding@gmail.com>

On Thu, 2019-02-21 at 16:25 +0100, Thierry Reding wrote:
> From: Thierry Reding <treding@nvidia.com>
> 
> Add implementations that apply acquire and release operations to all
> reset controls part of a reset control array.
> 
> Signed-off-by: Thierry Reding <treding@nvidia.com>

Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>

> ---
>  drivers/reset/core.c  | 36 +++++++++++++++++++++++++++++++++++-
>  include/linux/reset.h |  6 ++++++
>  2 files changed, 41 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/reset/core.c b/drivers/reset/core.c
> index f94da91c22af..81ea77cba123 100644
> --- a/drivers/reset/core.c
> +++ b/drivers/reset/core.c
> @@ -245,6 +245,34 @@ static int reset_control_array_deassert(struct reset_control_array *resets)
>  	return ret;
>  }
>  
> +static int reset_control_array_acquire(struct reset_control_array *resets)
> +{
> +	unsigned int i;
> +	int err;
> +
> +	for (i = 0; i < resets->num_rstcs; i++) {
> +		err = reset_control_acquire(resets->rstc[i]);
> +		if (err < 0)
> +			goto release;
> +	}

This could be done under a single mutex lock by extracting a free
version of of reset_control_acquire. Just an idea though, not sure if
that would have any measurable benefit.

regards
Philipp

  reply	other threads:[~2019-03-19 16:43 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-21 15:25 [PATCH 1/5] reset: add acquired/released state for exclusive reset controls Thierry Reding
2019-02-21 15:25 ` [PATCH 2/5] reset: Add acquired flag to of_reset_control_array_get() Thierry Reding
2019-03-19 16:37   ` Philipp Zabel
2019-03-20  6:51     ` Felipe Balbi
2019-03-20 10:27       ` Philipp Zabel
2019-02-21 15:25 ` [PATCH 3/5] reset: Add acquire/release support for arrays Thierry Reding
2019-03-19 16:43   ` Philipp Zabel [this message]
2019-02-21 15:25 ` [PATCH 4/5] soc/tegra: pmc: Implement acquire/release for resets Thierry Reding
2019-03-19 16:45   ` Philipp Zabel
2019-02-21 15:25 ` [PATCH 5/5] drm/tegra: sor: Implement acquire/release for reset Thierry Reding
2019-03-19 16:45   ` Philipp Zabel
2019-02-21 15:28 ` [PATCH 1/5] reset: add acquired/released state for exclusive reset controls Thierry Reding
2019-03-18  9:12   ` Thierry Reding
2019-03-18 16:40     ` Philipp Zabel
2019-03-18 16:59       ` Thierry Reding
2019-03-19 16:37   ` Philipp Zabel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1553013817.6482.8.camel@pengutronix.de \
    --to=p.zabel@pengutronix.de \
    --cc=jonathanh@nvidia.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tegra@vger.kernel.org \
    --cc=thierry.reding@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome