Commit 378e853f authored by Linus Torvalds's avatar Linus Torvalds

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"
parents f58c356e ca657468
...@@ -64,20 +64,6 @@ void compute_intercept_slope(struct tsens_priv *priv, u32 *p1, ...@@ -64,20 +64,6 @@ void compute_intercept_slope(struct tsens_priv *priv, u32 *p1,
} }
} }
bool is_sensor_enabled(struct tsens_priv *priv, u32 hw_id)
{
u32 val;
int ret;
if ((hw_id > (priv->num_sensors - 1)) || (hw_id < 0))
return -EINVAL;
ret = regmap_field_read(priv->rf[SENSOR_EN], &val);
if (ret)
return ret;
return val & (1 << hw_id);
}
static inline int code_to_degc(u32 adc_code, const struct tsens_sensor *s) static inline int code_to_degc(u32 adc_code, const struct tsens_sensor *s)
{ {
int degc, num, den; int degc, num, den;
......
...@@ -334,7 +334,6 @@ static const struct reg_field tsens_v0_1_regfields[MAX_REGFIELDS] = { ...@@ -334,7 +334,6 @@ static const struct reg_field tsens_v0_1_regfields[MAX_REGFIELDS] = {
/* CTRL_OFFSET */ /* CTRL_OFFSET */
[TSENS_EN] = REG_FIELD(SROT_CTRL_OFF, 0, 0), [TSENS_EN] = REG_FIELD(SROT_CTRL_OFF, 0, 0),
[TSENS_SW_RST] = REG_FIELD(SROT_CTRL_OFF, 1, 1), [TSENS_SW_RST] = REG_FIELD(SROT_CTRL_OFF, 1, 1),
[SENSOR_EN] = REG_FIELD(SROT_CTRL_OFF, 3, 13),
/* ----- TM ------ */ /* ----- TM ------ */
/* INTERRUPT ENABLE */ /* INTERRUPT ENABLE */
......
...@@ -44,7 +44,6 @@ static const struct reg_field tsens_v2_regfields[MAX_REGFIELDS] = { ...@@ -44,7 +44,6 @@ static const struct reg_field tsens_v2_regfields[MAX_REGFIELDS] = {
/* CTRL_OFF */ /* CTRL_OFF */
[TSENS_EN] = REG_FIELD(SROT_CTRL_OFF, 0, 0), [TSENS_EN] = REG_FIELD(SROT_CTRL_OFF, 0, 0),
[TSENS_SW_RST] = REG_FIELD(SROT_CTRL_OFF, 1, 1), [TSENS_SW_RST] = REG_FIELD(SROT_CTRL_OFF, 1, 1),
[SENSOR_EN] = REG_FIELD(SROT_CTRL_OFF, 3, 18),
/* ----- TM ------ */ /* ----- TM ------ */
/* INTERRUPT ENABLE */ /* INTERRUPT ENABLE */
......
...@@ -85,11 +85,6 @@ static int tsens_register(struct tsens_priv *priv) ...@@ -85,11 +85,6 @@ static int tsens_register(struct tsens_priv *priv)
struct thermal_zone_device *tzd; struct thermal_zone_device *tzd;
for (i = 0; i < priv->num_sensors; i++) { for (i = 0; i < priv->num_sensors; i++) {
if (!is_sensor_enabled(priv, priv->sensor[i].hw_id)) {
dev_err(priv->dev, "sensor %d: disabled\n",
priv->sensor[i].hw_id);
continue;
}
priv->sensor[i].priv = priv; priv->sensor[i].priv = priv;
priv->sensor[i].id = i; priv->sensor[i].id = i;
tzd = devm_thermal_zone_of_sensor_register(priv->dev, i, tzd = devm_thermal_zone_of_sensor_register(priv->dev, i,
......
...@@ -315,7 +315,6 @@ void compute_intercept_slope(struct tsens_priv *priv, u32 *pt1, u32 *pt2, u32 mo ...@@ -315,7 +315,6 @@ void compute_intercept_slope(struct tsens_priv *priv, u32 *pt1, u32 *pt2, u32 mo
int init_common(struct tsens_priv *priv); int init_common(struct tsens_priv *priv);
int get_temp_tsens_valid(struct tsens_priv *priv, int i, int *temp); int get_temp_tsens_valid(struct tsens_priv *priv, int i, int *temp);
int get_temp_common(struct tsens_priv *priv, int i, int *temp); int get_temp_common(struct tsens_priv *priv, int i, int *temp);
bool is_sensor_enabled(struct tsens_priv *priv, u32 hw_id);
/* TSENS target */ /* TSENS target */
extern const struct tsens_plat_data data_8960; extern const struct tsens_plat_data data_8960;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment