Lines Matching refs:stdev

34 	struct spear_thermal_dev *stdev = thermal_zone_device_priv(thermal);  in thermal_get_temp()  local
40 *temp = (readl_relaxed(stdev->thermal_base) & 0x7F) * MD_FACTOR; in thermal_get_temp()
51 struct spear_thermal_dev *stdev = thermal_zone_device_priv(spear_thermal); in spear_thermal_suspend() local
55 actual_mask = readl_relaxed(stdev->thermal_base); in spear_thermal_suspend()
56 writel_relaxed(actual_mask & ~stdev->flags, stdev->thermal_base); in spear_thermal_suspend()
58 clk_disable(stdev->clk); in spear_thermal_suspend()
67 struct spear_thermal_dev *stdev = thermal_zone_device_priv(spear_thermal); in spear_thermal_resume() local
71 ret = clk_enable(stdev->clk); in spear_thermal_resume()
78 actual_mask = readl_relaxed(stdev->thermal_base); in spear_thermal_resume()
79 writel_relaxed(actual_mask | stdev->flags, stdev->thermal_base); in spear_thermal_resume()
92 struct spear_thermal_dev *stdev; in spear_thermal_probe() local
101 stdev = devm_kzalloc(&pdev->dev, sizeof(*stdev), GFP_KERNEL); in spear_thermal_probe()
102 if (!stdev) in spear_thermal_probe()
106 stdev->thermal_base = devm_platform_get_and_ioremap_resource(pdev, 0, NULL); in spear_thermal_probe()
107 if (IS_ERR(stdev->thermal_base)) in spear_thermal_probe()
108 return PTR_ERR(stdev->thermal_base); in spear_thermal_probe()
110 stdev->clk = devm_clk_get(&pdev->dev, NULL); in spear_thermal_probe()
111 if (IS_ERR(stdev->clk)) { in spear_thermal_probe()
113 return PTR_ERR(stdev->clk); in spear_thermal_probe()
116 ret = clk_enable(stdev->clk); in spear_thermal_probe()
122 stdev->flags = val; in spear_thermal_probe()
123 writel_relaxed(stdev->flags, stdev->thermal_base); in spear_thermal_probe()
126 stdev, &ops, NULL); in spear_thermal_probe()
141 stdev->thermal_base); in spear_thermal_probe()
148 clk_disable(stdev->clk); in spear_thermal_probe()
157 struct spear_thermal_dev *stdev = thermal_zone_device_priv(spear_thermal); in spear_thermal_exit() local
162 actual_mask = readl_relaxed(stdev->thermal_base); in spear_thermal_exit()
163 writel_relaxed(actual_mask & ~stdev->flags, stdev->thermal_base); in spear_thermal_exit()
165 clk_disable(stdev->clk); in spear_thermal_exit()