Lines Matching refs:hwmon
29 static void s5_temp_enable(struct s5_hwmon *hwmon) in s5_temp_enable() argument
31 u32 val = readl(hwmon->base + TEMP_CFG); in s5_temp_enable()
32 u32 clk = clk_get_rate(hwmon->clk) / USEC_PER_SEC; in s5_temp_enable()
38 writel(val, hwmon->base + TEMP_CFG); in s5_temp_enable()
44 struct s5_hwmon *hwmon = dev_get_drvdata(dev); in s5_read() local
50 stat = readl_relaxed(hwmon->base + TEMP_STAT); in s5_read()
108 struct s5_hwmon *hwmon; in s5_temp_probe() local
110 hwmon = devm_kzalloc(&pdev->dev, sizeof(*hwmon), GFP_KERNEL); in s5_temp_probe()
111 if (!hwmon) in s5_temp_probe()
114 hwmon->base = devm_platform_ioremap_resource(pdev, 0); in s5_temp_probe()
115 if (IS_ERR(hwmon->base)) in s5_temp_probe()
116 return PTR_ERR(hwmon->base); in s5_temp_probe()
118 hwmon->clk = devm_clk_get_enabled(&pdev->dev, NULL); in s5_temp_probe()
119 if (IS_ERR(hwmon->clk)) in s5_temp_probe()
120 return PTR_ERR(hwmon->clk); in s5_temp_probe()
122 s5_temp_enable(hwmon); in s5_temp_probe()
126 hwmon, in s5_temp_probe()