All of lore.kernel.org
 help / color / mirror / Atom feed
From: Felipe Balbi <balbi@kernel.org>
To: Philipp Zabel <p.zabel@pengutronix.de>,
	Thierry Reding <thierry.reding@gmail.com>
Cc: Jonathan Hunter <jonathanh@nvidia.com>,
	linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	linux-usb@vger.kernel.org
Subject: Re: [PATCH 2/5] reset: Add acquired flag to of_reset_control_array_get()
Date: Wed, 20 Mar 2019 08:51:34 +0200	[thread overview]
Message-ID: <87tvfyujgp.fsf@linux.intel.com> (raw)
In-Reply-To: <1553013476.6482.6.camel@pengutronix.de>

[-- Attachment #1: Type: text/plain, Size: 3258 bytes --]

Philipp Zabel <p.zabel@pengutronix.de> writes:

> On Thu, 2019-02-21 at 16:25 +0100, Thierry Reding wrote:
>> From: Thierry Reding <treding@nvidia.com>
>> 
>> In order to be able to request an array of reset controls in acquired or
>> released mode, add the acquired flag to of_reset_control_array_get() and
>> pass the flag to subsequent calls of __of_reset_control_get().
>> 
>> Signed-off-by: Thierry Reding <treding@nvidia.com>
>> ---
>>  drivers/reset/core.c              |  9 ++++++---
>>  drivers/usb/dwc3/dwc3-of-simple.c |  3 ++-
>>  include/linux/reset.h             | 14 ++++++++------
>>  3 files changed, 16 insertions(+), 10 deletions(-)
>> 
>> diff --git a/drivers/reset/core.c b/drivers/reset/core.c
>> index 1e8a42b16f23..f94da91c22af 100644
>> --- a/drivers/reset/core.c
>> +++ b/drivers/reset/core.c
>> @@ -830,12 +830,15 @@ static int of_reset_control_get_count(struct device_node *node)
>>   * @np: device node for the device that requests the reset controls array
>>   * @shared: whether reset controls are shared or not
>>   * @optional: whether it is optional to get the reset controls
>> + * @acquired: only one reset control may be acquired for a given controller
>> + *            and ID
>>   *
>>   * Returns pointer to allocated reset_control_array on success or
>>   * error on failure
>>   */
>>  struct reset_control *
>> -of_reset_control_array_get(struct device_node *np, bool shared, bool optional)
>> +of_reset_control_array_get(struct device_node *np, bool shared, bool optional,
>> +			   bool acquired)
>>  {
>>  	struct reset_control_array *resets;
>>  	struct reset_control *rstc;
>> @@ -851,7 +854,7 @@ of_reset_control_array_get(struct device_node *np, bool shared, bool optional)
>>  
>>  	for (i = 0; i < num; i++) {
>>  		rstc = __of_reset_control_get(np, NULL, i, shared, optional,
>> -					      true);
>> +					      acquired);
>>  		if (IS_ERR(rstc))
>>  			goto err_rst;
>>  		resets->rstc[i] = rstc;
>> @@ -898,7 +901,7 @@ devm_reset_control_array_get(struct device *dev, bool shared, bool optional)
>>  	if (!devres)
>>  		return ERR_PTR(-ENOMEM);
>>  
>> -	rstc = of_reset_control_array_get(dev->of_node, shared, optional);
>> +	rstc = of_reset_control_array_get(dev->of_node, shared, optional, true);
>>  	if (IS_ERR(rstc)) {
>>  		devres_free(devres);
>>  		return rstc;
>> diff --git a/drivers/usb/dwc3/dwc3-of-simple.c b/drivers/usb/dwc3/dwc3-of-simple.c
>> index 4c2771c5e727..67ce2037472d 100644
>> --- a/drivers/usb/dwc3/dwc3-of-simple.c
>> +++ b/drivers/usb/dwc3/dwc3-of-simple.c
>> @@ -107,7 +107,8 @@ static int dwc3_of_simple_probe(struct platform_device *pdev)
>>  		simple->pulse_resets = true;
>>  	}
>>  
>> -	simple->resets = of_reset_control_array_get(np, shared_resets, true);
>> +	simple->resets = of_reset_control_array_get(np, shared_resets, true,
>> +						    true);
>
> Felipe, could I get your acked-by to merge this through the reset tree?
>
> dwc3-of-simple is a bit of a special case because it calls
> of_reset_control_array_get directly instead of through the
> of_reset_control_array_get_shared/exclusive wrappers.

Sure thing:

Acked-by: Felipe Balbi <felipe.balbi@linux.intel.com>

-- 
balbi

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

WARNING: multiple messages have this Message-ID (diff)
From: Felipe Balbi <balbi@kernel.org>
To: Philipp Zabel <p.zabel@pengutronix.de>,
	Thierry Reding <thierry.reding@gmail.com>
Cc: Jonathan Hunter <jonathanh@nvidia.com>,
	linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	linux-usb@vger.kernel.org
Subject: [2/5] reset: Add acquired flag to of_reset_control_array_get()
Date: Wed, 20 Mar 2019 08:51:34 +0200	[thread overview]
Message-ID: <87tvfyujgp.fsf@linux.intel.com> (raw)

Philipp Zabel <p.zabel@pengutronix.de> writes:

> On Thu, 2019-02-21 at 16:25 +0100, Thierry Reding wrote:
>> From: Thierry Reding <treding@nvidia.com>
>> 
>> In order to be able to request an array of reset controls in acquired or
>> released mode, add the acquired flag to of_reset_control_array_get() and
>> pass the flag to subsequent calls of __of_reset_control_get().
>> 
>> Signed-off-by: Thierry Reding <treding@nvidia.com>
>> ---
>>  drivers/reset/core.c              |  9 ++++++---
>>  drivers/usb/dwc3/dwc3-of-simple.c |  3 ++-
>>  include/linux/reset.h             | 14 ++++++++------
>>  3 files changed, 16 insertions(+), 10 deletions(-)
>> 
>> diff --git a/drivers/reset/core.c b/drivers/reset/core.c
>> index 1e8a42b16f23..f94da91c22af 100644
>> --- a/drivers/reset/core.c
>> +++ b/drivers/reset/core.c
>> @@ -830,12 +830,15 @@ static int of_reset_control_get_count(struct device_node *node)
>>   * @np: device node for the device that requests the reset controls array
>>   * @shared: whether reset controls are shared or not
>>   * @optional: whether it is optional to get the reset controls
>> + * @acquired: only one reset control may be acquired for a given controller
>> + *            and ID
>>   *
>>   * Returns pointer to allocated reset_control_array on success or
>>   * error on failure
>>   */
>>  struct reset_control *
>> -of_reset_control_array_get(struct device_node *np, bool shared, bool optional)
>> +of_reset_control_array_get(struct device_node *np, bool shared, bool optional,
>> +			   bool acquired)
>>  {
>>  	struct reset_control_array *resets;
>>  	struct reset_control *rstc;
>> @@ -851,7 +854,7 @@ of_reset_control_array_get(struct device_node *np, bool shared, bool optional)
>>  
>>  	for (i = 0; i < num; i++) {
>>  		rstc = __of_reset_control_get(np, NULL, i, shared, optional,
>> -					      true);
>> +					      acquired);
>>  		if (IS_ERR(rstc))
>>  			goto err_rst;
>>  		resets->rstc[i] = rstc;
>> @@ -898,7 +901,7 @@ devm_reset_control_array_get(struct device *dev, bool shared, bool optional)
>>  	if (!devres)
>>  		return ERR_PTR(-ENOMEM);
>>  
>> -	rstc = of_reset_control_array_get(dev->of_node, shared, optional);
>> +	rstc = of_reset_control_array_get(dev->of_node, shared, optional, true);
>>  	if (IS_ERR(rstc)) {
>>  		devres_free(devres);
>>  		return rstc;
>> diff --git a/drivers/usb/dwc3/dwc3-of-simple.c b/drivers/usb/dwc3/dwc3-of-simple.c
>> index 4c2771c5e727..67ce2037472d 100644
>> --- a/drivers/usb/dwc3/dwc3-of-simple.c
>> +++ b/drivers/usb/dwc3/dwc3-of-simple.c
>> @@ -107,7 +107,8 @@ static int dwc3_of_simple_probe(struct platform_device *pdev)
>>  		simple->pulse_resets = true;
>>  	}
>>  
>> -	simple->resets = of_reset_control_array_get(np, shared_resets, true);
>> +	simple->resets = of_reset_control_array_get(np, shared_resets, true,
>> +						    true);
>
> Felipe, could I get your acked-by to merge this through the reset tree?
>
> dwc3-of-simple is a bit of a special case because it calls
> of_reset_control_array_get directly instead of through the
> of_reset_control_array_get_shared/exclusive wrappers.

Sure thing:

Acked-by: Felipe Balbi <felipe.balbi@linux.intel.com>

  reply	other threads:[~2019-03-20  6:51 UTC|newest]

Thread overview: 20+ 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-02-21 15:25   ` [2/5] " Thierry Reding
2019-03-19 16:37   ` [PATCH 2/5] " Philipp Zabel
2019-03-19 16:37     ` [2/5] " Philipp Zabel
2019-03-20  6:51     ` Felipe Balbi [this message]
2019-03-20  6:51       ` Felipe Balbi
2019-03-20 10:27       ` [PATCH 2/5] " Philipp Zabel
2019-03-20 10:27         ` [2/5] " 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
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=87tvfyujgp.fsf@linux.intel.com \
    --to=balbi@kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=jonathanh@nvidia.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tegra@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=p.zabel@pengutronix.de \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.