Lines Matching refs:stdev
43 struct spear_thermal_dev *stdev = thermal->devdata; in thermal_get_temp() local
49 *temp = (readl_relaxed(stdev->thermal_base) & 0x7F) * MD_FACTOR; in thermal_get_temp()
62 struct spear_thermal_dev *stdev = spear_thermal->devdata; in spear_thermal_suspend() local
66 actual_mask = readl_relaxed(stdev->thermal_base); in spear_thermal_suspend()
67 writel_relaxed(actual_mask & ~stdev->flags, stdev->thermal_base); in spear_thermal_suspend()
69 clk_disable(stdev->clk); in spear_thermal_suspend()
79 struct spear_thermal_dev *stdev = spear_thermal->devdata; in spear_thermal_resume() local
83 ret = clk_enable(stdev->clk); in spear_thermal_resume()
90 actual_mask = readl_relaxed(stdev->thermal_base); in spear_thermal_resume()
91 writel_relaxed(actual_mask | stdev->flags, stdev->thermal_base); in spear_thermal_resume()
105 struct spear_thermal_dev *stdev; in spear_thermal_probe() local
115 stdev = devm_kzalloc(&pdev->dev, sizeof(*stdev), GFP_KERNEL); in spear_thermal_probe()
116 if (!stdev) in spear_thermal_probe()
121 stdev->thermal_base = devm_ioremap_resource(&pdev->dev, res); in spear_thermal_probe()
122 if (IS_ERR(stdev->thermal_base)) in spear_thermal_probe()
123 return PTR_ERR(stdev->thermal_base); in spear_thermal_probe()
125 stdev->clk = devm_clk_get(&pdev->dev, NULL); in spear_thermal_probe()
126 if (IS_ERR(stdev->clk)) { in spear_thermal_probe()
128 return PTR_ERR(stdev->clk); in spear_thermal_probe()
131 ret = clk_enable(stdev->clk); in spear_thermal_probe()
137 stdev->flags = val; in spear_thermal_probe()
138 writel_relaxed(stdev->flags, stdev->thermal_base); in spear_thermal_probe()
141 stdev, &ops, NULL, 0, 0); in spear_thermal_probe()
151 stdev->thermal_base); in spear_thermal_probe()
156 clk_disable(stdev->clk); in spear_thermal_probe()
165 struct spear_thermal_dev *stdev = spear_thermal->devdata; in spear_thermal_exit() local
170 actual_mask = readl_relaxed(stdev->thermal_base); in spear_thermal_exit()
171 writel_relaxed(actual_mask & ~stdev->flags, stdev->thermal_base); in spear_thermal_exit()
173 clk_disable(stdev->clk); in spear_thermal_exit()