All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mason <slash.tmp@free.fr>
To: Grzegorz Jaszczyk <jaz@semihalf.com>,
	rui.zhang@intel.com, linux-pm@vger.kernel.org
Cc: edubezval@gmail.com, thomas.petazzoni@free-electrons.com,
	gregory.clement@free-electrons.com, mw@semihalf.com,
	alior@marvell.com, Arnd Bergmann <arnd@arndb.de>
Subject: Re: [PATCH] thermal: armada: add support for suspend/resume
Date: Wed, 7 Sep 2016 10:05:22 +0200	[thread overview]
Message-ID: <57CFCA42.8000807@free.fr> (raw)
In-Reply-To: <1469097807-17748-1-git-send-email-jaz@semihalf.com>

On 21/07/2016 12:43, Grzegorz Jaszczyk wrote:

> There is no need to implement subroutine for suspend since there is no
> data to store before suspending.
> 
> Signed-off-by: Grzegorz Jaszczyk <jaz@semihalf.com>
> ---
>  drivers/thermal/armada_thermal.c | 14 ++++++++++++++
>  1 file changed, 14 insertions(+)
> 
> diff --git a/drivers/thermal/armada_thermal.c b/drivers/thermal/armada_thermal.c
> index ae75328..65f9838 100644
> --- a/drivers/thermal/armada_thermal.c
> +++ b/drivers/thermal/armada_thermal.c
> @@ -304,12 +304,26 @@ static int armada_thermal_exit(struct platform_device *pdev)
>  	return 0;
>  }
>  
> +static int armada_thermal_resume(struct device *dev)
> +{
> +	struct thermal_zone_device *thermal =
> +		dev_get_drvdata(dev);
> +	struct armada_thermal_priv *priv = thermal->devdata;
> +
> +	priv->data->init_sensor(to_platform_device(dev), priv);
> +
> +	return 0;
> +}
> +
> +static SIMPLE_DEV_PM_OPS(armada_thermal_pm_ops, NULL, armada_thermal_resume);
> +
>  static struct platform_driver armada_thermal_driver = {
>  	.probe = armada_thermal_probe,
>  	.remove = armada_thermal_exit,
>  	.driver = {
>  		.name = "armada_thermal",
>  		.of_match_table = armada_thermal_id_table,
> +		.pm = &armada_thermal_pm_ops,
>  	},
>  };

gcc might warn about 'armada_thermal_resume' defined but not used
when CONFIG_PM_SLEEP is not defined, I think?

(I have a similar patch, Arnd suggested using __maybe_unused tag.)

Regards.


  parent reply	other threads:[~2016-09-07  8:05 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-21 10:43 [PATCH] thermal: armada: add support for suspend/resume Grzegorz Jaszczyk
2016-08-11  8:40 ` Grzegorz Jaszczyk
2016-08-19 13:06 ` Zhang Rui
2016-09-06  0:36   ` Zhang Rui
2016-09-07  8:05 ` Mason [this message]
2016-09-27  1:51   ` Zhang Rui

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=57CFCA42.8000807@free.fr \
    --to=slash.tmp@free.fr \
    --cc=alior@marvell.com \
    --cc=arnd@arndb.de \
    --cc=edubezval@gmail.com \
    --cc=gregory.clement@free-electrons.com \
    --cc=jaz@semihalf.com \
    --cc=linux-pm@vger.kernel.org \
    --cc=mw@semihalf.com \
    --cc=rui.zhang@intel.com \
    --cc=thomas.petazzoni@free-electrons.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.