Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/evalenti/linux-soc-thermal

Pull thermal SoC fix from Eduardo Valentin:
"A single revert, detected to cause issues on the tsens driver"

* 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/evalenti/linux-soc-thermal:
Revert "drivers: thermal: tsens: Add new operation to check if a sensor is enabled"

-22
-14
drivers/thermal/qcom/tsens-common.c
··· 64 64 } 65 65 } 66 66 67 - bool is_sensor_enabled(struct tsens_priv *priv, u32 hw_id) 68 - { 69 - u32 val; 70 - int ret; 71 - 72 - if ((hw_id > (priv->num_sensors - 1)) || (hw_id < 0)) 73 - return -EINVAL; 74 - ret = regmap_field_read(priv->rf[SENSOR_EN], &val); 75 - if (ret) 76 - return ret; 77 - 78 - return val & (1 << hw_id); 79 - } 80 - 81 67 static inline int code_to_degc(u32 adc_code, const struct tsens_sensor *s) 82 68 { 83 69 int degc, num, den;
-1
drivers/thermal/qcom/tsens-v0_1.c
··· 334 334 /* CTRL_OFFSET */ 335 335 [TSENS_EN] = REG_FIELD(SROT_CTRL_OFF, 0, 0), 336 336 [TSENS_SW_RST] = REG_FIELD(SROT_CTRL_OFF, 1, 1), 337 - [SENSOR_EN] = REG_FIELD(SROT_CTRL_OFF, 3, 13), 338 337 339 338 /* ----- TM ------ */ 340 339 /* INTERRUPT ENABLE */
-1
drivers/thermal/qcom/tsens-v2.c
··· 44 44 /* CTRL_OFF */ 45 45 [TSENS_EN] = REG_FIELD(SROT_CTRL_OFF, 0, 0), 46 46 [TSENS_SW_RST] = REG_FIELD(SROT_CTRL_OFF, 1, 1), 47 - [SENSOR_EN] = REG_FIELD(SROT_CTRL_OFF, 3, 18), 48 47 49 48 /* ----- TM ------ */ 50 49 /* INTERRUPT ENABLE */
-5
drivers/thermal/qcom/tsens.c
··· 85 85 struct thermal_zone_device *tzd; 86 86 87 87 for (i = 0; i < priv->num_sensors; i++) { 88 - if (!is_sensor_enabled(priv, priv->sensor[i].hw_id)) { 89 - dev_err(priv->dev, "sensor %d: disabled\n", 90 - priv->sensor[i].hw_id); 91 - continue; 92 - } 93 88 priv->sensor[i].priv = priv; 94 89 priv->sensor[i].id = i; 95 90 tzd = devm_thermal_zone_of_sensor_register(priv->dev, i,
-1
drivers/thermal/qcom/tsens.h
··· 315 315 int init_common(struct tsens_priv *priv); 316 316 int get_temp_tsens_valid(struct tsens_priv *priv, int i, int *temp); 317 317 int get_temp_common(struct tsens_priv *priv, int i, int *temp); 318 - bool is_sensor_enabled(struct tsens_priv *priv, u32 hw_id); 319 318 320 319 /* TSENS target */ 321 320 extern const struct tsens_plat_data data_8960;