All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] PM: Renesas: Remove dummy runtime PM callbacks
@ 2018-10-24 13:51 Jarkko Nikula
  2018-10-24 13:51   ` [1/3] " Jarkko Nikula
                   ` (3 more replies)
  0 siblings, 4 replies; 22+ messages in thread
From: Jarkko Nikula @ 2018-10-24 13:51 UTC (permalink / raw)
  To: linux-pm
  Cc: linux-i2c, Wolfram Sang, netdev, David S . Miller,
	Sergei Shtylyov, linux-renesas-soc, linux-usb, Yoshihiro Shimoda,
	Jarkko Nikula

I noticed these independent Renesas drivers have needless dummy runtime
PM callbacks. I don't have the HW so only build tested.

Patches can be applied independently to their own subsystems. I wanted to
send them together if some of them gets Tested-by or sees a regression.

Jarkko Nikula (3):
  i2c: sh_mobile: Remove dummy runtime PM callbacks
  net: ethernet: Remove dummy runtime PM callbacks from Renesas drivers
  usb: renesas_usbhs: Remove dummy runtime PM callbacks

 drivers/i2c/busses/i2c-sh_mobile.c       | 18 ------------------
 drivers/net/ethernet/renesas/ravb_main.c | 13 -------------
 drivers/net/ethernet/renesas/sh_eth.c    | 13 -------------
 drivers/usb/renesas_usbhs/common.c       | 14 --------------
 4 files changed, 58 deletions(-)

-- 
2.19.1

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

* [PATCH 1/3] i2c: sh_mobile: Remove dummy runtime PM callbacks
@ 2018-10-24 13:51   ` Jarkko Nikula
  0 siblings, 0 replies; 22+ messages in thread
From: Jarkko Nikula @ 2018-10-24 13:51 UTC (permalink / raw)
  To: linux-pm
  Cc: linux-i2c, Wolfram Sang, netdev, David S . Miller,
	Sergei Shtylyov, linux-renesas-soc, linux-usb, Yoshihiro Shimoda,
	Jarkko Nikula

Platform drivers don't need dummy runtime PM callbacks that just return
success and non-NULL pm pointer in their struct device_driver in order
to have runtime PM happening. This has changed since following commits:

05aa55dddb9e ("PM / Runtime: Lenient generic runtime pm callbacks")
543f2503a956 ("PM / platform_bus: Allow runtime PM by default")
8b313a38ecff ("PM / Platform: Use generic runtime PM callbacks directly")

Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
---
Only build tested.
---
 drivers/i2c/busses/i2c-sh_mobile.c | 18 ------------------
 1 file changed, 18 deletions(-)

diff --git a/drivers/i2c/busses/i2c-sh_mobile.c b/drivers/i2c/busses/i2c-sh_mobile.c
index 818cab14e87c..a7a7a9c3bc7c 100644
--- a/drivers/i2c/busses/i2c-sh_mobile.c
+++ b/drivers/i2c/busses/i2c-sh_mobile.c
@@ -947,27 +947,9 @@ static int sh_mobile_i2c_remove(struct platform_device *dev)
 	return 0;
 }
 
-static int sh_mobile_i2c_runtime_nop(struct device *dev)
-{
-	/* Runtime PM callback shared between ->runtime_suspend()
-	 * and ->runtime_resume(). Simply returns success.
-	 *
-	 * This driver re-initializes all registers after
-	 * pm_runtime_get_sync() anyway so there is no need
-	 * to save and restore registers here.
-	 */
-	return 0;
-}
-
-static const struct dev_pm_ops sh_mobile_i2c_dev_pm_ops = {
-	.runtime_suspend = sh_mobile_i2c_runtime_nop,
-	.runtime_resume = sh_mobile_i2c_runtime_nop,
-};
-
 static struct platform_driver sh_mobile_i2c_driver = {
 	.driver		= {
 		.name		= "i2c-sh_mobile",
-		.pm		= &sh_mobile_i2c_dev_pm_ops,
 		.of_match_table = sh_mobile_i2c_dt_ids,
 	},
 	.probe		= sh_mobile_i2c_probe,
-- 
2.19.1

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

* [1/3] i2c: sh_mobile: Remove dummy runtime PM callbacks
@ 2018-10-24 13:51   ` Jarkko Nikula
  0 siblings, 0 replies; 22+ messages in thread
From: Jarkko Nikula @ 2018-10-24 13:51 UTC (permalink / raw)
  To: linux-pm
  Cc: linux-i2c, Wolfram Sang, netdev, David S . Miller,
	Sergei Shtylyov, linux-renesas-soc, linux-usb, Yoshihiro Shimoda,
	Jarkko Nikula

Platform drivers don't need dummy runtime PM callbacks that just return
success and non-NULL pm pointer in their struct device_driver in order
to have runtime PM happening. This has changed since following commits:

05aa55dddb9e ("PM / Runtime: Lenient generic runtime pm callbacks")
543f2503a956 ("PM / platform_bus: Allow runtime PM by default")
8b313a38ecff ("PM / Platform: Use generic runtime PM callbacks directly")

Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
---
Only build tested.
---
 drivers/i2c/busses/i2c-sh_mobile.c | 18 ------------------
 1 file changed, 18 deletions(-)

diff --git a/drivers/i2c/busses/i2c-sh_mobile.c b/drivers/i2c/busses/i2c-sh_mobile.c
index 818cab14e87c..a7a7a9c3bc7c 100644
--- a/drivers/i2c/busses/i2c-sh_mobile.c
+++ b/drivers/i2c/busses/i2c-sh_mobile.c
@@ -947,27 +947,9 @@ static int sh_mobile_i2c_remove(struct platform_device *dev)
 	return 0;
 }
 
-static int sh_mobile_i2c_runtime_nop(struct device *dev)
-{
-	/* Runtime PM callback shared between ->runtime_suspend()
-	 * and ->runtime_resume(). Simply returns success.
-	 *
-	 * This driver re-initializes all registers after
-	 * pm_runtime_get_sync() anyway so there is no need
-	 * to save and restore registers here.
-	 */
-	return 0;
-}
-
-static const struct dev_pm_ops sh_mobile_i2c_dev_pm_ops = {
-	.runtime_suspend = sh_mobile_i2c_runtime_nop,
-	.runtime_resume = sh_mobile_i2c_runtime_nop,
-};
-
 static struct platform_driver sh_mobile_i2c_driver = {
 	.driver		= {
 		.name		= "i2c-sh_mobile",
-		.pm		= &sh_mobile_i2c_dev_pm_ops,
 		.of_match_table = sh_mobile_i2c_dt_ids,
 	},
 	.probe		= sh_mobile_i2c_probe,

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

* [PATCH 2/3] net: ethernet: Remove dummy runtime PM callbacks from Renesas drivers
@ 2018-10-24 13:51   ` Jarkko Nikula
  0 siblings, 0 replies; 22+ messages in thread
From: Jarkko Nikula @ 2018-10-24 13:51 UTC (permalink / raw)
  To: linux-pm
  Cc: linux-i2c, Wolfram Sang, netdev, David S . Miller,
	Sergei Shtylyov, linux-renesas-soc, linux-usb, Yoshihiro Shimoda,
	Jarkko Nikula

Platform drivers don't need dummy runtime PM callbacks that just return
success in order to have runtime PM happening. This has changed since
following commits:

05aa55dddb9e ("PM / Runtime: Lenient generic runtime pm callbacks")
543f2503a956 ("PM / platform_bus: Allow runtime PM by default")
8b313a38ecff ("PM / Platform: Use generic runtime PM callbacks directly")

Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
---
Only build tested.
---
 drivers/net/ethernet/renesas/ravb_main.c | 13 -------------
 drivers/net/ethernet/renesas/sh_eth.c    | 13 -------------
 2 files changed, 26 deletions(-)

diff --git a/drivers/net/ethernet/renesas/ravb_main.c b/drivers/net/ethernet/renesas/ravb_main.c
index defed0d0c51d..9498f9d67501 100644
--- a/drivers/net/ethernet/renesas/ravb_main.c
+++ b/drivers/net/ethernet/renesas/ravb_main.c
@@ -2335,21 +2335,8 @@ static int __maybe_unused ravb_resume(struct device *dev)
 	return ret;
 }
 
-static int __maybe_unused ravb_runtime_nop(struct device *dev)
-{
-	/* Runtime PM callback shared between ->runtime_suspend()
-	 * and ->runtime_resume(). Simply returns success.
-	 *
-	 * This driver re-initializes all registers after
-	 * pm_runtime_get_sync() anyway so there is no need
-	 * to save and restore registers here.
-	 */
-	return 0;
-}
-
 static const struct dev_pm_ops ravb_dev_pm_ops = {
 	SET_SYSTEM_SLEEP_PM_OPS(ravb_suspend, ravb_resume)
-	SET_RUNTIME_PM_OPS(ravb_runtime_nop, ravb_runtime_nop, NULL)
 };
 
 static struct platform_driver ravb_driver = {
diff --git a/drivers/net/ethernet/renesas/sh_eth.c b/drivers/net/ethernet/renesas/sh_eth.c
index f27a0dc8c563..980310686d45 100644
--- a/drivers/net/ethernet/renesas/sh_eth.c
+++ b/drivers/net/ethernet/renesas/sh_eth.c
@@ -3447,21 +3447,8 @@ static int sh_eth_resume(struct device *dev)
 }
 #endif
 
-static int sh_eth_runtime_nop(struct device *dev)
-{
-	/* Runtime PM callback shared between ->runtime_suspend()
-	 * and ->runtime_resume(). Simply returns success.
-	 *
-	 * This driver re-initializes all registers after
-	 * pm_runtime_get_sync() anyway so there is no need
-	 * to save and restore registers here.
-	 */
-	return 0;
-}
-
 static const struct dev_pm_ops sh_eth_dev_pm_ops = {
 	SET_SYSTEM_SLEEP_PM_OPS(sh_eth_suspend, sh_eth_resume)
-	SET_RUNTIME_PM_OPS(sh_eth_runtime_nop, sh_eth_runtime_nop, NULL)
 };
 #define SH_ETH_PM_OPS (&sh_eth_dev_pm_ops)
 #else
-- 
2.19.1

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

* [2/3] net: ethernet: Remove dummy runtime PM callbacks from Renesas drivers
@ 2018-10-24 13:51   ` Jarkko Nikula
  0 siblings, 0 replies; 22+ messages in thread
From: Jarkko Nikula @ 2018-10-24 13:51 UTC (permalink / raw)
  To: linux-pm
  Cc: linux-i2c, Wolfram Sang, netdev, David S . Miller,
	Sergei Shtylyov, linux-renesas-soc, linux-usb, Yoshihiro Shimoda,
	Jarkko Nikula

Platform drivers don't need dummy runtime PM callbacks that just return
success in order to have runtime PM happening. This has changed since
following commits:

05aa55dddb9e ("PM / Runtime: Lenient generic runtime pm callbacks")
543f2503a956 ("PM / platform_bus: Allow runtime PM by default")
8b313a38ecff ("PM / Platform: Use generic runtime PM callbacks directly")

Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
---
Only build tested.
---
 drivers/net/ethernet/renesas/ravb_main.c | 13 -------------
 drivers/net/ethernet/renesas/sh_eth.c    | 13 -------------
 2 files changed, 26 deletions(-)

diff --git a/drivers/net/ethernet/renesas/ravb_main.c b/drivers/net/ethernet/renesas/ravb_main.c
index defed0d0c51d..9498f9d67501 100644
--- a/drivers/net/ethernet/renesas/ravb_main.c
+++ b/drivers/net/ethernet/renesas/ravb_main.c
@@ -2335,21 +2335,8 @@ static int __maybe_unused ravb_resume(struct device *dev)
 	return ret;
 }
 
-static int __maybe_unused ravb_runtime_nop(struct device *dev)
-{
-	/* Runtime PM callback shared between ->runtime_suspend()
-	 * and ->runtime_resume(). Simply returns success.
-	 *
-	 * This driver re-initializes all registers after
-	 * pm_runtime_get_sync() anyway so there is no need
-	 * to save and restore registers here.
-	 */
-	return 0;
-}
-
 static const struct dev_pm_ops ravb_dev_pm_ops = {
 	SET_SYSTEM_SLEEP_PM_OPS(ravb_suspend, ravb_resume)
-	SET_RUNTIME_PM_OPS(ravb_runtime_nop, ravb_runtime_nop, NULL)
 };
 
 static struct platform_driver ravb_driver = {
diff --git a/drivers/net/ethernet/renesas/sh_eth.c b/drivers/net/ethernet/renesas/sh_eth.c
index f27a0dc8c563..980310686d45 100644
--- a/drivers/net/ethernet/renesas/sh_eth.c
+++ b/drivers/net/ethernet/renesas/sh_eth.c
@@ -3447,21 +3447,8 @@ static int sh_eth_resume(struct device *dev)
 }
 #endif
 
-static int sh_eth_runtime_nop(struct device *dev)
-{
-	/* Runtime PM callback shared between ->runtime_suspend()
-	 * and ->runtime_resume(). Simply returns success.
-	 *
-	 * This driver re-initializes all registers after
-	 * pm_runtime_get_sync() anyway so there is no need
-	 * to save and restore registers here.
-	 */
-	return 0;
-}
-
 static const struct dev_pm_ops sh_eth_dev_pm_ops = {
 	SET_SYSTEM_SLEEP_PM_OPS(sh_eth_suspend, sh_eth_resume)
-	SET_RUNTIME_PM_OPS(sh_eth_runtime_nop, sh_eth_runtime_nop, NULL)
 };
 #define SH_ETH_PM_OPS (&sh_eth_dev_pm_ops)
 #else

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

* [PATCH 3/3] usb: renesas_usbhs: Remove dummy runtime PM callbacks
@ 2018-10-24 13:51   ` Jarkko Nikula
  0 siblings, 0 replies; 22+ messages in thread
From: Jarkko Nikula @ 2018-10-24 13:51 UTC (permalink / raw)
  To: linux-pm
  Cc: linux-i2c, Wolfram Sang, netdev, David S . Miller,
	Sergei Shtylyov, linux-renesas-soc, linux-usb, Yoshihiro Shimoda,
	Jarkko Nikula

Platform drivers don't need dummy runtime PM callbacks that just return
success in order to have runtime PM happening. This has changed since
following commits:

05aa55dddb9e ("PM / Runtime: Lenient generic runtime pm callbacks")
543f2503a956 ("PM / platform_bus: Allow runtime PM by default")
8b313a38ecff ("PM / Platform: Use generic runtime PM callbacks directly")

Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
---
Only build tested.
---
 drivers/usb/renesas_usbhs/common.c | 14 --------------
 1 file changed, 14 deletions(-)

diff --git a/drivers/usb/renesas_usbhs/common.c b/drivers/usb/renesas_usbhs/common.c
index a3e1290d682d..0e760f228dd8 100644
--- a/drivers/usb/renesas_usbhs/common.c
+++ b/drivers/usb/renesas_usbhs/common.c
@@ -874,23 +874,9 @@ static int usbhsc_resume(struct device *dev)
 	return 0;
 }
 
-static int usbhsc_runtime_nop(struct device *dev)
-{
-	/* Runtime PM callback shared between ->runtime_suspend()
-	 * and ->runtime_resume(). Simply returns success.
-	 *
-	 * This driver re-initializes all registers after
-	 * pm_runtime_get_sync() anyway so there is no need
-	 * to save and restore registers here.
-	 */
-	return 0;
-}
-
 static const struct dev_pm_ops usbhsc_pm_ops = {
 	.suspend		= usbhsc_suspend,
 	.resume			= usbhsc_resume,
-	.runtime_suspend	= usbhsc_runtime_nop,
-	.runtime_resume		= usbhsc_runtime_nop,
 };
 
 static struct platform_driver renesas_usbhs_driver = {
-- 
2.19.1

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

* [3/3] usb: renesas_usbhs: Remove dummy runtime PM callbacks
@ 2018-10-24 13:51   ` Jarkko Nikula
  0 siblings, 0 replies; 22+ messages in thread
From: Jarkko Nikula @ 2018-10-24 13:51 UTC (permalink / raw)
  To: linux-pm
  Cc: linux-i2c, Wolfram Sang, netdev, David S . Miller,
	Sergei Shtylyov, linux-renesas-soc, linux-usb, Yoshihiro Shimoda,
	Jarkko Nikula

Platform drivers don't need dummy runtime PM callbacks that just return
success in order to have runtime PM happening. This has changed since
following commits:

05aa55dddb9e ("PM / Runtime: Lenient generic runtime pm callbacks")
543f2503a956 ("PM / platform_bus: Allow runtime PM by default")
8b313a38ecff ("PM / Platform: Use generic runtime PM callbacks directly")

Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
---
Only build tested.
---
 drivers/usb/renesas_usbhs/common.c | 14 --------------
 1 file changed, 14 deletions(-)

diff --git a/drivers/usb/renesas_usbhs/common.c b/drivers/usb/renesas_usbhs/common.c
index a3e1290d682d..0e760f228dd8 100644
--- a/drivers/usb/renesas_usbhs/common.c
+++ b/drivers/usb/renesas_usbhs/common.c
@@ -874,23 +874,9 @@ static int usbhsc_resume(struct device *dev)
 	return 0;
 }
 
-static int usbhsc_runtime_nop(struct device *dev)
-{
-	/* Runtime PM callback shared between ->runtime_suspend()
-	 * and ->runtime_resume(). Simply returns success.
-	 *
-	 * This driver re-initializes all registers after
-	 * pm_runtime_get_sync() anyway so there is no need
-	 * to save and restore registers here.
-	 */
-	return 0;
-}
-
 static const struct dev_pm_ops usbhsc_pm_ops = {
 	.suspend		= usbhsc_suspend,
 	.resume			= usbhsc_resume,
-	.runtime_suspend	= usbhsc_runtime_nop,
-	.runtime_resume		= usbhsc_runtime_nop,
 };
 
 static struct platform_driver renesas_usbhs_driver = {

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

* Re: [PATCH 0/3] PM: Renesas: Remove dummy runtime PM callbacks
  2018-10-24 13:51 [PATCH 0/3] PM: Renesas: Remove dummy runtime PM callbacks Jarkko Nikula
                   ` (2 preceding siblings ...)
  2018-10-24 13:51   ` [3/3] " Jarkko Nikula
@ 2018-10-24 14:22 ` Wolfram Sang
  2018-10-25  0:20   ` Wolfram Sang
  3 siblings, 1 reply; 22+ messages in thread
From: Wolfram Sang @ 2018-10-24 14:22 UTC (permalink / raw)
  To: Jarkko Nikula, Magnus Damm
  Cc: linux-pm, linux-i2c, Wolfram Sang, netdev, David S . Miller,
	Sergei Shtylyov, linux-renesas-soc, linux-usb, Yoshihiro Shimoda

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

On Wed, Oct 24, 2018 at 04:51:31PM +0300, Jarkko Nikula wrote:
> I noticed these independent Renesas drivers have needless dummy runtime
> PM callbacks. I don't have the HW so only build tested.
> 
> Patches can be applied independently to their own subsystems. I wanted to
> send them together if some of them gets Tested-by or sees a regression.

At least the I2C driver part of this was on my todo list as well (just a
bit lower :/). I wanted to find out why they have been there in the
first place. Do you know if such callbacks were needed "back in the
days"?

Adding Magnus to recipients...

> 
> Jarkko Nikula (3):
>   i2c: sh_mobile: Remove dummy runtime PM callbacks
>   net: ethernet: Remove dummy runtime PM callbacks from Renesas drivers
>   usb: renesas_usbhs: Remove dummy runtime PM callbacks
> 
>  drivers/i2c/busses/i2c-sh_mobile.c       | 18 ------------------
>  drivers/net/ethernet/renesas/ravb_main.c | 13 -------------
>  drivers/net/ethernet/renesas/sh_eth.c    | 13 -------------
>  drivers/usb/renesas_usbhs/common.c       | 14 --------------
>  4 files changed, 58 deletions(-)
> 
> -- 
> 2.19.1
> 

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

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

* Re: [PATCH 2/3] net: ethernet: Remove dummy runtime PM callbacks from Renesas drivers
@ 2018-10-24 17:44     ` Sergei Shtylyov
  0 siblings, 0 replies; 22+ messages in thread
From: Sergei Shtylyov @ 2018-10-24 17:44 UTC (permalink / raw)
  To: Jarkko Nikula, linux-pm
  Cc: linux-i2c, Wolfram Sang, netdev, David S . Miller,
	linux-renesas-soc, linux-usb, Yoshihiro Shimoda

Hello!

On 10/24/2018 04:51 PM, Jarkko Nikula wrote:

> Platform drivers don't need dummy runtime PM callbacks that just return
> success in order to have runtime PM happening. This has changed since
> following commits:
> 
> 05aa55dddb9e ("PM / Runtime: Lenient generic runtime pm callbacks")
> 543f2503a956 ("PM / platform_bus: Allow runtime PM by default")
> 8b313a38ecff ("PM / Platform: Use generic runtime PM callbacks directly")

   Wow, these are old! :-)

> Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
> ---
> Only build tested.

   Seems long overdue...

[...]

Reviewed-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>

MBR, Sergei

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

* [2/3] net: ethernet: Remove dummy runtime PM callbacks from Renesas drivers
@ 2018-10-24 17:44     ` Sergei Shtylyov
  0 siblings, 0 replies; 22+ messages in thread
From: Sergei Shtylyov @ 2018-10-24 17:44 UTC (permalink / raw)
  To: Jarkko Nikula, linux-pm
  Cc: linux-i2c, Wolfram Sang, netdev, David S . Miller,
	linux-renesas-soc, linux-usb, Yoshihiro Shimoda

Hello!

On 10/24/2018 04:51 PM, Jarkko Nikula wrote:

> Platform drivers don't need dummy runtime PM callbacks that just return
> success in order to have runtime PM happening. This has changed since
> following commits:
> 
> 05aa55dddb9e ("PM / Runtime: Lenient generic runtime pm callbacks")
> 543f2503a956 ("PM / platform_bus: Allow runtime PM by default")
> 8b313a38ecff ("PM / Platform: Use generic runtime PM callbacks directly")

   Wow, these are old! :-)

> Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
> ---
> Only build tested.

   Seems long overdue...

[...]

Reviewed-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>

MBR, Sergei

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

* Re: [PATCH 0/3] PM: Renesas: Remove dummy runtime PM callbacks
  2018-10-24 14:22 ` [PATCH 0/3] PM: Renesas: " Wolfram Sang
@ 2018-10-25  0:20   ` Wolfram Sang
  0 siblings, 0 replies; 22+ messages in thread
From: Wolfram Sang @ 2018-10-25  0:20 UTC (permalink / raw)
  To: Jarkko Nikula, Magnus Damm
  Cc: linux-pm, linux-i2c, Wolfram Sang, netdev, David S . Miller,
	Sergei Shtylyov, linux-renesas-soc, linux-usb, Yoshihiro Shimoda

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


> At least the I2C driver part of this was on my todo list as well (just a
> bit lower :/). I wanted to find out why they have been there in the
> first place. Do you know if such callbacks were needed "back in the
> days"?

I see now that you referenced the relevant commits in the patch
descriptions. Thanks!


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

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

* RE: [PATCH 3/3] usb: renesas_usbhs: Remove dummy runtime PM callbacks
@ 2018-10-25  2:45     ` Yoshihiro Shimoda
  0 siblings, 0 replies; 22+ messages in thread
From: Yoshihiro Shimoda @ 2018-10-25  2:45 UTC (permalink / raw)
  To: Jarkko Nikula, linux-pm
  Cc: linux-i2c, Wolfram Sang, netdev, David S . Miller,
	Sergei Shtylyov, linux-renesas-soc, linux-usb

Hi Jarkko,

> From: Jarkko Nikula, Sent: Wednesday, October 24, 2018 10:52 PM
> 
> Platform drivers don't need dummy runtime PM callbacks that just return
> success in order to have runtime PM happening. This has changed since
> following commits:
> 
> 05aa55dddb9e ("PM / Runtime: Lenient generic runtime pm callbacks")
> 543f2503a956 ("PM / platform_bus: Allow runtime PM by default")
> 8b313a38ecff ("PM / Platform: Use generic runtime PM callbacks directly")
> 
> Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
> ---
> Only build tested.

Thank you for the patch!

Reviewed-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>

> ---
>  drivers/usb/renesas_usbhs/common.c | 14 --------------
>  1 file changed, 14 deletions(-)
> 
> diff --git a/drivers/usb/renesas_usbhs/common.c b/drivers/usb/renesas_usbhs/common.c
> index a3e1290d682d..0e760f228dd8 100644
> --- a/drivers/usb/renesas_usbhs/common.c
> +++ b/drivers/usb/renesas_usbhs/common.c
> @@ -874,23 +874,9 @@ static int usbhsc_resume(struct device *dev)
>  	return 0;
>  }
> 
> -static int usbhsc_runtime_nop(struct device *dev)
> -{
> -	/* Runtime PM callback shared between ->runtime_suspend()
> -	 * and ->runtime_resume(). Simply returns success.
> -	 *
> -	 * This driver re-initializes all registers after
> -	 * pm_runtime_get_sync() anyway so there is no need
> -	 * to save and restore registers here.
> -	 */

I guess this code came from i2c-sh_mobile.c or sh_eth.c
and we didn't realize this code didn't need at that time (Oct 10 2011).

Best regards,
Yoshihiro Shimoda

> -	return 0;
> -}
> -
>  static const struct dev_pm_ops usbhsc_pm_ops = {
>  	.suspend		= usbhsc_suspend,
>  	.resume			= usbhsc_resume,
> -	.runtime_suspend	= usbhsc_runtime_nop,
> -	.runtime_resume		= usbhsc_runtime_nop,
>  };
> 
>  static struct platform_driver renesas_usbhs_driver = {
> --
> 2.19.1

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

* [3/3] usb: renesas_usbhs: Remove dummy runtime PM callbacks
@ 2018-10-25  2:45     ` Yoshihiro Shimoda
  0 siblings, 0 replies; 22+ messages in thread
From: Yoshihiro Shimoda @ 2018-10-25  2:45 UTC (permalink / raw)
  To: Jarkko Nikula, linux-pm
  Cc: linux-i2c, Wolfram Sang, netdev, David S . Miller,
	Sergei Shtylyov, linux-renesas-soc, linux-usb

Hi Jarkko,

> From: Jarkko Nikula, Sent: Wednesday, October 24, 2018 10:52 PM
> 
> Platform drivers don't need dummy runtime PM callbacks that just return
> success in order to have runtime PM happening. This has changed since
> following commits:
> 
> 05aa55dddb9e ("PM / Runtime: Lenient generic runtime pm callbacks")
> 543f2503a956 ("PM / platform_bus: Allow runtime PM by default")
> 8b313a38ecff ("PM / Platform: Use generic runtime PM callbacks directly")
> 
> Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
> ---
> Only build tested.

Thank you for the patch!

Reviewed-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>

> ---
>  drivers/usb/renesas_usbhs/common.c | 14 --------------
>  1 file changed, 14 deletions(-)
> 
> diff --git a/drivers/usb/renesas_usbhs/common.c b/drivers/usb/renesas_usbhs/common.c
> index a3e1290d682d..0e760f228dd8 100644
> --- a/drivers/usb/renesas_usbhs/common.c
> +++ b/drivers/usb/renesas_usbhs/common.c
> @@ -874,23 +874,9 @@ static int usbhsc_resume(struct device *dev)
>  	return 0;
>  }
> 
> -static int usbhsc_runtime_nop(struct device *dev)
> -{
> -	/* Runtime PM callback shared between ->runtime_suspend()
> -	 * and ->runtime_resume(). Simply returns success.
> -	 *
> -	 * This driver re-initializes all registers after
> -	 * pm_runtime_get_sync() anyway so there is no need
> -	 * to save and restore registers here.
> -	 */

I guess this code came from i2c-sh_mobile.c or sh_eth.c
and we didn't realize this code didn't need at that time (Oct 10 2011).

Best regards,
Yoshihiro Shimoda

> -	return 0;
> -}
> -
>  static const struct dev_pm_ops usbhsc_pm_ops = {
>  	.suspend		= usbhsc_suspend,
>  	.resume			= usbhsc_resume,
> -	.runtime_suspend	= usbhsc_runtime_nop,
> -	.runtime_resume		= usbhsc_runtime_nop,
>  };
> 
>  static struct platform_driver renesas_usbhs_driver = {
> --
> 2.19.1

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

* Re: [PATCH 2/3] net: ethernet: Remove dummy runtime PM callbacks from Renesas drivers
@ 2018-10-25 22:54     ` Wolfram Sang
  0 siblings, 0 replies; 22+ messages in thread
From: Wolfram Sang @ 2018-10-25 22:54 UTC (permalink / raw)
  To: Jarkko Nikula
  Cc: linux-pm, linux-i2c, Wolfram Sang, netdev, David S . Miller,
	Sergei Shtylyov, linux-renesas-soc, linux-usb, Yoshihiro Shimoda

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

On Wed, Oct 24, 2018 at 04:51:33PM +0300, Jarkko Nikula wrote:
> Platform drivers don't need dummy runtime PM callbacks that just return
> success in order to have runtime PM happening. This has changed since
> following commits:
> 
> 05aa55dddb9e ("PM / Runtime: Lenient generic runtime pm callbacks")
> 543f2503a956 ("PM / platform_bus: Allow runtime PM by default")
> 8b313a38ecff ("PM / Platform: Use generic runtime PM callbacks directly")
> 
> Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>

Acked-by: Wolfram Sang <wsa+renesas@sang-engineering.com>


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

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

* [2/3] net: ethernet: Remove dummy runtime PM callbacks from Renesas drivers
@ 2018-10-25 22:54     ` Wolfram Sang
  0 siblings, 0 replies; 22+ messages in thread
From: Wolfram Sang @ 2018-10-25 22:54 UTC (permalink / raw)
  To: Jarkko Nikula
  Cc: linux-pm, linux-i2c, Wolfram Sang, netdev, David S . Miller,
	Sergei Shtylyov, linux-renesas-soc, linux-usb, Yoshihiro Shimoda

On Wed, Oct 24, 2018 at 04:51:33PM +0300, Jarkko Nikula wrote:
> Platform drivers don't need dummy runtime PM callbacks that just return
> success in order to have runtime PM happening. This has changed since
> following commits:
> 
> 05aa55dddb9e ("PM / Runtime: Lenient generic runtime pm callbacks")
> 543f2503a956 ("PM / platform_bus: Allow runtime PM by default")
> 8b313a38ecff ("PM / Platform: Use generic runtime PM callbacks directly")
> 
> Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>

Acked-by: Wolfram Sang <wsa+renesas@sang-engineering.com>

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

* Re: [PATCH 3/3] usb: renesas_usbhs: Remove dummy runtime PM callbacks
  2018-10-24 13:51   ` [3/3] " Jarkko Nikula
  (?)
@ 2018-10-25 22:57     ` Wolfram Sang
  -1 siblings, 0 replies; 22+ messages in thread
From: Wolfram Sang @ 2018-10-25 22:57 UTC (permalink / raw)
  To: Jarkko Nikula, Yoshihiro Shimoda
  Cc: linux-pm, linux-i2c, Wolfram Sang, netdev, David S . Miller,
	Sergei Shtylyov, linux-renesas-soc, linux-usb, Yoshihiro Shimoda

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

On Wed, Oct 24, 2018 at 04:51:34PM +0300, Jarkko Nikula wrote:
> Platform drivers don't need dummy runtime PM callbacks that just return
> success in order to have runtime PM happening. This has changed since
> following commits:
> 
> 05aa55dddb9e ("PM / Runtime: Lenient generic runtime pm callbacks")
> 543f2503a956 ("PM / platform_bus: Allow runtime PM by default")
> 8b313a38ecff ("PM / Platform: Use generic runtime PM callbacks directly")
> 
> Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>

Acked-by: Wolfram Sang <wsa+renesas@sang-engineering.com>

>  static const struct dev_pm_ops usbhsc_pm_ops = {
>  	.suspend		= usbhsc_suspend,
>  	.resume			= usbhsc_resume,

Unrelated to this patch, but I wonder right now: is there a reason not
to use SET_SYSTEM_SLEEP_PM_OPS here? Shimoda-san?


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

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

* Re: [PATCH 3/3] usb: renesas_usbhs: Remove dummy runtime PM callbacks
@ 2018-10-25 22:57     ` Wolfram Sang
  0 siblings, 0 replies; 22+ messages in thread
From: Wolfram Sang @ 2018-10-25 22:57 UTC (permalink / raw)
  To: Jarkko Nikula
  Cc: linux-pm, linux-i2c, Wolfram Sang, netdev, David S . Miller,
	Sergei Shtylyov, linux-renesas-soc, linux-usb, Yoshihiro Shimoda

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

On Wed, Oct 24, 2018 at 04:51:34PM +0300, Jarkko Nikula wrote:
> Platform drivers don't need dummy runtime PM callbacks that just return
> success in order to have runtime PM happening. This has changed since
> following commits:
> 
> 05aa55dddb9e ("PM / Runtime: Lenient generic runtime pm callbacks")
> 543f2503a956 ("PM / platform_bus: Allow runtime PM by default")
> 8b313a38ecff ("PM / Platform: Use generic runtime PM callbacks directly")
> 
> Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>

Acked-by: Wolfram Sang <wsa+renesas@sang-engineering.com>

>  static const struct dev_pm_ops usbhsc_pm_ops = {
>  	.suspend		= usbhsc_suspend,
>  	.resume			= usbhsc_resume,

Unrelated to this patch, but I wonder right now: is there a reason not
to use SET_SYSTEM_SLEEP_PM_OPS here? Shimoda-san?


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

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

* [3/3] usb: renesas_usbhs: Remove dummy runtime PM callbacks
@ 2018-10-25 22:57     ` Wolfram Sang
  0 siblings, 0 replies; 22+ messages in thread
From: Wolfram Sang @ 2018-10-25 22:57 UTC (permalink / raw)
  To: Jarkko Nikula, Yoshihiro Shimoda
  Cc: linux-pm, linux-i2c, Wolfram Sang, netdev, David S . Miller,
	Sergei Shtylyov, linux-renesas-soc, linux-usb

On Wed, Oct 24, 2018 at 04:51:34PM +0300, Jarkko Nikula wrote:
> Platform drivers don't need dummy runtime PM callbacks that just return
> success in order to have runtime PM happening. This has changed since
> following commits:
> 
> 05aa55dddb9e ("PM / Runtime: Lenient generic runtime pm callbacks")
> 543f2503a956 ("PM / platform_bus: Allow runtime PM by default")
> 8b313a38ecff ("PM / Platform: Use generic runtime PM callbacks directly")
> 
> Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>

Acked-by: Wolfram Sang <wsa+renesas@sang-engineering.com>

>  static const struct dev_pm_ops usbhsc_pm_ops = {
>  	.suspend		= usbhsc_suspend,
>  	.resume			= usbhsc_resume,

Unrelated to this patch, but I wonder right now: is there a reason not
to use SET_SYSTEM_SLEEP_PM_OPS here? Shimoda-san?

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

* RE: [PATCH 3/3] usb: renesas_usbhs: Remove dummy runtime PM callbacks
@ 2018-10-26  2:09       ` Yoshihiro Shimoda
  0 siblings, 0 replies; 22+ messages in thread
From: Yoshihiro Shimoda @ 2018-10-26  2:09 UTC (permalink / raw)
  To: Wolfram Sang, Jarkko Nikula
  Cc: linux-pm, linux-i2c, Wolfram Sang, netdev, David S . Miller,
	Sergei Shtylyov, linux-renesas-soc, linux-usb

Hi Wolfram-san,

> From: Wolfram Sang, Sent: Friday, October 26, 2018 7:58 AM
<snip>
> >  static const struct dev_pm_ops usbhsc_pm_ops = {
> >  	.suspend		= usbhsc_suspend,
> >  	.resume			= usbhsc_resume,
> 
> Unrelated to this patch, but I wonder right now: is there a reason not
> to use SET_SYSTEM_SLEEP_PM_OPS here? Shimoda-san?

I don't know why because this code is contributed from Morimoto-san.
I'm guessing this code seems to come from sh_eth.c or i2c-sh_mobile.c
and we don't have the SET_SYSTEM_SLEEP_PM_OPS macro at 2009.
Morimoto-san contributed this code at 2010, but it seems not to realize
we have such macro.

Anyway, I'll try to use SET_SYSTEM_SLEEP_PM_OPS on the renesas_usbhs driver.

Best regards,
Yoshihiro Shimoda

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

* [3/3] usb: renesas_usbhs: Remove dummy runtime PM callbacks
@ 2018-10-26  2:09       ` Yoshihiro Shimoda
  0 siblings, 0 replies; 22+ messages in thread
From: Yoshihiro Shimoda @ 2018-10-26  2:09 UTC (permalink / raw)
  To: Wolfram Sang, Jarkko Nikula
  Cc: linux-pm, linux-i2c, Wolfram Sang, netdev, David S . Miller,
	Sergei Shtylyov, linux-renesas-soc, linux-usb

Hi Wolfram-san,

> From: Wolfram Sang, Sent: Friday, October 26, 2018 7:58 AM
<snip>
> >  static const struct dev_pm_ops usbhsc_pm_ops = {
> >  	.suspend		= usbhsc_suspend,
> >  	.resume			= usbhsc_resume,
> 
> Unrelated to this patch, but I wonder right now: is there a reason not
> to use SET_SYSTEM_SLEEP_PM_OPS here? Shimoda-san?

I don't know why because this code is contributed from Morimoto-san.
I'm guessing this code seems to come from sh_eth.c or i2c-sh_mobile.c
and we don't have the SET_SYSTEM_SLEEP_PM_OPS macro at 2009.
Morimoto-san contributed this code at 2010, but it seems not to realize
we have such macro.

Anyway, I'll try to use SET_SYSTEM_SLEEP_PM_OPS on the renesas_usbhs driver.

Best regards,
Yoshihiro Shimoda

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

* Re: [PATCH 1/3] i2c: sh_mobile: Remove dummy runtime PM callbacks
@ 2018-10-28 22:22     ` Wolfram Sang
  0 siblings, 0 replies; 22+ messages in thread
From: Wolfram Sang @ 2018-10-28 22:22 UTC (permalink / raw)
  To: Jarkko Nikula
  Cc: linux-pm, linux-i2c, Wolfram Sang, netdev, David S . Miller,
	Sergei Shtylyov, linux-renesas-soc, linux-usb, Yoshihiro Shimoda

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

On Wed, Oct 24, 2018 at 04:51:32PM +0300, Jarkko Nikula wrote:
> Platform drivers don't need dummy runtime PM callbacks that just return
> success and non-NULL pm pointer in their struct device_driver in order
> to have runtime PM happening. This has changed since following commits:
> 
> 05aa55dddb9e ("PM / Runtime: Lenient generic runtime pm callbacks")
> 543f2503a956 ("PM / platform_bus: Allow runtime PM by default")
> 8b313a38ecff ("PM / Platform: Use generic runtime PM callbacks directly")
> 
> Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>

Applied to for-next, thanks!


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

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

* [1/3] i2c: sh_mobile: Remove dummy runtime PM callbacks
@ 2018-10-28 22:22     ` Wolfram Sang
  0 siblings, 0 replies; 22+ messages in thread
From: Wolfram Sang @ 2018-10-28 22:22 UTC (permalink / raw)
  To: Jarkko Nikula
  Cc: linux-pm, linux-i2c, Wolfram Sang, netdev, David S . Miller,
	Sergei Shtylyov, linux-renesas-soc, linux-usb, Yoshihiro Shimoda

On Wed, Oct 24, 2018 at 04:51:32PM +0300, Jarkko Nikula wrote:
> Platform drivers don't need dummy runtime PM callbacks that just return
> success and non-NULL pm pointer in their struct device_driver in order
> to have runtime PM happening. This has changed since following commits:
> 
> 05aa55dddb9e ("PM / Runtime: Lenient generic runtime pm callbacks")
> 543f2503a956 ("PM / platform_bus: Allow runtime PM by default")
> 8b313a38ecff ("PM / Platform: Use generic runtime PM callbacks directly")
> 
> Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>

Applied to for-next, thanks!

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

end of thread, other threads:[~2018-10-29  7:08 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-24 13:51 [PATCH 0/3] PM: Renesas: Remove dummy runtime PM callbacks Jarkko Nikula
2018-10-24 13:51 ` [PATCH 1/3] i2c: sh_mobile: " Jarkko Nikula
2018-10-24 13:51   ` [1/3] " Jarkko Nikula
2018-10-28 22:22   ` [PATCH 1/3] " Wolfram Sang
2018-10-28 22:22     ` [1/3] " Wolfram Sang
2018-10-24 13:51 ` [PATCH 2/3] net: ethernet: Remove dummy runtime PM callbacks from Renesas drivers Jarkko Nikula
2018-10-24 13:51   ` [2/3] " Jarkko Nikula
2018-10-24 17:44   ` [PATCH 2/3] " Sergei Shtylyov
2018-10-24 17:44     ` [2/3] " Sergei Shtylyov
2018-10-25 22:54   ` [PATCH 2/3] " Wolfram Sang
2018-10-25 22:54     ` [2/3] " Wolfram Sang
2018-10-24 13:51 ` [PATCH 3/3] usb: renesas_usbhs: Remove dummy runtime PM callbacks Jarkko Nikula
2018-10-24 13:51   ` [3/3] " Jarkko Nikula
2018-10-25  2:45   ` [PATCH 3/3] " Yoshihiro Shimoda
2018-10-25  2:45     ` [3/3] " Yoshihiro Shimoda
2018-10-25 22:57   ` [PATCH 3/3] " Wolfram Sang
2018-10-25 22:57     ` [3/3] " Wolfram Sang
2018-10-25 22:57     ` [PATCH 3/3] " Wolfram Sang
2018-10-26  2:09     ` Yoshihiro Shimoda
2018-10-26  2:09       ` [3/3] " Yoshihiro Shimoda
2018-10-24 14:22 ` [PATCH 0/3] PM: Renesas: " Wolfram Sang
2018-10-25  0:20   ` Wolfram Sang

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.