19 #include <linux/device.h>
22 #include <linux/kernel.h>
24 #include <linux/module.h>
28 #define MD_FACTOR 1000
54 .get_temp = thermal_get_temp,
58 static int spear_thermal_suspend(
struct device *
dev)
63 unsigned int actual_mask = 0;
75 static int spear_thermal_resume(
struct device *
dev)
80 unsigned int actual_mask = 0;
100 spear_thermal_resume);
110 if (!np || !of_property_read_u32(np,
"st,thermal-flags", &
val)) {
111 dev_err(&pdev->
dev,
"Failed: DT Pdata not passed\n");
116 dev_err(&pdev->
dev,
"memory resource missing\n");
128 resource_size(stres));
135 if (IS_ERR(stdev->
clk)) {
137 return PTR_ERR(stdev->
clk);
151 if (IS_ERR(spear_thermal)) {
152 dev_err(&pdev->
dev,
"thermal zone device is NULL\n");
153 ret = PTR_ERR(spear_thermal);
157 platform_set_drvdata(pdev, spear_thermal);
159 dev_info(&spear_thermal->
device,
"Thermal Sensor Loaded at: 0x%p.\n",
174 unsigned int actual_mask = 0;
179 platform_set_drvdata(pdev,
NULL);
191 static const struct of_device_id spear_thermal_id_table[] = {
192 { .compatible =
"st,thermal-spear1340" },
198 .probe = spear_thermal_probe,
199 .remove = spear_thermal_exit,
201 .name =
"spear_thermal",
203 .pm = &spear_thermal_pm_ops,