Home
last modified time | relevance | path

Searched refs:tmdev (Results 1 – 7 of 7) sorted by relevance

/Linux-v4.19/drivers/thermal/qcom/
Dtsens.c27 struct tsens_device *tmdev = s->tmdev; in tsens_get_temp() local
29 return tmdev->ops->get_temp(tmdev, s->id, temp); in tsens_get_temp()
35 struct tsens_device *tmdev = s->tmdev; in tsens_get_trend() local
37 if (tmdev->ops->get_trend) in tsens_get_trend()
38 return tmdev->ops->get_trend(tmdev, s->id, trend); in tsens_get_trend()
45 struct tsens_device *tmdev = dev_get_drvdata(dev); in tsens_suspend() local
47 if (tmdev->ops && tmdev->ops->suspend) in tsens_suspend()
48 return tmdev->ops->suspend(tmdev); in tsens_suspend()
55 struct tsens_device *tmdev = dev_get_drvdata(dev); in tsens_resume() local
57 if (tmdev->ops && tmdev->ops->resume) in tsens_resume()
[all …]
Dtsens-8960.c68 static int suspend_8960(struct tsens_device *tmdev) in suspend_8960() argument
72 struct regmap *map = tmdev->map; in suspend_8960()
74 ret = regmap_read(map, THRESHOLD_ADDR, &tmdev->ctx.threshold); in suspend_8960()
78 ret = regmap_read(map, CNTL_ADDR, &tmdev->ctx.control); in suspend_8960()
82 if (tmdev->num_sensors > 1) in suspend_8960()
94 static int resume_8960(struct tsens_device *tmdev) in resume_8960() argument
97 struct regmap *map = tmdev->map; in resume_8960()
107 if (tmdev->num_sensors > 1) { in resume_8960()
113 ret = regmap_write(map, THRESHOLD_ADDR, tmdev->ctx.threshold); in resume_8960()
117 ret = regmap_write(map, CNTL_ADDR, tmdev->ctx.control); in resume_8960()
[all …]
Dtsens-common.c54 void compute_intercept_slope(struct tsens_device *tmdev, u32 *p1, in compute_intercept_slope() argument
60 for (i = 0; i < tmdev->num_sensors; i++) { in compute_intercept_slope()
61 dev_dbg(tmdev->dev, in compute_intercept_slope()
65 tmdev->sensor[i].slope = SLOPE_DEFAULT; in compute_intercept_slope()
74 tmdev->sensor[i].slope = num / den; in compute_intercept_slope()
77 tmdev->sensor[i].offset = (p1[i] * SLOPE_FACTOR) - in compute_intercept_slope()
79 tmdev->sensor[i].slope); in compute_intercept_slope()
80 dev_dbg(tmdev->dev, "offset:%d\n", tmdev->sensor[i].offset); in compute_intercept_slope()
103 int get_temp_common(struct tsens_device *tmdev, int id, int *temp) in get_temp_common() argument
105 struct tsens_sensor *s = &tmdev->sensor[id]; in get_temp_common()
[all …]
Dtsens-8916.c51 static int calibrate_8916(struct tsens_device *tmdev) in calibrate_8916() argument
58 qfprom_cdata = (u32 *)qfprom_read(tmdev->dev, "calib"); in calibrate_8916()
62 qfprom_csel = (u32 *)qfprom_read(tmdev->dev, "calib_sel"); in calibrate_8916()
67 dev_dbg(tmdev->dev, "calibration mode is %d\n", mode); in calibrate_8916()
77 for (i = 0; i < tmdev->num_sensors; i++) in calibrate_8916()
87 for (i = 0; i < tmdev->num_sensors; i++) in calibrate_8916()
91 for (i = 0; i < tmdev->num_sensors; i++) { in calibrate_8916()
98 compute_intercept_slope(tmdev, p1, p2, mode); in calibrate_8916()
Dtsens-v2.c15 static int get_temp_tsens_v2(struct tsens_device *tmdev, int id, int *temp) in get_temp_tsens_v2() argument
17 struct tsens_sensor *s = &tmdev->sensor[id]; in get_temp_tsens_v2()
23 status_reg = tmdev->tm_offset + STATUS_OFFSET + s->hw_id * 4; in get_temp_tsens_v2()
24 ret = regmap_read(tmdev->map, status_reg, &code); in get_temp_tsens_v2()
32 ret = regmap_read(tmdev->map, status_reg, &code); in get_temp_tsens_v2()
43 ret = regmap_read(tmdev->map, status_reg, &code); in get_temp_tsens_v2()
Dtsens-8974.c103 static int calibrate_8974(struct tsens_device *tmdev) in calibrate_8974() argument
111 calib = (u32 *)qfprom_read(tmdev->dev, "calib"); in calibrate_8974()
115 bkp = (u32 *)qfprom_read(tmdev->dev, "calib_backup"); in calibrate_8974()
196 for (i = 0; i < tmdev->num_sensors; i++) in calibrate_8974()
200 for (i = 0; i < tmdev->num_sensors; i++) { in calibrate_8974()
207 for (i = 0; i < tmdev->num_sensors; i++) { in calibrate_8974()
214 for (i = 0; i < tmdev->num_sensors; i++) in calibrate_8974()
230 compute_intercept_slope(tmdev, p1, p2, mode); in calibrate_8974()
Dtsens.h25 struct tsens_device *tmdev; member