/* fan_watchdog (driver): fan watchdog interval in seconds, 0 disables (default), max 120  */
static ssize_t fan_pwm1_enable_show(struct device *dev, struct device_attribute *attr, char *buf)
/* fan_watchdog (driver): fan watchdog interval in seconds, 0 disables (default), max 120  */
static ssize_t fan_pwm1_enable_show(struct device *dev, struct device_attribute *attr, char *buf)
{
	int res, mode;
	u8 status;
	res = fan_get_status_safe(&status);
	if (res)
		return res;
	if (status & TP_EC_FAN_FULLSPEED) {
		mode = 0;
	} else if (status & TP_EC_FAN_AUTO) {
		mode = 2;
	} else
		mode = 1;
	return snprintf(buf, PAGE_SIZE, "%d\n", mode);
}