@@ -24,6 +24,7 @@
#include <linux/io.h>
#include <linux/module.h>
#include <linux/platform_device.h>
+#include <linux/pm_runtime.h>
#include <linux/reboot.h>
#include <linux/slab.h>
#include <linux/spinlock.h>
@@ -411,6 +412,9 @@ static int rcar_thermal_probe(struct platform_device *pdev)
idle = 0; /* polling delaye is not needed */
}
+ pm_runtime_enable(dev);
+ pm_runtime_get_sync(dev);
+
for (i = 0;; i++) {
res = platform_get_resource(pdev, IORESOURCE_MEM, mres++);
if (!res)
@@ -465,6 +469,9 @@ error_unregister:
rcar_thermal_irq_disable(priv);
}
+ pm_runtime_put_sync(dev);
+ pm_runtime_disable(dev);
+
return -ENODEV;
}
@@ -481,6 +488,9 @@ static int rcar_thermal_remove(struct platform_device *pdev)
platform_set_drvdata(pdev, NULL);
+ pm_runtime_put_sync(dev);
+ pm_runtime_disable(dev);
+
return 0;
}
Current rcar_thermal() didn't care about own power. Without this patch, rcar_thermal doesn't work on APE6 board Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> --- drivers/thermal/rcar_thermal.c | 10 ++++++++++ 1 file changed, 10 insertions(+)