public inbox for linux-hwmon@vger.kernel.org
 help / color / mirror / Atom feed
From: Guenter Roeck <linux@roeck-us.net>
To: "thilo.cestonaro@ts.fujitsu.com" <thilo.cestonaro@ts.fujitsu.com>,
	"linux-hwmon@vger.kernel.org" <linux-hwmon@vger.kernel.org>
Subject: Re: [PATCH] added kernel module for FTS sensor chip "Teutates"
Date: Tue, 7 Jun 2016 06:30:35 -0700	[thread overview]
Message-ID: <5756CC7B.70501@roeck-us.net> (raw)
In-Reply-To: <1465284992.18490.4.camel@ts.fujitsu.com>

On 06/07/2016 12:39 AM, thilo.cestonaro@ts.fujitsu.com wrote:
> On Mo, 2016-06-06 at 20:18 -0700, Guenter Roeck wrote:
>> On 06/06/2016 02:21 AM, thilo.cestonaro@ts.fujitsu.com wrote:
>>>
>>> Hey Guenter!
>>>
>>> Thanks for your patience and very detailed review!
>>> I will change the code to address all you hints where no discussion is needed.
>>> The others follow down here.
>>>
>>> On Fr, 2016-06-03 at 22:51 -0700, Guenter Roeck wrote:
>>>>
>>>>>
>>>>> +#define FTSTEUTATES_WATCHDOG_RESOLUTION		   60
>>>>> +
>>>> 60 seconds (minimum) resolution ? Really ? This is very unusual.
>>> Will double check and talk to the hw guy.
> There is a register which sets the resolution to 1sec. but it wasn't documented :(.
> So next "version" will have 1sec. resolution.
>
Almost sounds like a common Super-IO watchdog. There is usually a register
to set the resolution (seconds or minutes) and another register to set the
value (0-255). Drivers then usually select minutes if the requested timeout
is larger than 255 seconds.

>
>>>>> +static ssize_t show_fan_fault(struct device *dev,
>>>>> +	struct device_attribute *devattr, char *buf)
>>>>> +{
>>>>> +	int index = to_sensor_dev_attr(devattr)->index;
>>>>> +	struct ftsteutates_data *data = ftsteutates_update_device(dev);
>>>>> +
>>>>> +	return sprintf(buf, "%d\n", data->fan_present[index] == 1 ? 0 : 1);
>>>> A non-present fan does not indicate a fan fault.
>>> For me a fan fault was a not existing fan, as the alarm is handled via fan_alarm.
>>> What is the understanding of fan_fault and fan_alarm?
>>>
>> Some fan controllers can detect if a fan is faulty, for example if it consumes
>> power but does not turn. Unless you know for sure that a fan is faulty, don't
>> report that it is. A non-existing fan is definitely not faulty.
> About the presence register from Teutates Spec:
> The present-detection is done by checking the Fan-Speed.
> If the fan-speed is 0 or below fan-fault-speed all the time,
> the fan will be handled as not present. If the fan-speed is
> greater than fan-fault-speed, the fan is handled as present.
>
> So the presence is the faulty fan detection?
>

It pretty much means that you can not use the presence detect flag to indicate
a fan fault. I would suggest to just drop the flag.

Thanks,
Guenter


  reply	other threads:[~2016-06-07 13:30 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-31  8:55 [PATCH] added kernel module for FTS sensor chip "Teutates" Thilo Cestonaro
2016-06-04  5:51 ` Guenter Roeck
2016-06-06  9:21   ` thilo.cestonaro
2016-06-07  3:18     ` Guenter Roeck
2016-06-07  7:39       ` thilo.cestonaro
2016-06-07 13:30         ` Guenter Roeck [this message]
2016-06-09  9:13   ` thilo.cestonaro
2016-06-09 13:25     ` Guenter Roeck

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5756CC7B.70501@roeck-us.net \
    --to=linux@roeck-us.net \
    --cc=linux-hwmon@vger.kernel.org \
    --cc=thilo.cestonaro@ts.fujitsu.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox