Lines Matching +full:ns +full:- +full:thermal
1 // SPDX-License-Identifier: GPL-2.0-only
9 #include <linux/thermal.h>
25 int offset = thermal_zone_get_offset(ns_thermal->tz); in ns_thermal_get_temp()
26 int slope = thermal_zone_get_slope(ns_thermal->tz); in ns_thermal_get_temp()
29 val = readl(ns_thermal->pvtmon + PVTMON_CONTROL0); in ns_thermal_get_temp()
37 writel(val, ns_thermal->pvtmon + PVTMON_CONTROL0); in ns_thermal_get_temp()
40 val = readl(ns_thermal->pvtmon + PVTMON_STATUS); in ns_thermal_get_temp()
52 struct device *dev = &pdev->dev; in ns_thermal_probe()
57 return -ENOMEM; in ns_thermal_probe()
59 ns_thermal->pvtmon = of_iomap(dev_of_node(dev), 0); in ns_thermal_probe()
60 if (WARN_ON(!ns_thermal->pvtmon)) in ns_thermal_probe()
61 return -ENOENT; in ns_thermal_probe()
63 ns_thermal->tz = devm_thermal_zone_of_sensor_register(dev, 0, in ns_thermal_probe()
66 if (IS_ERR(ns_thermal->tz)) { in ns_thermal_probe()
67 iounmap(ns_thermal->pvtmon); in ns_thermal_probe()
68 return PTR_ERR(ns_thermal->tz); in ns_thermal_probe()
80 iounmap(ns_thermal->pvtmon); in ns_thermal_remove()
86 { .compatible = "brcm,ns-thermal", },
95 .name = "ns-thermal",
102 MODULE_DESCRIPTION("Northstar thermal driver");