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()
61 struct spear_thermal_dev *stdev = spear_thermal->devdata; in spear_thermal_suspend() local
65 actual_mask = readl_relaxed(stdev->thermal_base); in spear_thermal_suspend()
66 writel_relaxed(actual_mask & ~stdev->flags, stdev->thermal_base); in spear_thermal_suspend()
68 clk_disable(stdev->clk); in spear_thermal_suspend()
78 struct spear_thermal_dev *stdev = spear_thermal->devdata; in spear_thermal_resume() local
82 ret = clk_enable(stdev->clk); in spear_thermal_resume()
89 actual_mask = readl_relaxed(stdev->thermal_base); in spear_thermal_resume()
90 writel_relaxed(actual_mask | stdev->flags, stdev->thermal_base); in spear_thermal_resume()
103 struct spear_thermal_dev *stdev; in spear_thermal_probe() local
113 stdev = devm_kzalloc(&pdev->dev, sizeof(*stdev), GFP_KERNEL); in spear_thermal_probe()
114 if (!stdev) in spear_thermal_probe()
119 stdev->thermal_base = devm_ioremap_resource(&pdev->dev, res); in spear_thermal_probe()
120 if (IS_ERR(stdev->thermal_base)) in spear_thermal_probe()
121 return PTR_ERR(stdev->thermal_base); in spear_thermal_probe()
123 stdev->clk = devm_clk_get(&pdev->dev, NULL); in spear_thermal_probe()
124 if (IS_ERR(stdev->clk)) { in spear_thermal_probe()
126 return PTR_ERR(stdev->clk); in spear_thermal_probe()
129 ret = clk_enable(stdev->clk); in spear_thermal_probe()
135 stdev->flags = val; in spear_thermal_probe()
136 writel_relaxed(stdev->flags, stdev->thermal_base); in spear_thermal_probe()
139 stdev, &ops, NULL, 0, 0); in spear_thermal_probe()
149 stdev->thermal_base); in spear_thermal_probe()
154 clk_disable(stdev->clk); in spear_thermal_probe()
163 struct spear_thermal_dev *stdev = spear_thermal->devdata; in spear_thermal_exit() local
168 actual_mask = readl_relaxed(stdev->thermal_base); in spear_thermal_exit()
169 writel_relaxed(actual_mask & ~stdev->flags, stdev->thermal_base); in spear_thermal_exit()
171 clk_disable(stdev->clk); in spear_thermal_exit()