Skip to content

Commit

Permalink
hwmon: (f71882fg) Add support for the F71889A
Browse files Browse the repository at this point in the history
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Guenter Roeck <guenter.roeck@ericsson.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
  • Loading branch information
Hans de Goede authored and Jean Delvare committed Mar 26, 2011
1 parent 383586b commit a66c108
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 2 deletions.
4 changes: 4 additions & 0 deletions Documentation/hwmon/f71882fg
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ Supported chips:
Prefix: 'f71889ed'
Addresses scanned: none, address read from Super I/O config space
Datasheet: Should become available on the Fintek website soon
* Fintek F71889A
Prefix: 'f71889a'
Addresses scanned: none, address read from Super I/O config space
Datasheet: Should become available on the Fintek website soon
* Fintek F8000
Prefix: 'f8000'
Addresses scanned: none, address read from Super I/O config space
Expand Down
2 changes: 1 addition & 1 deletion drivers/hwmon/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ config SENSORS_F71882FG
F71869F/E
F71882FG
F71883FG
F71889FG/ED
F71889FG/ED/A
F8000
F81801U
F81865F
Expand Down
14 changes: 13 additions & 1 deletion drivers/hwmon/f71882fg.c
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@
#define SIO_F71882_ID 0x0541 /* Chipset ID */
#define SIO_F71889_ID 0x0723 /* Chipset ID */
#define SIO_F71889E_ID 0x0909 /* Chipset ID */
#define SIO_F71889A_ID 0x1005 /* Chipset ID */
#define SIO_F8000_ID 0x0581 /* Chipset ID */
#define SIO_F81865_ID 0x0704 /* Chipset ID */

Expand Down Expand Up @@ -107,7 +108,7 @@ module_param(force_id, ushort, 0);
MODULE_PARM_DESC(force_id, "Override the detected device ID");

enum chips { f71808e, f71858fg, f71862fg, f71869, f71882fg, f71889fg,
f71889ed, f8000, f81865f };
f71889ed, f71889a, f8000, f81865f };

static const char *f71882fg_names[] = {
"f71808e",
Expand All @@ -117,6 +118,7 @@ static const char *f71882fg_names[] = {
"f71882fg",
"f71889fg", /* f81801u too, same id */
"f71889ed",
"f71889a",
"f8000",
"f81865f",
};
Expand All @@ -129,6 +131,7 @@ static const char f71882fg_has_in[][F71882FG_MAX_INS] = {
[f71882fg] = { 1, 1, 1, 1, 1, 1, 1, 1, 1 },
[f71889fg] = { 1, 1, 1, 1, 1, 1, 1, 1, 1 },
[f71889ed] = { 1, 1, 1, 1, 1, 1, 1, 1, 1 },
[f71889a] = { 1, 1, 1, 1, 1, 1, 1, 1, 1 },
[f8000] = { 1, 1, 1, 0, 0, 0, 0, 0, 0 },
[f81865f] = { 1, 1, 1, 1, 1, 1, 1, 0, 0 },
};
Expand All @@ -141,6 +144,7 @@ static const char f71882fg_has_in1_alarm[] = {
[f71882fg] = 1,
[f71889fg] = 1,
[f71889ed] = 1,
[f71889a] = 1,
[f8000] = 0,
[f81865f] = 1,
};
Expand All @@ -153,6 +157,7 @@ static const char f71882fg_has_beep[] = {
[f71882fg] = 1,
[f71889fg] = 1,
[f71889ed] = 1,
[f71889a] = 1,
[f8000] = 0,
[f81865f] = 1,
};
Expand All @@ -165,6 +170,7 @@ static const char f71882fg_nr_fans[] = {
[f71882fg] = 4,
[f71889fg] = 3,
[f71889ed] = 3,
[f71889a] = 3,
[f8000] = 3,
[f81865f] = 2,
};
Expand All @@ -177,6 +183,7 @@ static const char f71882fg_nr_temps[] = {
[f71882fg] = 3,
[f71889fg] = 3,
[f71889ed] = 3,
[f71889a] = 3,
[f8000] = 3,
[f81865f] = 2,
};
Expand Down Expand Up @@ -2168,6 +2175,7 @@ static int __devinit f71882fg_probe(struct platform_device *pdev)
/* Fall through to select correct fan/pwm reg bank! */
case f71889fg:
case f71889ed:
case f71889a:
reg = f71882fg_read8(data, F71882FG_REG_FAN_FAULT_T);
if (reg & F71882FG_FAN_NEG_TEMP_EN)
data->auto_point_temp_signed = 1;
Expand Down Expand Up @@ -2225,6 +2233,7 @@ static int __devinit f71882fg_probe(struct platform_device *pdev)
case f71869:
case f71889fg:
case f71889ed:
case f71889a:
for (i = 0; i < nr_fans; i++) {
data->pwm_auto_point_mapping[i] =
f71882fg_read8(data,
Expand Down Expand Up @@ -2433,6 +2442,9 @@ static int __init f71882fg_find(int sioaddr, unsigned short *address,
case SIO_F71889E_ID:
sio_data->type = f71889ed;
break;
case SIO_F71889A_ID:
sio_data->type = f71889a;
break;
case SIO_F8000_ID:
sio_data->type = f8000;
break;
Expand Down

0 comments on commit a66c108

Please sign in to comment.