diff options
author | Jean Delvare <khali@linux-fr.org> | 2011-03-26 05:45:02 -0400 |
---|---|---|
committer | Jean Delvare <khali@endymion.delvare> | 2011-03-26 05:45:02 -0400 |
commit | 383586b12d89ba4297c49898645658cdb324b918 (patch) | |
tree | a2265dfa076c16b26b506e6142386f4768009623 | |
parent | 5d7f77bf66bfa986754b3e12073bef0ab8cd61bd (diff) |
hwmon: (f71882fg) Add support for the F81865F
Add support for the Fintek F81865F. It's essentially compatible with
the F71882FG, but has fewer inputs: 7 voltage, 2 temperature and 2 fan
inputs only.
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Guenter Roeck <guenter.roeck@ericsson.com>
-rw-r--r-- | Documentation/hwmon/f71882fg | 4 | ||||
-rw-r--r-- | drivers/hwmon/Kconfig | 1 | ||||
-rw-r--r-- | drivers/hwmon/f71882fg.c | 22 |
3 files changed, 19 insertions, 8 deletions
diff --git a/Documentation/hwmon/f71882fg b/Documentation/hwmon/f71882fg index ed2a7aa41de8..b802a224f728 100644 --- a/Documentation/hwmon/f71882fg +++ b/Documentation/hwmon/f71882fg | |||
@@ -41,6 +41,10 @@ Supported chips: | |||
41 | Note: This is the 64-pin variant of the F71889FG, they have the | 41 | Note: This is the 64-pin variant of the F71889FG, they have the |
42 | same device ID and are fully compatible as far as hardware | 42 | same device ID and are fully compatible as far as hardware |
43 | monitoring is concerned. | 43 | monitoring is concerned. |
44 | * Fintek F81865F | ||
45 | Prefix: 'f81865f' | ||
46 | Addresses scanned: none, address read from Super I/O config space | ||
47 | Datasheet: Available from the Fintek website | ||
44 | 48 | ||
45 | Author: Hans de Goede <hdegoede@redhat.com> | 49 | Author: Hans de Goede <hdegoede@redhat.com> |
46 | 50 | ||
diff --git a/drivers/hwmon/Kconfig b/drivers/hwmon/Kconfig index 51255b366d09..df9944bd47c4 100644 --- a/drivers/hwmon/Kconfig +++ b/drivers/hwmon/Kconfig | |||
@@ -330,6 +330,7 @@ config SENSORS_F71882FG | |||
330 | F71889FG/ED | 330 | F71889FG/ED |
331 | F8000 | 331 | F8000 |
332 | F81801U | 332 | F81801U |
333 | F81865F | ||
333 | 334 | ||
334 | This driver can also be built as a module. If so, the module | 335 | This driver can also be built as a module. If so, the module |
335 | will be called f71882fg. | 336 | will be called f71882fg. |
diff --git a/drivers/hwmon/f71882fg.c b/drivers/hwmon/f71882fg.c index 29879046fe53..aa8cf5d5c22e 100644 --- a/drivers/hwmon/f71882fg.c +++ b/drivers/hwmon/f71882fg.c | |||
@@ -55,6 +55,7 @@ | |||
55 | #define SIO_F71889_ID 0x0723 /* Chipset ID */ | 55 | #define SIO_F71889_ID 0x0723 /* Chipset ID */ |
56 | #define SIO_F71889E_ID 0x0909 /* Chipset ID */ | 56 | #define SIO_F71889E_ID 0x0909 /* Chipset ID */ |
57 | #define SIO_F8000_ID 0x0581 /* Chipset ID */ | 57 | #define SIO_F8000_ID 0x0581 /* Chipset ID */ |
58 | #define SIO_F81865_ID 0x0704 /* Chipset ID */ | ||
58 | 59 | ||
59 | #define REGION_LENGTH 8 | 60 | #define REGION_LENGTH 8 |
60 | #define ADDR_REG_OFFSET 5 | 61 | #define ADDR_REG_OFFSET 5 |
@@ -106,7 +107,7 @@ module_param(force_id, ushort, 0); | |||
106 | MODULE_PARM_DESC(force_id, "Override the detected device ID"); | 107 | MODULE_PARM_DESC(force_id, "Override the detected device ID"); |
107 | 108 | ||
108 | enum chips { f71808e, f71858fg, f71862fg, f71869, f71882fg, f71889fg, | 109 | enum chips { f71808e, f71858fg, f71862fg, f71869, f71882fg, f71889fg, |
109 | f71889ed, f8000 }; | 110 | f71889ed, f8000, f81865f }; |
110 | 111 | ||
111 | static const char *f71882fg_names[] = { | 112 | static const char *f71882fg_names[] = { |
112 | "f71808e", | 113 | "f71808e", |
@@ -117,6 +118,7 @@ static const char *f71882fg_names[] = { | |||
117 | "f71889fg", /* f81801u too, same id */ | 118 | "f71889fg", /* f81801u too, same id */ |
118 | "f71889ed", | 119 | "f71889ed", |
119 | "f8000", | 120 | "f8000", |
121 | "f81865f", | ||
120 | }; | 122 | }; |
121 | 123 | ||
122 | static const char f71882fg_has_in[][F71882FG_MAX_INS] = { | 124 | static const char f71882fg_has_in[][F71882FG_MAX_INS] = { |
@@ -128,6 +130,7 @@ static const char f71882fg_has_in[][F71882FG_MAX_INS] = { | |||
128 | [f71889fg] = { 1, 1, 1, 1, 1, 1, 1, 1, 1 }, | 130 | [f71889fg] = { 1, 1, 1, 1, 1, 1, 1, 1, 1 }, |
129 | [f71889ed] = { 1, 1, 1, 1, 1, 1, 1, 1, 1 }, | 131 | [f71889ed] = { 1, 1, 1, 1, 1, 1, 1, 1, 1 }, |
130 | [f8000] = { 1, 1, 1, 0, 0, 0, 0, 0, 0 }, | 132 | [f8000] = { 1, 1, 1, 0, 0, 0, 0, 0, 0 }, |
133 | [f81865f] = { 1, 1, 1, 1, 1, 1, 1, 0, 0 }, | ||
131 | }; | 134 | }; |
132 | 135 | ||
133 | static const char f71882fg_has_in1_alarm[] = { | 136 | static const char f71882fg_has_in1_alarm[] = { |
@@ -139,6 +142,7 @@ static const char f71882fg_has_in1_alarm[] = { | |||
139 | [f71889fg] = 1, | 142 | [f71889fg] = 1, |
140 | [f71889ed] = 1, | 143 | [f71889ed] = 1, |
141 | [f8000] = 0, | 144 | [f8000] = 0, |
145 | [f81865f] = 1, | ||
142 | }; | 146 | }; |
143 | 147 | ||
144 | static const char f71882fg_has_beep[] = { | 148 | static const char f71882fg_has_beep[] = { |
@@ -150,6 +154,7 @@ static const char f71882fg_has_beep[] = { | |||
150 | [f71889fg] = 1, | 154 | [f71889fg] = 1, |
151 | [f71889ed] = 1, | 155 | [f71889ed] = 1, |
152 | [f8000] = 0, | 156 | [f8000] = 0, |
157 | [f81865f] = 1, | ||
153 | }; | 158 | }; |
154 | 159 | ||
155 | static const char f71882fg_nr_fans[] = { | 160 | static const char f71882fg_nr_fans[] = { |
@@ -161,6 +166,7 @@ static const char f71882fg_nr_fans[] = { | |||
161 | [f71889fg] = 3, | 166 | [f71889fg] = 3, |
162 | [f71889ed] = 3, | 167 | [f71889ed] = 3, |
163 | [f8000] = 3, | 168 | [f8000] = 3, |
169 | [f81865f] = 2, | ||
164 | }; | 170 | }; |
165 | 171 | ||
166 | static const char f71882fg_nr_temps[] = { | 172 | static const char f71882fg_nr_temps[] = { |
@@ -172,6 +178,7 @@ static const char f71882fg_nr_temps[] = { | |||
172 | [f71889fg] = 3, | 178 | [f71889fg] = 3, |
173 | [f71889ed] = 3, | 179 | [f71889ed] = 3, |
174 | [f8000] = 3, | 180 | [f8000] = 3, |
181 | [f81865f] = 2, | ||
175 | }; | 182 | }; |
176 | 183 | ||
177 | static struct platform_device *f71882fg_pdev; | 184 | static struct platform_device *f71882fg_pdev; |
@@ -2186,16 +2193,12 @@ static int __devinit f71882fg_probe(struct platform_device *pdev) | |||
2186 | case f71862fg: | 2193 | case f71862fg: |
2187 | err = (data->pwm_enable & 0x15) != 0x15; | 2194 | err = (data->pwm_enable & 0x15) != 0x15; |
2188 | break; | 2195 | break; |
2189 | case f71808e: | ||
2190 | case f71869: | ||
2191 | case f71882fg: | ||
2192 | case f71889fg: | ||
2193 | case f71889ed: | ||
2194 | err = 0; | ||
2195 | break; | ||
2196 | case f8000: | 2196 | case f8000: |
2197 | err = data->pwm_enable & 0x20; | 2197 | err = data->pwm_enable & 0x20; |
2198 | break; | 2198 | break; |
2199 | default: | ||
2200 | err = 0; | ||
2201 | break; | ||
2199 | } | 2202 | } |
2200 | if (err) { | 2203 | if (err) { |
2201 | dev_err(&pdev->dev, | 2204 | dev_err(&pdev->dev, |
@@ -2433,6 +2436,9 @@ static int __init f71882fg_find(int sioaddr, unsigned short *address, | |||
2433 | case SIO_F8000_ID: | 2436 | case SIO_F8000_ID: |
2434 | sio_data->type = f8000; | 2437 | sio_data->type = f8000; |
2435 | break; | 2438 | break; |
2439 | case SIO_F81865_ID: | ||
2440 | sio_data->type = f81865f; | ||
2441 | break; | ||
2436 | default: | 2442 | default: |
2437 | pr_info("Unsupported Fintek device: %04x\n", | 2443 | pr_info("Unsupported Fintek device: %04x\n", |
2438 | (unsigned int)devid); | 2444 | (unsigned int)devid); |