linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3] ARC: HSDK: improve reset driver
@ 2018-10-17 14:05 Eugeniy Paltsev
  2018-10-17 14:25 ` Philipp Zabel
  0 siblings, 1 reply; 2+ messages in thread
From: Eugeniy Paltsev @ 2018-10-17 14:05 UTC (permalink / raw)
  To: Philipp Zabel
  Cc: linux-snps-arc, linux-kernel, Alexey Brodkin, Eugeniy Paltsev

As for today HSDK reset driver implements only .reset() callback.

In case of driver which implements one of standard
reset controller usage pattern
(call *_deassert() in probe(), call *_assert() in remove())
that leads to inoperability of this reset driver.

Improve HSDK reset driver by calling .reset() callback inside of
.deassert() callback to avoid each reset controller
user adaptation for work with both reset methods
(reset() and {.assert() & .deassert()} pair)

Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
---
Changes v2->v3:
 * Drop dummy .assert callback.

 drivers/reset/reset-hsdk.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/reset/reset-hsdk.c b/drivers/reset/reset-hsdk.c
index 8bce391c6943..4c7b8647b49c 100644
--- a/drivers/reset/reset-hsdk.c
+++ b/drivers/reset/reset-hsdk.c
@@ -86,6 +86,7 @@ static int hsdk_reset_reset(struct reset_controller_dev *rcdev,
 
 static const struct reset_control_ops hsdk_reset_ops = {
 	.reset	= hsdk_reset_reset,
+	.deassert = hsdk_reset_reset,
 };
 
 static int hsdk_reset_probe(struct platform_device *pdev)
-- 
2.14.4


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH v3] ARC: HSDK: improve reset driver
  2018-10-17 14:05 [PATCH v3] ARC: HSDK: improve reset driver Eugeniy Paltsev
@ 2018-10-17 14:25 ` Philipp Zabel
  0 siblings, 0 replies; 2+ messages in thread
From: Philipp Zabel @ 2018-10-17 14:25 UTC (permalink / raw)
  To: Eugeniy Paltsev; +Cc: linux-snps-arc, linux-kernel, Alexey Brodkin

On Wed, 2018-10-17 at 17:05 +0300, Eugeniy Paltsev wrote:
> As for today HSDK reset driver implements only .reset() callback.
> 
> In case of driver which implements one of standard
> reset controller usage pattern
> (call *_deassert() in probe(), call *_assert() in remove())
> that leads to inoperability of this reset driver.
> 
> Improve HSDK reset driver by calling .reset() callback inside of
> .deassert() callback to avoid each reset controller
> user adaptation for work with both reset methods
> (reset() and {.assert() & .deassert()} pair)
> 
> Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
> ---
> Changes v2->v3:
>  * Drop dummy .assert callback.
> 
>  drivers/reset/reset-hsdk.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/reset/reset-hsdk.c b/drivers/reset/reset-hsdk.c
> index 8bce391c6943..4c7b8647b49c 100644
> --- a/drivers/reset/reset-hsdk.c
> +++ b/drivers/reset/reset-hsdk.c
> @@ -86,6 +86,7 @@ static int hsdk_reset_reset(struct reset_controller_dev *rcdev,
>  
>  static const struct reset_control_ops hsdk_reset_ops = {
>  	.reset	= hsdk_reset_reset,
> +	.deassert = hsdk_reset_reset,
>  };
>  
>  static int hsdk_reset_probe(struct platform_device *pdev)

Thank you, applied to reset/next

regards
Philipp

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-10-17 14:25 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-17 14:05 [PATCH v3] ARC: HSDK: improve reset driver Eugeniy Paltsev
2018-10-17 14:25 ` Philipp Zabel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).