All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH RESEND 0/2] Some improvements for Qualcomm hwspinlock
@ 2020-01-08  3:09 Baolin Wang
  2020-01-08  3:09 ` [PATCH RESEND 1/2] hwspinlock: qcom: Remove redundant PM runtime functions Baolin Wang
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Baolin Wang @ 2020-01-08  3:09 UTC (permalink / raw)
  To: agross, ohad, bjorn.andersson
  Cc: baolin.wang7, linux-arm-msm, linux-remoteproc, linux-kernel

This patch set did some optimization for Qualcomm hwlock controller,
including using devm_hwspin_lock_register() API to simplify code and
removing redundant pm runtime functions.

Baolin Wang (2):
  hwspinlock: qcom: Remove redundant PM runtime functions
  hwspinlock: qcom: Use devm_hwspin_lock_register() to register hwlock
    controller

 drivers/hwspinlock/qcom_hwspinlock.c |   28 ++--------------------------
 1 file changed, 2 insertions(+), 26 deletions(-)

-- 
1.7.9.5

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

* [PATCH RESEND 1/2] hwspinlock: qcom: Remove redundant PM runtime functions
  2020-01-08  3:09 [PATCH RESEND 0/2] Some improvements for Qualcomm hwspinlock Baolin Wang
@ 2020-01-08  3:09 ` Baolin Wang
  2020-01-08  3:09 ` [PATCH RESEND 2/2] hwspinlock: qcom: Use devm_hwspin_lock_register() to register hwlock controller Baolin Wang
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 6+ messages in thread
From: Baolin Wang @ 2020-01-08  3:09 UTC (permalink / raw)
  To: agross, ohad, bjorn.andersson
  Cc: baolin.wang7, linux-arm-msm, linux-remoteproc, linux-kernel

Since the hwspinlock core has changed the PM runtime to be optional, and
the Qualcomm hardware spinlock has no pm runtime requirement, thus remove
these redundant PM runtime functions.

Signed-off-by: Baolin Wang <baolin.wang7@gmail.com>
---
 drivers/hwspinlock/qcom_hwspinlock.c |   13 ++-----------
 1 file changed, 2 insertions(+), 11 deletions(-)

diff --git a/drivers/hwspinlock/qcom_hwspinlock.c b/drivers/hwspinlock/qcom_hwspinlock.c
index 6da7447..5a736b0 100644
--- a/drivers/hwspinlock/qcom_hwspinlock.c
+++ b/drivers/hwspinlock/qcom_hwspinlock.c
@@ -12,7 +12,6 @@
 #include <linux/of.h>
 #include <linux/of_device.h>
 #include <linux/platform_device.h>
-#include <linux/pm_runtime.h>
 #include <linux/regmap.h>
 
 #include "hwspinlock_internal.h"
@@ -122,14 +121,8 @@ static int qcom_hwspinlock_probe(struct platform_device *pdev)
 							     regmap, field);
 	}
 
-	pm_runtime_enable(&pdev->dev);
-
-	ret = hwspin_lock_register(bank, &pdev->dev, &qcom_hwspinlock_ops,
-				   0, QCOM_MUTEX_NUM_LOCKS);
-	if (ret)
-		pm_runtime_disable(&pdev->dev);
-
-	return ret;
+	return hwspin_lock_register(bank, &pdev->dev, &qcom_hwspinlock_ops,
+				    0, QCOM_MUTEX_NUM_LOCKS);
 }
 
 static int qcom_hwspinlock_remove(struct platform_device *pdev)
@@ -143,8 +136,6 @@ static int qcom_hwspinlock_remove(struct platform_device *pdev)
 		return ret;
 	}
 
-	pm_runtime_disable(&pdev->dev);
-
 	return 0;
 }
 
-- 
1.7.9.5

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

* [PATCH RESEND 2/2] hwspinlock: qcom: Use devm_hwspin_lock_register() to register hwlock controller
  2020-01-08  3:09 [PATCH RESEND 0/2] Some improvements for Qualcomm hwspinlock Baolin Wang
  2020-01-08  3:09 ` [PATCH RESEND 1/2] hwspinlock: qcom: Remove redundant PM runtime functions Baolin Wang
@ 2020-01-08  3:09 ` Baolin Wang
  2020-01-22  0:15   ` Bjorn Andersson
  2020-01-22  0:40 ` patchwork-bot+linux-remoteproc
  3 siblings, 0 replies; 6+ messages in thread
From: Baolin Wang @ 2020-01-08  3:09 UTC (permalink / raw)
  To: agross, ohad, bjorn.andersson
  Cc: baolin.wang7, linux-arm-msm, linux-remoteproc, linux-kernel

Use devm_hwspin_lock_register() to register the hwlock controller instead of
unregistering the hwlock controller explicitly when removing the device.

Signed-off-by: Baolin Wang <baolin.wang7@gmail.com>
---
 drivers/hwspinlock/qcom_hwspinlock.c |   19 ++-----------------
 1 file changed, 2 insertions(+), 17 deletions(-)

diff --git a/drivers/hwspinlock/qcom_hwspinlock.c b/drivers/hwspinlock/qcom_hwspinlock.c
index 5a736b0..f0da544 100644
--- a/drivers/hwspinlock/qcom_hwspinlock.c
+++ b/drivers/hwspinlock/qcom_hwspinlock.c
@@ -121,27 +121,12 @@ static int qcom_hwspinlock_probe(struct platform_device *pdev)
 							     regmap, field);
 	}
 
-	return hwspin_lock_register(bank, &pdev->dev, &qcom_hwspinlock_ops,
-				    0, QCOM_MUTEX_NUM_LOCKS);
-}
-
-static int qcom_hwspinlock_remove(struct platform_device *pdev)
-{
-	struct hwspinlock_device *bank = platform_get_drvdata(pdev);
-	int ret;
-
-	ret = hwspin_lock_unregister(bank);
-	if (ret) {
-		dev_err(&pdev->dev, "%s failed: %d\n", __func__, ret);
-		return ret;
-	}
-
-	return 0;
+	return devm_hwspin_lock_register(&pdev->dev, bank, &qcom_hwspinlock_ops,
+					 0, QCOM_MUTEX_NUM_LOCKS);
 }
 
 static struct platform_driver qcom_hwspinlock_driver = {
 	.probe		= qcom_hwspinlock_probe,
-	.remove		= qcom_hwspinlock_remove,
 	.driver		= {
 		.name	= "qcom_hwspinlock",
 		.of_match_table = qcom_hwspinlock_of_match,
-- 
1.7.9.5

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

* Re: [PATCH RESEND 0/2] Some improvements for Qualcomm hwspinlock
  2020-01-08  3:09 [PATCH RESEND 0/2] Some improvements for Qualcomm hwspinlock Baolin Wang
@ 2020-01-22  0:15   ` Bjorn Andersson
  2020-01-08  3:09 ` [PATCH RESEND 2/2] hwspinlock: qcom: Use devm_hwspin_lock_register() to register hwlock controller Baolin Wang
                     ` (2 subsequent siblings)
  3 siblings, 0 replies; 6+ messages in thread
From: Bjorn Andersson @ 2020-01-22  0:15 UTC (permalink / raw)
  To: Baolin Wang; +Cc: agross, ohad, linux-arm-msm, linux-remoteproc, linux-kernel

On Tue 07 Jan 19:09 PST 2020, Baolin Wang wrote:

> This patch set did some optimization for Qualcomm hwlock controller,
> including using devm_hwspin_lock_register() API to simplify code and
> removing redundant pm runtime functions.
> 

Applied, thanks!

> Baolin Wang (2):
>   hwspinlock: qcom: Remove redundant PM runtime functions
>   hwspinlock: qcom: Use devm_hwspin_lock_register() to register hwlock
>     controller
> 
>  drivers/hwspinlock/qcom_hwspinlock.c |   28 ++--------------------------
>  1 file changed, 2 insertions(+), 26 deletions(-)
> 
> -- 
> 1.7.9.5
> 

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

* Re: [PATCH RESEND 0/2] Some improvements for Qualcomm hwspinlock
@ 2020-01-22  0:15   ` Bjorn Andersson
  0 siblings, 0 replies; 6+ messages in thread
From: Bjorn Andersson @ 2020-01-22  0:15 UTC (permalink / raw)
  To: Baolin Wang; +Cc: agross, ohad, linux-arm-msm, linux-remoteproc, linux-kernel

On Tue 07 Jan 19:09 PST 2020, Baolin Wang wrote:

> This patch set did some optimization for Qualcomm hwlock controller,
> including using devm_hwspin_lock_register() API to simplify code and
> removing redundant pm runtime functions.
> 

Applied, thanks!

> Baolin Wang (2):
>   hwspinlock: qcom: Remove redundant PM runtime functions
>   hwspinlock: qcom: Use devm_hwspin_lock_register() to register hwlock
>     controller
> 
>  drivers/hwspinlock/qcom_hwspinlock.c |   28 ++--------------------------
>  1 file changed, 2 insertions(+), 26 deletions(-)
> 
> -- 
> 1.7.9.5
> 

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

* Re: [PATCH RESEND 0/2] Some improvements for Qualcomm hwspinlock
  2020-01-08  3:09 [PATCH RESEND 0/2] Some improvements for Qualcomm hwspinlock Baolin Wang
                   ` (2 preceding siblings ...)
  2020-01-22  0:15   ` Bjorn Andersson
@ 2020-01-22  0:40 ` patchwork-bot+linux-remoteproc
  3 siblings, 0 replies; 6+ messages in thread
From: patchwork-bot+linux-remoteproc @ 2020-01-22  0:40 UTC (permalink / raw)
  To: Baolin Wang; +Cc: linux-remoteproc

Hello:

This series was applied to andersson/remoteproc.git (refs/heads/for-next).

On Wed,  8 Jan 2020 11:09:09 +0800 you wrote:
> This patch set did some optimization for Qualcomm hwlock controller,
> including using devm_hwspin_lock_register() API to simplify code and
> removing redundant pm runtime functions.
> 
> Baolin Wang (2):
>   hwspinlock: qcom: Remove redundant PM runtime functions
>   hwspinlock: qcom: Use devm_hwspin_lock_register() to register hwlock
>     controller
> 
> [...]


Here is a summary with links:
  - [RESEND,1/2] hwspinlock: qcom: Remove redundant PM runtime functions
    https://git.kernel.org/andersson/remoteproc/c/98ec52ad814013042e0ed386dcfb0c571782e844
  - [RESEND,2/2] hwspinlock: qcom: Use devm_hwspin_lock_register() to register hwlock controller
    https://git.kernel.org/andersson/remoteproc/c/ed0611a604297a642c3fbec86d3482d580b4f764

You are awesome, thank you!

-- 
Deet-doot-dot, I am a bot.
https://korg.wiki.kernel.org/userdoc/pwbot

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

end of thread, other threads:[~2020-01-22  0:40 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-08  3:09 [PATCH RESEND 0/2] Some improvements for Qualcomm hwspinlock Baolin Wang
2020-01-08  3:09 ` [PATCH RESEND 1/2] hwspinlock: qcom: Remove redundant PM runtime functions Baolin Wang
2020-01-08  3:09 ` [PATCH RESEND 2/2] hwspinlock: qcom: Use devm_hwspin_lock_register() to register hwlock controller Baolin Wang
2020-01-22  0:15 ` [PATCH RESEND 0/2] Some improvements for Qualcomm hwspinlock Bjorn Andersson
2020-01-22  0:15   ` Bjorn Andersson
2020-01-22  0:40 ` patchwork-bot+linux-remoteproc

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.