Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1466373

Re: [PATCH] thermal: armada: add support for suspend/resume

From Zhang Rui <rui.zhang@intel.com>
Newsgroups linux.kernel
Subject Re: [PATCH] thermal: armada: add support for suspend/resume
Date 2016-08-19 15:10 +0200
Message-ID <s7RIC-61N-21@gated-at.bofh.it> (permalink)
References <rXjyx-6eJ-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On 四, 2016-07-21 at 12:43 +0200, 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>

Ezequiel,

what do you think of this patch?

thanks,
rui
> ---
>  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,
>  	},
>  };
>  

Back to linux.kernel | Previous | Next | Find similar | Unroll thread


Thread

Re: [PATCH] thermal: armada: add support for suspend/resume Zhang Rui <rui.zhang@intel.com> - 2016-08-19 15:10 +0200

csiph-web