23 #include <linux/module.h>
25 #include <linux/slab.h>
58 spin_unlock_irqrestore(&priv->
lock, flags);
73 spin_unlock_irqrestore(&priv->
lock, flags);
90 spin_unlock_irqrestore(&priv->
lock, flags);
104 if (priv->
comp < 1 || priv->
comp > 12) {
106 "THSSR invalid data (%d)\n", priv->
comp);
133 min = (priv->
comp * 15) - 60;
146 val = (val * 5) - 65;
148 dev_dbg(priv->
dev,
"comp/min/max/val = %d/%d/%d/%d\n",
149 priv->
comp, min, max, val);
163 }
else if (val >= max) {
177 .get_temp = rcar_thermal_get_temp,
192 dev_err(&pdev->
dev,
"Could not get platform resource\n");
198 dev_err(&pdev->
dev,
"Could not allocate priv\n");
206 res->
start, resource_size(res));
208 dev_err(&pdev->
dev,
"Unable to ioremap thermal register\n");
210 goto error_free_priv;
214 &rcar_thermal_zone_ops, 0, 0);
216 dev_err(&pdev->
dev,
"thermal zone device is NULL\n");
221 platform_set_drvdata(pdev, zone);
241 platform_set_drvdata(pdev,
NULL);
251 .name =
"rcar_thermal",
253 .probe = rcar_thermal_probe,
254 .remove = rcar_thermal_remove,