Lines Matching full:temp

94 	int temp;  member
166 "I2C read failed (temp H). ret: %x\n", integer1); in stts751_update_temp()
173 "I2C read failed (temp L). ret: %x\n", frac); in stts751_update_temp()
180 "I2C 2nd read failed (temp H). ret: %x\n", integer2); in stts751_update_temp()
189 "I2C 2nd read failed (temp L). ret: %x\n", in stts751_update_temp()
195 priv->temp = stts751_to_deg((integer1 << 8) | frac); in stts751_update_temp()
199 static int stts751_set_temp_reg16(struct stts751_priv *priv, int temp, in stts751_set_temp_reg16() argument
205 hwval = stts751_to_hw(temp); in stts751_set_temp_reg16()
214 static int stts751_set_temp_reg8(struct stts751_priv *priv, int temp, u8 reg) in stts751_set_temp_reg8() argument
218 hwval = stts751_to_hw(temp); in stts751_set_temp_reg8()
222 static int stts751_read_reg16(struct stts751_priv *priv, int *temp, in stts751_read_reg16() argument
235 *temp = stts751_to_deg((integer << 8) | frac); in stts751_read_reg16()
240 static int stts751_read_reg8(struct stts751_priv *priv, int *temp, u8 reg) in stts751_read_reg8() argument
248 *temp = stts751_to_deg(integer << 8); in stts751_read_reg8()
421 return sysfs_emit(buf, "%d\n", priv->temp); in input_show()
436 long temp; in therm_store() local
439 if (kstrtol(buf, 10, &temp) < 0) in therm_store()
443 temp = clamp_val(temp, -64000, 127937); in therm_store()
445 ret = stts751_set_temp_reg8(priv, temp, STTS751_REG_TLIM); in therm_store()
449 dev_dbg(&priv->client->dev, "setting therm %ld", temp); in therm_store()
455 priv->hyst = temp - (priv->therm - priv->hyst); in therm_store()
456 priv->therm = temp; in therm_store()
478 long temp; in hyst_store() local
482 if (kstrtol(buf, 10, &temp) < 0) in hyst_store()
487 temp = clamp_val(temp, -64000, priv->therm); in hyst_store()
488 priv->hyst = temp; in hyst_store()
489 dev_dbg(&priv->client->dev, "setting hyst %ld", temp); in hyst_store()
490 temp = priv->therm - temp; in hyst_store()
491 ret = stts751_set_temp_reg8(priv, temp, STTS751_REG_HYST); in hyst_store()
526 long temp; in max_store() local
529 if (kstrtol(buf, 10, &temp) < 0) in max_store()
534 temp = clamp_val(temp, priv->event_min, 127937); in max_store()
535 ret = stts751_set_temp_reg16(priv, temp, in max_store()
540 dev_dbg(&priv->client->dev, "setting event max %ld", temp); in max_store()
541 priv->event_max = temp; in max_store()
560 long temp; in min_store() local
563 if (kstrtol(buf, 10, &temp) < 0) in min_store()
568 temp = clamp_val(temp, -64000, priv->event_max); in min_store()
569 ret = stts751_set_temp_reg16(priv, temp, in min_store()
574 dev_dbg(&priv->client->dev, "setting event min %ld", temp); in min_store()
575 priv->event_min = temp; in min_store()