linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/5] i2c: qup: remove unnecessary CONFIG_PM_SLEEP
@ 2020-10-29  7:46 Coiby Xu
  2020-10-29  7:46 ` [PATCH 2/5] i2c: mediatek: " Coiby Xu
                   ` (3 more replies)
  0 siblings, 4 replies; 9+ messages in thread
From: Coiby Xu @ 2020-10-29  7:46 UTC (permalink / raw)
  To: linux-i2c
  Cc: Andy Gross, Bjorn Andersson, open list:ARM/QUALCOMM SUPPORT, open list

SET_SYSTEM_SLEEP_PM_OPS has already took good care of CONFIG_PM_CONFIG.

Signed-off-by: Coiby Xu <coiby.xu@gmail.com>
---
 drivers/i2c/busses/i2c-qup.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/i2c/busses/i2c-qup.c b/drivers/i2c/busses/i2c-qup.c
index fbc04b60cfd1..bf63e4567705 100644
--- a/drivers/i2c/busses/i2c-qup.c
+++ b/drivers/i2c/busses/i2c-qup.c
@@ -1940,7 +1940,6 @@ static int qup_i2c_pm_resume_runtime(struct device *device)
 }
 #endif
 
-#ifdef CONFIG_PM_SLEEP
 static int qup_i2c_suspend(struct device *device)
 {
 	if (!pm_runtime_suspended(device))
@@ -1955,7 +1954,6 @@ static int qup_i2c_resume(struct device *device)
 	pm_request_autosuspend(device);
 	return 0;
 }
-#endif
 
 static const struct dev_pm_ops qup_i2c_qup_pm_ops = {
 	SET_SYSTEM_SLEEP_PM_OPS(
-- 
2.28.0


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

* [PATCH 2/5] i2c: mediatek: remove unnecessary CONFIG_PM_SLEEP
  2020-10-29  7:46 [PATCH 1/5] i2c: qup: remove unnecessary CONFIG_PM_SLEEP Coiby Xu
@ 2020-10-29  7:46 ` Coiby Xu
  2020-10-29  7:46 ` [PATCH 3/5] i2c: brcmstb: " Coiby Xu
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 9+ messages in thread
From: Coiby Xu @ 2020-10-29  7:46 UTC (permalink / raw)
  To: linux-i2c
  Cc: Qii Wang, Matthias Brugger,
	moderated list:ARM/Mediatek SoC support,
	moderated list:ARM/Mediatek SoC support, open list

SET_SYSTEM_SLEEP_PM_OPS has already took good care of CONFIG_PM_CONFIG.

Signed-off-by: Coiby Xu <coiby.xu@gmail.com>
---
 drivers/i2c/busses/i2c-mt65xx.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/i2c/busses/i2c-mt65xx.c b/drivers/i2c/busses/i2c-mt65xx.c
index 0cbdfbe605b5..c2939f2e5dea 100644
--- a/drivers/i2c/busses/i2c-mt65xx.c
+++ b/drivers/i2c/busses/i2c-mt65xx.c
@@ -1284,7 +1284,6 @@ static int mtk_i2c_remove(struct platform_device *pdev)
 	return 0;
 }
 
-#ifdef CONFIG_PM_SLEEP
 static int mtk_i2c_resume(struct device *dev)
 {
 	int ret;
@@ -1302,7 +1301,6 @@ static int mtk_i2c_resume(struct device *dev)
 
 	return 0;
 }
-#endif
 
 static const struct dev_pm_ops mtk_i2c_pm = {
 	SET_SYSTEM_SLEEP_PM_OPS(NULL, mtk_i2c_resume)
-- 
2.28.0


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

* [PATCH 3/5] i2c: brcmstb: remove unnecessary CONFIG_PM_SLEEP
  2020-10-29  7:46 [PATCH 1/5] i2c: qup: remove unnecessary CONFIG_PM_SLEEP Coiby Xu
  2020-10-29  7:46 ` [PATCH 2/5] i2c: mediatek: " Coiby Xu
@ 2020-10-29  7:46 ` Coiby Xu
  2020-11-04  3:28   ` Florian Fainelli
  2020-10-29  7:46 ` [PATCH 4/5] i2c: nomadik: " Coiby Xu
  2020-10-29  7:46 ` [PATCH 5/5] i2c: stm32: " Coiby Xu
  3 siblings, 1 reply; 9+ messages in thread
From: Coiby Xu @ 2020-10-29  7:46 UTC (permalink / raw)
  To: linux-i2c
  Cc: Kamal Dasu, Florian Fainelli,
	maintainer:BROADCOM BCM7XXX ARM ARCHITECTURE,
	moderated list:BROADCOM BCM7XXX ARM ARCHITECTURE, open list

SIMPLE_DEV_PM_OPS has already took good care of CONFIG_PM_CONFIG.

Signed-off-by: Coiby Xu <coiby.xu@gmail.com>
---
 drivers/i2c/busses/i2c-brcmstb.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/i2c/busses/i2c-brcmstb.c b/drivers/i2c/busses/i2c-brcmstb.c
index d4e0a0f6732a..16f688e115be 100644
--- a/drivers/i2c/busses/i2c-brcmstb.c
+++ b/drivers/i2c/busses/i2c-brcmstb.c
@@ -713,7 +713,6 @@ static int brcmstb_i2c_remove(struct platform_device *pdev)
 	return 0;
 }
 
-#ifdef CONFIG_PM_SLEEP
 static int brcmstb_i2c_suspend(struct device *dev)
 {
 	struct brcmstb_i2c_dev *i2c_dev = dev_get_drvdata(dev);
@@ -731,7 +730,6 @@ static int brcmstb_i2c_resume(struct device *dev)
 
 	return 0;
 }
-#endif
 
 static SIMPLE_DEV_PM_OPS(brcmstb_i2c_pm, brcmstb_i2c_suspend,
 			 brcmstb_i2c_resume);
-- 
2.28.0


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

* [PATCH 4/5] i2c: nomadik: remove unnecessary CONFIG_PM_SLEEP
  2020-10-29  7:46 [PATCH 1/5] i2c: qup: remove unnecessary CONFIG_PM_SLEEP Coiby Xu
  2020-10-29  7:46 ` [PATCH 2/5] i2c: mediatek: " Coiby Xu
  2020-10-29  7:46 ` [PATCH 3/5] i2c: brcmstb: " Coiby Xu
@ 2020-10-29  7:46 ` Coiby Xu
  2020-11-05 14:03   ` Linus Walleij
  2020-10-29  7:46 ` [PATCH 5/5] i2c: stm32: " Coiby Xu
  3 siblings, 1 reply; 9+ messages in thread
From: Coiby Xu @ 2020-10-29  7:46 UTC (permalink / raw)
  To: linux-i2c
  Cc: Linus Walleij,
	moderated list:ARM/NOMADIK/U300/Ux500 ARCHITECTURES, open list

SET_LATE_SYSTEM_SLEEP_PM_OPS has already took good care of CONFIG_PM_CONFIG.

Signed-off-by: Coiby Xu <coiby.xu@gmail.com>
---
 drivers/i2c/busses/i2c-nomadik.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/i2c/busses/i2c-nomadik.c b/drivers/i2c/busses/i2c-nomadik.c
index d4b1b0865f67..cd0f9f92c913 100644
--- a/drivers/i2c/busses/i2c-nomadik.c
+++ b/drivers/i2c/busses/i2c-nomadik.c
@@ -873,7 +873,6 @@ static irqreturn_t i2c_irq_handler(int irq, void *arg)
 	return IRQ_HANDLED;
 }
 
-#ifdef CONFIG_PM_SLEEP
 static int nmk_i2c_suspend_late(struct device *dev)
 {
 	int ret;
@@ -890,7 +889,6 @@ static int nmk_i2c_resume_early(struct device *dev)
 {
 	return pm_runtime_force_resume(dev);
 }
-#endif
 
 #ifdef CONFIG_PM
 static int nmk_i2c_runtime_suspend(struct device *dev)
-- 
2.28.0


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

* [PATCH 5/5] i2c: stm32: remove unnecessary CONFIG_PM_SLEEP
  2020-10-29  7:46 [PATCH 1/5] i2c: qup: remove unnecessary CONFIG_PM_SLEEP Coiby Xu
                   ` (2 preceding siblings ...)
  2020-10-29  7:46 ` [PATCH 4/5] i2c: nomadik: " Coiby Xu
@ 2020-10-29  7:46 ` Coiby Xu
  2020-10-29 11:31   ` Fabrice Gasnier
  3 siblings, 1 reply; 9+ messages in thread
From: Coiby Xu @ 2020-10-29  7:46 UTC (permalink / raw)
  To: linux-i2c
  Cc: Pierre-Yves MORDRET, Maxime Coquelin, Alexandre Torgue,
	moderated list:ARM/STM32 ARCHITECTURE,
	moderated list:ARM/STM32 ARCHITECTURE, open list

SET_SYSTEM_SLEEP_PM_OPS has already took good care of CONFIG_PM_CONFIG.

Signed-off-by: Coiby Xu <coiby.xu@gmail.com>
---
 drivers/i2c/busses/i2c-stm32f7.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/i2c/busses/i2c-stm32f7.c b/drivers/i2c/busses/i2c-stm32f7.c
index f41f51a176a1..95ac9dfdf458 100644
--- a/drivers/i2c/busses/i2c-stm32f7.c
+++ b/drivers/i2c/busses/i2c-stm32f7.c
@@ -2262,7 +2262,6 @@ static int __maybe_unused stm32f7_i2c_runtime_resume(struct device *dev)
 	return 0;
 }
 
-#ifdef CONFIG_PM_SLEEP
 static int stm32f7_i2c_regs_backup(struct stm32f7_i2c_dev *i2c_dev)
 {
 	int ret;
@@ -2356,7 +2355,6 @@ static int stm32f7_i2c_resume(struct device *dev)
 
 	return 0;
 }
-#endif
 
 static const struct dev_pm_ops stm32f7_i2c_pm_ops = {
 	SET_RUNTIME_PM_OPS(stm32f7_i2c_runtime_suspend,
-- 
2.28.0


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

* Re: [PATCH 5/5] i2c: stm32: remove unnecessary CONFIG_PM_SLEEP
  2020-10-29  7:46 ` [PATCH 5/5] i2c: stm32: " Coiby Xu
@ 2020-10-29 11:31   ` Fabrice Gasnier
  2020-10-29 14:18     ` Coiby Xu
  0 siblings, 1 reply; 9+ messages in thread
From: Fabrice Gasnier @ 2020-10-29 11:31 UTC (permalink / raw)
  To: Coiby Xu, linux-i2c
  Cc: Alexandre Torgue, open list, Pierre-Yves MORDRET,
	Maxime Coquelin, moderated list:ARM/STM32 ARCHITECTURE,
	moderated list:ARM/STM32 ARCHITECTURE, Alain VOLMAT

On 10/29/20 8:46 AM, Coiby Xu wrote:
> SET_SYSTEM_SLEEP_PM_OPS has already took good care of CONFIG_PM_CONFIG.
> 
> Signed-off-by: Coiby Xu <coiby.xu@gmail.com>
> ---
>  drivers/i2c/busses/i2c-stm32f7.c | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/drivers/i2c/busses/i2c-stm32f7.c b/drivers/i2c/busses/i2c-stm32f7.c
> index f41f51a176a1..95ac9dfdf458 100644
> --- a/drivers/i2c/busses/i2c-stm32f7.c
> +++ b/drivers/i2c/busses/i2c-stm32f7.c
> @@ -2262,7 +2262,6 @@ static int __maybe_unused stm32f7_i2c_runtime_resume(struct device *dev)
>  	return 0;
>  }
>  
> -#ifdef CONFIG_PM_SLEEP

Hi Coiby,

This generates warnings when building with W=1 and CONFIG_PM_SLEEP=n.
Could you please add also "__maybe_unused" for relevant routines below ?

>  static int stm32f7_i2c_regs_backup(struct stm32f7_i2c_dev *i2c_dev)
             ^
e.g. insert: __maybe_unused

Best regards,
Fabrice
>  {
>  	int ret;
> @@ -2356,7 +2355,6 @@ static int stm32f7_i2c_resume(struct device *dev)
>  
>  	return 0;
>  }
> -#endif
>  
>  static const struct dev_pm_ops stm32f7_i2c_pm_ops = {
>  	SET_RUNTIME_PM_OPS(stm32f7_i2c_runtime_suspend,
> 

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

* Re: [PATCH 5/5] i2c: stm32: remove unnecessary CONFIG_PM_SLEEP
  2020-10-29 11:31   ` Fabrice Gasnier
@ 2020-10-29 14:18     ` Coiby Xu
  0 siblings, 0 replies; 9+ messages in thread
From: Coiby Xu @ 2020-10-29 14:18 UTC (permalink / raw)
  To: Fabrice Gasnier
  Cc: linux-i2c, Alexandre Torgue, open list, Pierre-Yves MORDRET,
	Maxime Coquelin, moderated list:ARM/STM32 ARCHITECTURE,
	moderated list:ARM/STM32 ARCHITECTURE, Alain VOLMAT

Hi Fabrice,

On Thu, Oct 29, 2020 at 12:31:54PM +0100, Fabrice Gasnier wrote:
>On 10/29/20 8:46 AM, Coiby Xu wrote:
>> SET_SYSTEM_SLEEP_PM_OPS has already took good care of CONFIG_PM_CONFIG.
>>
>> Signed-off-by: Coiby Xu <coiby.xu@gmail.com>
>> ---
>>  drivers/i2c/busses/i2c-stm32f7.c | 2 --
>>  1 file changed, 2 deletions(-)
>>
>> diff --git a/drivers/i2c/busses/i2c-stm32f7.c b/drivers/i2c/busses/i2c-stm32f7.c
>> index f41f51a176a1..95ac9dfdf458 100644
>> --- a/drivers/i2c/busses/i2c-stm32f7.c
>> +++ b/drivers/i2c/busses/i2c-stm32f7.c
>> @@ -2262,7 +2262,6 @@ static int __maybe_unused stm32f7_i2c_runtime_resume(struct device *dev)
>>  	return 0;
>>  }
>>
>> -#ifdef CONFIG_PM_SLEEP
>
>Hi Coiby,
>
>This generates warnings when building with W=1 and CONFIG_PM_SLEEP=n.
>Could you please add also "__maybe_unused" for relevant routines below ?
>
>>  static int stm32f7_i2c_regs_backup(struct stm32f7_i2c_dev *i2c_dev)
>             ^
>e.g. insert: __maybe_unused
>

Thank you for the suggestion. I'll add "__maybe_unused" in v2.

>Best regards,
>Fabrice
>>  {
>>  	int ret;
>> @@ -2356,7 +2355,6 @@ static int stm32f7_i2c_resume(struct device *dev)
>>
>>  	return 0;
>>  }
>> -#endif
>>
>>  static const struct dev_pm_ops stm32f7_i2c_pm_ops = {
>>  	SET_RUNTIME_PM_OPS(stm32f7_i2c_runtime_suspend,
>>

--
Best regards,
Coiby

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

* Re: [PATCH 3/5] i2c: brcmstb: remove unnecessary CONFIG_PM_SLEEP
  2020-10-29  7:46 ` [PATCH 3/5] i2c: brcmstb: " Coiby Xu
@ 2020-11-04  3:28   ` Florian Fainelli
  0 siblings, 0 replies; 9+ messages in thread
From: Florian Fainelli @ 2020-11-04  3:28 UTC (permalink / raw)
  To: Coiby Xu, linux-i2c
  Cc: Kamal Dasu, Florian Fainelli,
	maintainer:BROADCOM BCM7XXX ARM ARCHITECTURE,
	moderated list:BROADCOM BCM7XXX ARM ARCHITECTURE, open list



On 10/29/2020 12:46 AM, Coiby Xu wrote:
> SIMPLE_DEV_PM_OPS has already took good care of CONFIG_PM_CONFIG.
> 
> Signed-off-by: Coiby Xu <coiby.xu@gmail.com>

You need to annotate brcmstb_i2c_suspend and brcmstb_i2c_resume with
__maybe_unused to avoid generating compiler warnings about unused
functions with CONFIG_PM_SLEEP disabled.
-- 
Florian

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

* Re: [PATCH 4/5] i2c: nomadik: remove unnecessary CONFIG_PM_SLEEP
  2020-10-29  7:46 ` [PATCH 4/5] i2c: nomadik: " Coiby Xu
@ 2020-11-05 14:03   ` Linus Walleij
  0 siblings, 0 replies; 9+ messages in thread
From: Linus Walleij @ 2020-11-05 14:03 UTC (permalink / raw)
  To: Coiby Xu
  Cc: linux-i2c, moderated list:ARM/NOMADIK/U300/Ux500 ARCHITECTURES,
	open list

On Thu, Oct 29, 2020 at 8:47 AM Coiby Xu <coiby.xu@gmail.com> wrote:

> SET_LATE_SYSTEM_SLEEP_PM_OPS has already took good care of CONFIG_PM_CONFIG.
>
> Signed-off-by: Coiby Xu <coiby.xu@gmail.com>

I don't know about the state of sleep/pm callback macros, but I
assume you know what you're doing.
Acked-by: Linus Walleij <linus.walleij@linaro.org>

Yours,
Linus Walleij

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

end of thread, other threads:[~2020-11-05 14:03 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-29  7:46 [PATCH 1/5] i2c: qup: remove unnecessary CONFIG_PM_SLEEP Coiby Xu
2020-10-29  7:46 ` [PATCH 2/5] i2c: mediatek: " Coiby Xu
2020-10-29  7:46 ` [PATCH 3/5] i2c: brcmstb: " Coiby Xu
2020-11-04  3:28   ` Florian Fainelli
2020-10-29  7:46 ` [PATCH 4/5] i2c: nomadik: " Coiby Xu
2020-11-05 14:03   ` Linus Walleij
2020-10-29  7:46 ` [PATCH 5/5] i2c: stm32: " Coiby Xu
2020-10-29 11:31   ` Fabrice Gasnier
2020-10-29 14:18     ` Coiby Xu

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).