2
0
mirror of https://github.com/lm-sensors/lm-sensors synced 2025-08-31 06:15:15 +00:00

Increase max bank (or logical device) number from 15 to 31, as 20 was seen

in some chips (PC87427.)


git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@4151 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
Jean Delvare
2006-09-06 15:51:26 +00:00
parent 4fc66ff5b0
commit e5d21141d6
2 changed files with 4 additions and 4 deletions

View File

@@ -53,7 +53,7 @@ register at 0x2F.
.PP
The \fIbank\fR and \fIbankreg\fR parameters are useful on the Winbond chips
as well as on Super-I/O chips.
\fIbank\fR is an integer between 0 and 15, and \fIbankreg\fR is an integer
\fIbank\fR is an integer between 0 and 31, and \fIbankreg\fR is an integer
between 0x00 and 0xFF (default value: 0x4E for Winbond chips, 0x07
for Super-I/O chips). The W83781D datasheet has more information on bank
selection.
@@ -68,7 +68,7 @@ and the address is forcibly aligned on a 256-byte boundary.
.PP
The \fIbank\fR and \fIbankreg\fR parameters are useful on the National
Semiconductor PC87365 and PC87366 Super-I/O chips.
\fIbank\fR is an integer between 0 and 15, and \fIbankreg\fR is an integer
\fIbank\fR is an integer between 0 and 31, and \fIbankreg\fR is an integer
between 0x00 and 0xFF (default value: 0x09; must fit in the specified
range). See the PC87365 datasheet for more information on bank selection.

View File

@@ -200,8 +200,8 @@ int main(int argc, char *argv[])
help();
exit(1);
}
if ((bank < 0) || (bank > 15)) {
fprintf(stderr, "Error: bank out of range (0-15)!\n");
if ((bank < 0) || (bank > 31)) {
fprintf(stderr, "Error: bank out of range (0-31)!\n");
help();
exit(1);
}