Lines Matching refs:temp
95 int temp;
167 "I2C read failed (temp H). ret: %x\n", integer1);
174 "I2C read failed (temp L). ret: %x\n", frac);
181 "I2C 2nd read failed (temp H). ret: %x\n", integer2);
190 "I2C 2nd read failed (temp L). ret: %x\n",
196 priv->temp = stts751_to_deg((integer1 << 8) | frac);
200 static int stts751_set_temp_reg16(struct stts751_priv *priv, int temp,
206 hwval = stts751_to_hw(temp);
215 static int stts751_set_temp_reg8(struct stts751_priv *priv, int temp, u8 reg)
219 hwval = stts751_to_hw(temp);
223 static int stts751_read_reg16(struct stts751_priv *priv, int *temp,
236 *temp = stts751_to_deg((integer << 8) | frac);
241 static int stts751_read_reg8(struct stts751_priv *priv, int *temp, u8 reg)
249 *temp = stts751_to_deg(integer << 8);
422 return sysfs_emit(buf, "%d\n", priv->temp);
437 long temp;
440 if (kstrtol(buf, 10, &temp) < 0)
444 temp = clamp_val(temp, -64000, 127937);
446 ret = stts751_set_temp_reg8(priv, temp, STTS751_REG_TLIM);
450 dev_dbg(&priv->client->dev, "setting therm %ld", temp);
456 priv->hyst = temp - (priv->therm - priv->hyst);
457 priv->therm = temp;
479 long temp;
483 if (kstrtol(buf, 10, &temp) < 0)
488 temp = clamp_val(temp, -64000, priv->therm);
489 priv->hyst = temp;
490 dev_dbg(&priv->client->dev, "setting hyst %ld", temp);
491 temp = priv->therm - temp;
492 ret = stts751_set_temp_reg8(priv, temp, STTS751_REG_HYST);
527 long temp;
530 if (kstrtol(buf, 10, &temp) < 0)
535 temp = clamp_val(temp, priv->event_min, 127937);
536 ret = stts751_set_temp_reg16(priv, temp,
541 dev_dbg(&priv->client->dev, "setting event max %ld", temp);
542 priv->event_max = temp;
561 long temp;
564 if (kstrtol(buf, 10, &temp) < 0)
569 temp = clamp_val(temp, -64000, priv->event_max);
570 ret = stts751_set_temp_reg16(priv, temp,
575 dev_dbg(&priv->client->dev, "setting event min %ld", temp);
576 priv->event_min = temp;