From: khali@linux-fr.org (Jean Delvare)
To: lm-sensors@vger.kernel.org
Subject: [lm-sensors] [PATCH] Add voltage support to W83627EHF
Date: Sat, 04 Mar 2006 16:57:23 +0000 [thread overview]
Message-ID: <20060304175723.d845d809.khali@linux-fr.org> (raw)
In-Reply-To: <4409700D.8010604@sh.cvut.cz>
Hi Rudolf,
> I'm attaching the userspace part this should work applying on the top of the
> latest version of lm-sensors.
My comments:
> + { SENSORS_W83627EHF_IN0_ALARM, "in0_alarm", NOMAP, NOMAP,
> + R, NOSYSCTL, VALUE(1), 0 },
Now that we have individual alarm files, it would make sense to express
their mapping with the corresponding input. That is, the first "NOMAP"
above should be "SENSORS_W83627EHF_IN0".
> +#define SENSORS_W83627EHF_IN0 1 /* R */
> (...)
> +#define SENSORS_W83627EHF_IN9_MAX 30 /* RW */
Please align the values with tabs, like I did for the rest of the
W83627EHF defines.
> + double cur, min, div, max, alarm;
If you want to give function scope to these variables, please do it
properly (i.e. also use them for temperature.)
> + if (!sensors_get_label_and_valid(*name,SENSORS_W83627EHF_IN0+i,&label,&valid) &&
> + !sensors_get_feature(*name,SENSORS_W83627EHF_IN0+i,&cur) &&
> + !sensors_get_feature(*name,SENSORS_W83627EHF_IN0_MIN+i,&min) &&
> + !sensors_get_feature(*name,SENSORS_W83627EHF_IN0_MAX+i,&max) &&
> + !sensors_get_feature(*name,SENSORS_W83627EHF_IN0_ALARM+i,&alarm)) {
> + if (valid) {
> + print_label(label,10);
> + printf("%+6.2f V (min = %+6.2f V, max = %+6.2f V) %s\n",
> + cur,min,max,alarm ? "ALARM" : "");
> + }
> + } else
> + printf("ERROR: Can't get IN%d data!\n",i+1);
> + free(label);
> + }
Coding style, please! I know that sensors' coding style is quite bad,
but let's not make it worse. Just follow the coding style I used for
the rest of the function, so that we have some kind of local
homogeneity.
> - double cur, min, div;
> +
No blank line here please.
> # Winbond W83627EHF configuration originally contributed by Leon Moonen
> # This is for an Asus P5P800.
> chip "w83627ehf-*"
This will need some rewording as you have a different board so the
voltage part may not match the P5P800 at all.
> + label in0 "VCore"
> + label in1 "VIN0"
> + label in2 "AVCC"
> + label in3 "3VCC"
> + label in4 "VIN1"
> + label in5 "VIN2"
> + label in6 "VIN3"
> + label in7 "VSB"
> + label in8 "VBAT"
> + label in9 "VIN4"
The VIN[0-4] labels are not helping much, and may in fact add to
confusion, as they don't match our in0-9 numbering.
> +# +12V is in1 and +5V is in6 as recommended by datasheet
> + compute in1 @*(1+(56/10)), @/(1+(56/10))
> + compute in6 @*(1+(22/10)), @/(1+(22/10))
Just label them that way then.
> - set fan1_min 1200
> - set fan2_min 1700
> + set fan1_min 1200
> + set fan2_min 1700
No whitespace changes please.
> + label temp3 "AUX Temp"
s/AUX/Aux/ for consistency.
> - set temp1_over 45
> - set temp1_hyst 40
> - set temp2_over 45
> - set temp2_hyst 40
> +# set temp1_over 45
> +# set temp1_hyst 40
> +# set temp2_over 45
> +# set temp2_hyst 40
Yes you're right, we should preserve the BIOS settings by default.
Thanks,
--
Jean Delvare
next prev parent reply other threads:[~2006-03-04 16:57 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-03-04 10:46 [lm-sensors] [PATCH] Add voltage support to W83627EHF Rudolf Marek
2006-03-04 12:41 ` Rudolf Marek
2006-03-04 15:04 ` Jean Delvare
2006-03-04 16:57 ` Jean Delvare [this message]
2006-03-07 20:02 ` Rudolf Marek
2006-03-07 20:03 ` Rudolf Marek
2006-03-08 12:58 ` Jean Delvare
2006-03-08 13:13 ` Jean Delvare
2006-03-08 16:48 ` David Hubbard
2006-03-09 16:09 ` Greg KH
2006-03-09 20:21 ` Jean Delvare
2006-03-09 23:54 ` Greg KH
2006-03-23 22:08 ` Rudolf Marek
2006-03-23 23:09 ` David Hubbard
2006-03-24 4:04 ` David Hubbard
2006-03-24 6:01 ` David Hubbard
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=20060304175723.d845d809.khali@linux-fr.org \
--to=khali@linux-fr.org \
--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.