From: Hans de Goede <hdegoede@redhat.com>
To: lm-sensors@vger.kernel.org
Subject: Re: [lm-sensors] PATCH: hwmon-new-driver-ti-tmp401.patch
Date: Thu, 23 Oct 2008 20:13:17 +0000 [thread overview]
Message-ID: <4900DADD.1080308@redhat.com> (raw)
In-Reply-To: <4853E081.1020109@hhs.nl>
Jean Delvare wrote:
> Hi Hans,
>
> On Sat, 14 Jun 2008 17:15:13 +0200, Hans de Goede wrote:
>> This is a new hwmon driver for TI's TMP401 temperature sensor IC. This driver
>> was written on behalf of an embedded systems vendor under the
>> linuxdriverproject.
>>
>> It has been tested using a TI TMP401 sample attached to a i2c-tiny-usb adapter.
>> Which was provided by Till Harbaum, many thanks to him for this!
>>
>> Signed-off-by: Hans de Goede <j.w.r.degoede@hhs.nl>
>
> Review:
>
Sorry for the slow response and thanks for the review, I now have a local
version ready with all issues fixed except for one:
<snip>
>> +static struct sensor_device_attribute tmp401_attr[] = {
>> + SENSOR_ATTR(temp1_input, 0444, show_temp_value, NULL, 0),
>> + SENSOR_ATTR(temp1_min, 0644, show_temp_min, store_temp_min, 0),
>> + SENSOR_ATTR(temp1_max, 0644, show_temp_max, store_temp_max, 0),
>> + SENSOR_ATTR(temp1_crit, 0644, show_temp_crit, store_temp_crit, 0),
>> + SENSOR_ATTR(temp1_crit_hyst, 0644, show_temp_crit_hyst,
>> + store_temp_crit_hyst, 0),
>> + SENSOR_ATTR(temp1_min_alarm, 0444, show_status, NULL,
>> + TMP401_STATUS_LOCAL_LOW_MASK),
>> + SENSOR_ATTR(temp1_max_alarm, 0444, show_status, NULL,
>> + TMP401_STATUS_LOCAL_HIGH_MASK),
>> + SENSOR_ATTR(temp1_crit_alarm, 0444, show_status, NULL,
>> + TMP401_STATUS_LOCAL_CRIT_MASK),
>> + SENSOR_ATTR(temp2_input, 0444, show_temp_value, NULL, 1),
>> + SENSOR_ATTR(temp2_min, 0644, show_temp_min, store_temp_min, 1),
>> + SENSOR_ATTR(temp2_max, 0644, show_temp_max, store_temp_max, 1),
>> + SENSOR_ATTR(temp2_crit, 0644, show_temp_crit, store_temp_crit, 1),
>> + SENSOR_ATTR(temp2_crit_hyst, 0444, show_temp_crit_hyst, NULL, 1),
>> + SENSOR_ATTR(temp2_fault, 0444, show_status, NULL,
>> + TMP401_STATUS_REMOTE_OPEN_MASK),
>> + SENSOR_ATTR(temp2_min_alarm, 0444, show_status, NULL,
>> + TMP401_STATUS_REMOTE_LOW_MASK),
>> + SENSOR_ATTR(temp2_max_alarm, 0444, show_status, NULL,
>> + TMP401_STATUS_REMOTE_HIGH_MASK),
>> + SENSOR_ATTR(temp2_crit_alarm, 0444, show_status, NULL,
>> + TMP401_STATUS_REMOTE_CRIT_MASK),
>> +};
>
> At page 11, in section "STATUS REGISTER", the datasheet suggests that
> the hysteresis value also applies to the local and remote high limits.
> Did you test that? If this is true then you should add files
> temp1_max_hyst and temp2_max_hyst (read-only.)
>
This only is true if the AL/TH bit in the config register is 1. I choose to
ignore this non default mode for now. I think it indeed makes sense to
conditionally add temp1_max_hyst and temp2_max_hyst (read-only) when this is
the case, but I'm not sure if its worth the additional code, what do you think?
> As a side note, it seems to me that your driver also supports the TI
> TMP411 chip. Both chips seem to be essentially compatible.
They are I've ordered a few samples and adding support for this chip is on my
to do list.
Regards,
Hans
_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
next prev parent reply other threads:[~2008-10-23 20:13 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-14 15:15 [lm-sensors] PATCH: hwmon-new-driver-ti-tmp401.patch Hans de Goede
2008-06-15 18:23 ` Ben Dooks
2008-06-15 19:17 ` Jean Delvare
2008-08-20 11:20 ` Jean Delvare
2008-08-20 15:41 ` Jean Delvare
2008-08-22 18:04 ` Jean Delvare
2008-08-22 18:19 ` Hans de Goede
2008-10-23 20:13 ` Hans de Goede [this message]
2008-10-24 8:46 ` Jean Delvare
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=4900DADD.1080308@redhat.com \
--to=hdegoede@redhat.com \
--cc=lm-sensors@vger.kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.