/* Resets the historical measurements of minimum and maximum temperatures. This is done by writing any value to any of the minimum/maximum registers (0x30-0x37).  */
static ssize_t reset_temp_history(struct device *dev, struct device_attribute *devattr, const char *buf, size_t count)
/* Resets the historical measurements of minimum and maximum temperatures. This is done by writing any value to any of the minimum/maximum registers (0x30-0x37).  */
static ssize_t reset_temp_history(struct device *dev, struct device_attribute *devattr, const char *buf, size_t count)
{
	long val;
	if (strict_strtol(buf, 10, &val))
		return -EINVAL;
	if (val != 1) {
		dev_err(dev, "temp_reset_history value %ld not"
			" supported. Use 1 to reset the history!\n", val);
		return -EINVAL;
	}
	i2c_smbus_write_byte_data(to_i2c_client(dev),
		TMP411_TEMP_LOWEST_MSB[0], val);
	return count;
}