* [PATCH 1/2] mfd: tps65090: Fix ifdefs for suspend mode
@ 2012-03-22 18:39 Mark Brown
2012-03-22 18:39 ` [PATCH 2/2] mfd: tps65090: Don't use I2C-specific suspend and resume operations Mark Brown
` (2 more replies)
0 siblings, 3 replies; 9+ messages in thread
From: Mark Brown @ 2012-03-22 18:39 UTC (permalink / raw)
To: Samuel Ortiz, Venu Byravarasu; +Cc: linux-kernel, Mark Brown
CONFIG_PM also covers runtime only PM.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
---
drivers/mfd/tps65090.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/mfd/tps65090.c b/drivers/mfd/tps65090.c
index a66d4df..ac7e8b1 100644
--- a/drivers/mfd/tps65090.c
+++ b/drivers/mfd/tps65090.c
@@ -334,7 +334,7 @@ static int __devexit tps65090_i2c_remove(struct i2c_client *client)
return 0;
}
-#ifdef CONFIG_PM
+#ifdef CONFIG_PM_SLEEP
static int tps65090_i2c_suspend(struct i2c_client *client, pm_message_t state)
{
if (client->irq)
@@ -363,7 +363,7 @@ static struct i2c_driver tps65090_driver = {
},
.probe = tps65090_i2c_probe,
.remove = __devexit_p(tps65090_i2c_remove),
-#ifdef CONFIG_PM
+#ifdef CONFIG_PM_SLEEP
.suspend = tps65090_i2c_suspend,
.resume = tps65090_i2c_resume,
#endif
--
1.7.9.1
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH 2/2] mfd: tps65090: Don't use I2C-specific suspend and resume operations
2012-03-22 18:39 [PATCH 1/2] mfd: tps65090: Fix ifdefs for suspend mode Mark Brown
@ 2012-03-22 18:39 ` Mark Brown
2012-03-26 3:45 ` Venu Byravarasu
2012-03-26 11:04 ` Venu Byravarasu
2012-03-26 3:51 ` [PATCH 1/2] mfd: tps65090: Fix ifdefs for suspend mode Venu Byravarasu
2012-03-26 11:04 ` Venu Byravarasu
2 siblings, 2 replies; 9+ messages in thread
From: Mark Brown @ 2012-03-22 18:39 UTC (permalink / raw)
To: Samuel Ortiz, Venu Byravarasu; +Cc: linux-kernel, Mark Brown
The legacy suspend operations have been deprecated and printing warnings
on boot for over a year now.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
---
It's not clear to me that we should have these operations at all...
drivers/mfd/tps65090.c | 15 +++++++++------
1 files changed, 9 insertions(+), 6 deletions(-)
diff --git a/drivers/mfd/tps65090.c b/drivers/mfd/tps65090.c
index ac7e8b1..6dc4c345 100644
--- a/drivers/mfd/tps65090.c
+++ b/drivers/mfd/tps65090.c
@@ -335,21 +335,27 @@ static int __devexit tps65090_i2c_remove(struct i2c_client *client)
}
#ifdef CONFIG_PM_SLEEP
-static int tps65090_i2c_suspend(struct i2c_client *client, pm_message_t state)
+static int tps65090_suspend(struct device *dev)
{
+ struct i2c_client *client = to_i2c_client(dev);
if (client->irq)
disable_irq(client->irq);
return 0;
}
-static int tps65090_i2c_resume(struct i2c_client *client)
+static int tps65090_resume(struct device *dev)
{
+ struct i2c_client *client = to_i2c_client(dev);
if (client->irq)
enable_irq(client->irq);
return 0;
}
#endif
+static const struct dev_pm_ops tps65090_pm_ops = {
+ SET_SYSTEM_SLEEP_PM_OPS(tps65090_suspend, tps65090_resume)
+};
+
static const struct i2c_device_id tps65090_id_table[] = {
{ "tps65090", 0 },
{ },
@@ -360,13 +366,10 @@ static struct i2c_driver tps65090_driver = {
.driver = {
.name = "tps65090",
.owner = THIS_MODULE,
+ .pm = &tps65090_pm_ops,
},
.probe = tps65090_i2c_probe,
.remove = __devexit_p(tps65090_i2c_remove),
-#ifdef CONFIG_PM_SLEEP
- .suspend = tps65090_i2c_suspend,
- .resume = tps65090_i2c_resume,
-#endif
.id_table = tps65090_id_table,
};
--
1.7.9.1
^ permalink raw reply related [flat|nested] 9+ messages in thread
* RE: [PATCH 2/2] mfd: tps65090: Don't use I2C-specific suspend and resume operations
2012-03-22 18:39 ` [PATCH 2/2] mfd: tps65090: Don't use I2C-specific suspend and resume operations Mark Brown
@ 2012-03-26 3:45 ` Venu Byravarasu
2012-03-26 10:59 ` Mark Brown
2012-03-26 11:04 ` Venu Byravarasu
1 sibling, 1 reply; 9+ messages in thread
From: Venu Byravarasu @ 2012-03-26 3:45 UTC (permalink / raw)
To: Mark Brown, Samuel Ortiz; +Cc: linux-kernel@vger.kernel.org
> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
> ---
>
> It's not clear to me that we should have these operations at all...
Mark,
Can you please explain why do you think that these operations are not needed?
>
> drivers/mfd/tps65090.c | 15 +++++++++------
> 1 files changed, 9 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/mfd/tps65090.c b/drivers/mfd/tps65090.c
> index ac7e8b1..6dc4c345 100644
> --- a/drivers/mfd/tps65090.c
> +++ b/drivers/mfd/tps65090.c
> @@ -335,21 +335,27 @@ static int __devexit tps65090_i2c_remove(struct
> i2c_client *client)
> }
>
> #ifdef CONFIG_PM_SLEEP
> -static int tps65090_i2c_suspend(struct i2c_client *client, pm_message_t state)
> +static int tps65090_suspend(struct device *dev)
> {
> + struct i2c_client *client = to_i2c_client(dev);
> if (client->irq)
> disable_irq(client->irq);
> return 0;
> }
>
> -static int tps65090_i2c_resume(struct i2c_client *client)
> +static int tps65090_resume(struct device *dev)
> {
> + struct i2c_client *client = to_i2c_client(dev);
> if (client->irq)
> enable_irq(client->irq);
> return 0;
> }
> #endif
>
> +static const struct dev_pm_ops tps65090_pm_ops = {
> + SET_SYSTEM_SLEEP_PM_OPS(tps65090_suspend, tps65090_resume)
> +};
> +
> static const struct i2c_device_id tps65090_id_table[] = {
> { "tps65090", 0 },
> { },
> @@ -360,13 +366,10 @@ static struct i2c_driver tps65090_driver = {
> .driver = {
> .name = "tps65090",
> .owner = THIS_MODULE,
> + .pm = &tps65090_pm_ops,
> },
> .probe = tps65090_i2c_probe,
> .remove = __devexit_p(tps65090_i2c_remove),
> -#ifdef CONFIG_PM_SLEEP
> - .suspend = tps65090_i2c_suspend,
> - .resume = tps65090_i2c_resume,
> -#endif
> .id_table = tps65090_id_table,
> };
>
> --
> 1.7.9.1
^ permalink raw reply [flat|nested] 9+ messages in thread
* RE: [PATCH 1/2] mfd: tps65090: Fix ifdefs for suspend mode
2012-03-22 18:39 [PATCH 1/2] mfd: tps65090: Fix ifdefs for suspend mode Mark Brown
2012-03-22 18:39 ` [PATCH 2/2] mfd: tps65090: Don't use I2C-specific suspend and resume operations Mark Brown
@ 2012-03-26 3:51 ` Venu Byravarasu
2012-03-26 11:00 ` Mark Brown
2012-03-26 11:04 ` Venu Byravarasu
2 siblings, 1 reply; 9+ messages in thread
From: Venu Byravarasu @ 2012-03-26 3:51 UTC (permalink / raw)
To: Mark Brown, Samuel Ortiz; +Cc: linux-kernel@vger.kernel.org
>
> CONFIG_PM also covers runtime only PM.
Hi Mark,
As CONFIG_PM covers both runtime and full system suspend/resume
activities, I do not really understand what we gain with this change.
Can you please provide more details?
Thanks,
Venu
>
> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
> ---
> drivers/mfd/tps65090.c | 4 ++--
> 1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/mfd/tps65090.c b/drivers/mfd/tps65090.c
> index a66d4df..ac7e8b1 100644
> --- a/drivers/mfd/tps65090.c
> +++ b/drivers/mfd/tps65090.c
> @@ -334,7 +334,7 @@ static int __devexit tps65090_i2c_remove(struct
> i2c_client *client)
> return 0;
> }
>
> -#ifdef CONFIG_PM
> +#ifdef CONFIG_PM_SLEEP
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 2/2] mfd: tps65090: Don't use I2C-specific suspend and resume operations
2012-03-26 3:45 ` Venu Byravarasu
@ 2012-03-26 10:59 ` Mark Brown
2012-03-26 11:00 ` Venu Byravarasu
0 siblings, 1 reply; 9+ messages in thread
From: Mark Brown @ 2012-03-26 10:59 UTC (permalink / raw)
To: Venu Byravarasu; +Cc: Samuel Ortiz, linux-kernel@vger.kernel.org
[-- Attachment #1: Type: text/plain, Size: 433 bytes --]
On Mon, Mar 26, 2012 at 09:15:03AM +0530, Venu Byravarasu wrote:
> > Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
> > It's not clear to me that we should have these operations at all...
> Can you please explain why do you think that these operations are not needed?
They've been deprecated for over a year, if you'd looked at the kernel
boot log you'd see that it's been complaining about them at startup
time.
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 1/2] mfd: tps65090: Fix ifdefs for suspend mode
2012-03-26 3:51 ` [PATCH 1/2] mfd: tps65090: Fix ifdefs for suspend mode Venu Byravarasu
@ 2012-03-26 11:00 ` Mark Brown
0 siblings, 0 replies; 9+ messages in thread
From: Mark Brown @ 2012-03-26 11:00 UTC (permalink / raw)
To: Venu Byravarasu; +Cc: Samuel Ortiz, linux-kernel@vger.kernel.org
[-- Attachment #1: Type: text/plain, Size: 428 bytes --]
On Mon, Mar 26, 2012 at 09:21:33AM +0530, Venu Byravarasu wrote:
> > CONFIG_PM also covers runtime only PM.
> As CONFIG_PM covers both runtime and full system suspend/resume
> activities, I do not really understand what we gain with this change.
> Can you please provide more details?
You've only got system sleep PM operations, CONFIG_PM will leave them
built when CONFIG_PM_SLEEP is disabled so you'll get build warnings.
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* RE: [PATCH 2/2] mfd: tps65090: Don't use I2C-specific suspend and resume operations
2012-03-26 10:59 ` Mark Brown
@ 2012-03-26 11:00 ` Venu Byravarasu
0 siblings, 0 replies; 9+ messages in thread
From: Venu Byravarasu @ 2012-03-26 11:00 UTC (permalink / raw)
To: Mark Brown; +Cc: Samuel Ortiz, linux-kernel@vger.kernel.org
> > > It's not clear to me that we should have these operations at all...
>
> > Can you please explain why do you think that these operations are not
> needed?
>
> They've been deprecated for over a year, if you'd looked at the kernel
> boot log you'd see that it's been complaining about them at startup
> time.
Thanks, understood.
^ permalink raw reply [flat|nested] 9+ messages in thread
* RE: [PATCH 1/2] mfd: tps65090: Fix ifdefs for suspend mode
2012-03-22 18:39 [PATCH 1/2] mfd: tps65090: Fix ifdefs for suspend mode Mark Brown
2012-03-22 18:39 ` [PATCH 2/2] mfd: tps65090: Don't use I2C-specific suspend and resume operations Mark Brown
2012-03-26 3:51 ` [PATCH 1/2] mfd: tps65090: Fix ifdefs for suspend mode Venu Byravarasu
@ 2012-03-26 11:04 ` Venu Byravarasu
2 siblings, 0 replies; 9+ messages in thread
From: Venu Byravarasu @ 2012-03-26 11:04 UTC (permalink / raw)
To: Mark Brown, Samuel Ortiz; +Cc: linux-kernel@vger.kernel.org
Thanks Mark for clarifying.
Acked-by: Venu Byravarasu <vbyravarasu@nvidia.com>
> -----Original Message-----
> From: Mark Brown [mailto:broonie@opensource.wolfsonmicro.com]
> Sent: Friday, March 23, 2012 12:09 AM
> To: Samuel Ortiz; Venu Byravarasu
> Cc: linux-kernel@vger.kernel.org; Mark Brown
> Subject: [PATCH 1/2] mfd: tps65090: Fix ifdefs for suspend mode
>
> CONFIG_PM also covers runtime only PM.
>
> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
> ---
> drivers/mfd/tps65090.c | 4 ++--
> 1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/mfd/tps65090.c b/drivers/mfd/tps65090.c
> index a66d4df..ac7e8b1 100644
> --- a/drivers/mfd/tps65090.c
> +++ b/drivers/mfd/tps65090.c
> @@ -334,7 +334,7 @@ static int __devexit tps65090_i2c_remove(struct
> i2c_client *client)
> return 0;
> }
>
> -#ifdef CONFIG_PM
> +#ifdef CONFIG_PM_SLEEP
> static int tps65090_i2c_suspend(struct i2c_client *client, pm_message_t state)
> {
> if (client->irq)
> @@ -363,7 +363,7 @@ static struct i2c_driver tps65090_driver = {
> },
> .probe = tps65090_i2c_probe,
> .remove = __devexit_p(tps65090_i2c_remove),
> -#ifdef CONFIG_PM
> +#ifdef CONFIG_PM_SLEEP
> .suspend = tps65090_i2c_suspend,
> .resume = tps65090_i2c_resume,
> #endif
> --
> 1.7.9.1
^ permalink raw reply [flat|nested] 9+ messages in thread
* RE: [PATCH 2/2] mfd: tps65090: Don't use I2C-specific suspend and resume operations
2012-03-22 18:39 ` [PATCH 2/2] mfd: tps65090: Don't use I2C-specific suspend and resume operations Mark Brown
2012-03-26 3:45 ` Venu Byravarasu
@ 2012-03-26 11:04 ` Venu Byravarasu
1 sibling, 0 replies; 9+ messages in thread
From: Venu Byravarasu @ 2012-03-26 11:04 UTC (permalink / raw)
To: Mark Brown, Samuel Ortiz; +Cc: linux-kernel@vger.kernel.org
Thanks Mark for clarifying.
Acked-by: Venu Byravarasu <vbyravarasu@nvidia.com>
> -----Original Message-----
> From: Mark Brown [mailto:broonie@opensource.wolfsonmicro.com]
> Sent: Friday, March 23, 2012 12:09 AM
> To: Samuel Ortiz; Venu Byravarasu
> Cc: linux-kernel@vger.kernel.org; Mark Brown
> Subject: [PATCH 2/2] mfd: tps65090: Don't use I2C-specific suspend and resume
> operations
>
> The legacy suspend operations have been deprecated and printing warnings
> on boot for over a year now.
>
> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
> ---
>
> It's not clear to me that we should have these operations at all...
>
> drivers/mfd/tps65090.c | 15 +++++++++------
> 1 files changed, 9 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/mfd/tps65090.c b/drivers/mfd/tps65090.c
> index ac7e8b1..6dc4c345 100644
> --- a/drivers/mfd/tps65090.c
> +++ b/drivers/mfd/tps65090.c
> @@ -335,21 +335,27 @@ static int __devexit tps65090_i2c_remove(struct
> i2c_client *client)
> }
>
> #ifdef CONFIG_PM_SLEEP
> -static int tps65090_i2c_suspend(struct i2c_client *client, pm_message_t state)
> +static int tps65090_suspend(struct device *dev)
> {
> + struct i2c_client *client = to_i2c_client(dev);
> if (client->irq)
> disable_irq(client->irq);
> return 0;
> }
>
> -static int tps65090_i2c_resume(struct i2c_client *client)
> +static int tps65090_resume(struct device *dev)
> {
> + struct i2c_client *client = to_i2c_client(dev);
> if (client->irq)
> enable_irq(client->irq);
> return 0;
> }
> #endif
>
> +static const struct dev_pm_ops tps65090_pm_ops = {
> + SET_SYSTEM_SLEEP_PM_OPS(tps65090_suspend, tps65090_resume)
> +};
> +
> static const struct i2c_device_id tps65090_id_table[] = {
> { "tps65090", 0 },
> { },
> @@ -360,13 +366,10 @@ static struct i2c_driver tps65090_driver = {
> .driver = {
> .name = "tps65090",
> .owner = THIS_MODULE,
> + .pm = &tps65090_pm_ops,
> },
> .probe = tps65090_i2c_probe,
> .remove = __devexit_p(tps65090_i2c_remove),
> -#ifdef CONFIG_PM_SLEEP
> - .suspend = tps65090_i2c_suspend,
> - .resume = tps65090_i2c_resume,
> -#endif
> .id_table = tps65090_id_table,
> };
>
> --
> 1.7.9.1
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2012-03-26 11:04 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-22 18:39 [PATCH 1/2] mfd: tps65090: Fix ifdefs for suspend mode Mark Brown
2012-03-22 18:39 ` [PATCH 2/2] mfd: tps65090: Don't use I2C-specific suspend and resume operations Mark Brown
2012-03-26 3:45 ` Venu Byravarasu
2012-03-26 10:59 ` Mark Brown
2012-03-26 11:00 ` Venu Byravarasu
2012-03-26 11:04 ` Venu Byravarasu
2012-03-26 3:51 ` [PATCH 1/2] mfd: tps65090: Fix ifdefs for suspend mode Venu Byravarasu
2012-03-26 11:00 ` Mark Brown
2012-03-26 11:04 ` Venu Byravarasu
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.