Lines Matching refs:stdev
34 struct spear_thermal_dev *stdev = thermal->devdata; 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 = spear_thermal->devdata; 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 = spear_thermal->devdata; 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
102 stdev = devm_kzalloc(&pdev->dev, sizeof(*stdev), GFP_KERNEL); in spear_thermal_probe()
103 if (!stdev) in spear_thermal_probe()
108 stdev->thermal_base = devm_ioremap_resource(&pdev->dev, res); in spear_thermal_probe()
109 if (IS_ERR(stdev->thermal_base)) in spear_thermal_probe()
110 return PTR_ERR(stdev->thermal_base); in spear_thermal_probe()
112 stdev->clk = devm_clk_get(&pdev->dev, NULL); in spear_thermal_probe()
113 if (IS_ERR(stdev->clk)) { in spear_thermal_probe()
115 return PTR_ERR(stdev->clk); in spear_thermal_probe()
118 ret = clk_enable(stdev->clk); in spear_thermal_probe()
124 stdev->flags = val; in spear_thermal_probe()
125 writel_relaxed(stdev->flags, stdev->thermal_base); in spear_thermal_probe()
128 stdev, &ops, NULL, 0, 0); in spear_thermal_probe()
143 stdev->thermal_base); in spear_thermal_probe()
150 clk_disable(stdev->clk); in spear_thermal_probe()
159 struct spear_thermal_dev *stdev = spear_thermal->devdata; in spear_thermal_exit() local
164 actual_mask = readl_relaxed(stdev->thermal_base); in spear_thermal_exit()
165 writel_relaxed(actual_mask & ~stdev->flags, stdev->thermal_base); in spear_thermal_exit()
167 clk_disable(stdev->clk); in spear_thermal_exit()