Lines Matching +full:adc +full:- +full:tm
1 // SPDX-License-Identifier: GPL-2.0
41 #define S5_STATUS_OFF 0x3664 /* Sensors 5-10 found on apq8064/msm8960 */
48 /* Original slope - 350 to compensate mC to C inaccuracy */
59 struct regmap *map = priv->tm_map; in suspend_8960()
61 ret = regmap_read(map, THRESHOLD_ADDR, &priv->ctx.threshold); in suspend_8960()
65 ret = regmap_read(map, CNTL_ADDR, &priv->ctx.control); in suspend_8960()
69 if (priv->num_sensors > 1) in suspend_8960()
84 struct regmap *map = priv->tm_map; in resume_8960()
94 if (priv->num_sensors > 1) { in resume_8960()
100 ret = regmap_write(map, THRESHOLD_ADDR, priv->ctx.threshold); in resume_8960()
104 ret = regmap_write(map, CNTL_ADDR, priv->ctx.control); in resume_8960()
116 ret = regmap_read(priv->tm_map, CNTL_ADDR, ®); in enable_8960()
123 * (Sensor 6-7 disabled, Sensor 3 disabled...) In the original driver, in enable_8960()
136 ret = regmap_write(priv->tm_map, CNTL_ADDR, reg | SW_RST); in enable_8960()
142 if (priv->num_sensors > 1) in enable_8960()
147 ret = regmap_write(priv->tm_map, CNTL_ADDR, reg); in enable_8960()
160 mask = GENMASK(priv->num_sensors - 1, 0); in disable_8960()
164 ret = regmap_read(priv->tm_map, CNTL_ADDR, ®_cntl); in disable_8960()
170 if (priv->num_sensors > 1) in disable_8960()
175 regmap_write(priv->tm_map, CNTL_ADDR, reg_cntl); in disable_8960()
184 data = qfprom_read(priv->dev, "calib"); in calibrate_8960()
186 data = qfprom_read(priv->dev, "calib_backup"); in calibrate_8960()
190 for (i = 0; i < priv->num_sensors; i++) { in calibrate_8960()
192 priv->sensor[i].slope = tsens_msm8960_slope[i]; in calibrate_8960()
203 /* ----- SROT ------ */
212 /* ----- TM ------ */
221 * MIN_THRESH_0 -> CRIT_THRESH_1
222 * MAX_THRESH_0 -> CRIT_THRESH_0
273 .adc = 1,
276 .trip_min_temp = -40000,