linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] thermal: armada: add support for suspend/resume
@ 2016-07-21 10:43 Grzegorz Jaszczyk
  2016-08-11  8:40 ` Grzegorz Jaszczyk
  2016-08-19 13:06 ` Zhang Rui
  0 siblings, 2 replies; 4+ messages in thread
From: Grzegorz Jaszczyk @ 2016-07-21 10:43 UTC (permalink / raw)
  To: rui.zhang, edubezval, linux-pm, linux-kernel, thomas.petazzoni,
	gregory.clement
  Cc: mw, jaz, alior

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,
 	},
 };
 
-- 
1.8.3.1

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

end of thread, other threads:[~2016-09-06  0:36 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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

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