Lines Matching refs:ns_thermal
17 struct ns_thermal {
24 struct ns_thermal *ns_thermal = data;
25 int offset = thermal_zone_get_offset(ns_thermal->tz);
26 int slope = thermal_zone_get_slope(ns_thermal->tz);
29 val = readl(ns_thermal->pvtmon + PVTMON_CONTROL0);
37 writel(val, ns_thermal->pvtmon + PVTMON_CONTROL0);
40 val = readl(ns_thermal->pvtmon + PVTMON_STATUS);
53 struct ns_thermal *ns_thermal;
55 ns_thermal = devm_kzalloc(dev, sizeof(*ns_thermal), GFP_KERNEL);
56 if (!ns_thermal)
59 ns_thermal->pvtmon = of_iomap(dev_of_node(dev), 0);
60 if (WARN_ON(!ns_thermal->pvtmon))
63 ns_thermal->tz = devm_thermal_zone_of_sensor_register(dev, 0,
64 ns_thermal,
66 if (IS_ERR(ns_thermal->tz)) {
67 iounmap(ns_thermal->pvtmon);
68 return PTR_ERR(ns_thermal->tz);
71 platform_set_drvdata(pdev, ns_thermal);
78 struct ns_thermal *ns_thermal = platform_get_drvdata(pdev);
80 iounmap(ns_thermal->pvtmon);