aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeter Feuerer <peter@piie.net>2010-07-20 18:19:32 -0400
committerMatthew Garrett <mjg@redhat.com>2010-08-03 09:48:55 -0400
commit210183d4af87cc70d7e4552d325f238734cade15 (patch)
treef72a4c41f1c4b47fbc79bb3c5366c0f17b7f2ec5
parent887b7ca9c55a5dd53413a467f7b02821ba7a6557 (diff)
acerhdf: remove "chk_off" as it was only needed for T31 netbooks
Remove "chk_off" as it was only needed for T31 netbooks. But those netbooks can also be handled just with "cmd_off" register (0x9e) for reading the state back. Signed-off-by: Peter Feuerer <peter@piie.net> Cc: Borislav Petkov <petkovbb@gmail.com> Cc: Andreas Mohr <andi@lisas.de> Cc: Len Brown <lenb@kernel.org> Cc: Matthew Garrett <mjg@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Matthew Garrett <mjg@redhat.com>
-rw-r--r--drivers/platform/x86/acerhdf.c92
1 files changed, 45 insertions, 47 deletions
diff --git a/drivers/platform/x86/acerhdf.c b/drivers/platform/x86/acerhdf.c
index 40be6a460bed..9226838c867f 100644
--- a/drivers/platform/x86/acerhdf.c
+++ b/drivers/platform/x86/acerhdf.c
@@ -112,14 +112,12 @@ module_param_string(force_product, force_product, 16, 0);
112MODULE_PARM_DESC(force_product, "Force BIOS product and omit BIOS check"); 112MODULE_PARM_DESC(force_product, "Force BIOS product and omit BIOS check");
113 113
114/* 114/*
115 * cmd_off: to switch the fan completely off 115 * cmd_off: to switch the fan completely off and check if the fan is off
116 * chk_off: to check if the fan is off
117 * cmd_auto: to set the BIOS in control of the fan. The BIOS regulates then 116 * cmd_auto: to set the BIOS in control of the fan. The BIOS regulates then
118 * the fan speed depending on the temperature 117 * the fan speed depending on the temperature
119 */ 118 */
120struct fancmd { 119struct fancmd {
121 u8 cmd_off; 120 u8 cmd_off;
122 u8 chk_off;
123 u8 cmd_auto; 121 u8 cmd_auto;
124}; 122};
125 123
@@ -136,55 +134,55 @@ struct bios_settings_t {
136/* Register addresses and values for different BIOS versions */ 134/* Register addresses and values for different BIOS versions */
137static const struct bios_settings_t bios_tbl[] = { 135static const struct bios_settings_t bios_tbl[] = {
138 /* AOA110 */ 136 /* AOA110 */
139 {"Acer", "AOA110", "v0.3109", 0x55, 0x58, {0x1f, 0x1f, 0x00} }, 137 {"Acer", "AOA110", "v0.3109", 0x55, 0x58, {0x1f, 0x00} },
140 {"Acer", "AOA110", "v0.3114", 0x55, 0x58, {0x1f, 0x1f, 0x00} }, 138 {"Acer", "AOA110", "v0.3114", 0x55, 0x58, {0x1f, 0x00} },
141 {"Acer", "AOA110", "v0.3301", 0x55, 0x58, {0xaf, 0xaf, 0x00} }, 139 {"Acer", "AOA110", "v0.3301", 0x55, 0x58, {0xaf, 0x00} },
142 {"Acer", "AOA110", "v0.3304", 0x55, 0x58, {0xaf, 0xaf, 0x00} }, 140 {"Acer", "AOA110", "v0.3304", 0x55, 0x58, {0xaf, 0x00} },
143 {"Acer", "AOA110", "v0.3305", 0x55, 0x58, {0xaf, 0xaf, 0x00} }, 141 {"Acer", "AOA110", "v0.3305", 0x55, 0x58, {0xaf, 0x00} },
144 {"Acer", "AOA110", "v0.3307", 0x55, 0x58, {0xaf, 0xaf, 0x00} }, 142 {"Acer", "AOA110", "v0.3307", 0x55, 0x58, {0xaf, 0x00} },
145 {"Acer", "AOA110", "v0.3308", 0x55, 0x58, {0x21, 0x21, 0x00} }, 143 {"Acer", "AOA110", "v0.3308", 0x55, 0x58, {0x21, 0x00} },
146 {"Acer", "AOA110", "v0.3309", 0x55, 0x58, {0x21, 0x21, 0x00} }, 144 {"Acer", "AOA110", "v0.3309", 0x55, 0x58, {0x21, 0x00} },
147 {"Acer", "AOA110", "v0.3310", 0x55, 0x58, {0x21, 0x21, 0x00} }, 145 {"Acer", "AOA110", "v0.3310", 0x55, 0x58, {0x21, 0x00} },
148 /* AOA150 */ 146 /* AOA150 */
149 {"Acer", "AOA150", "v0.3114", 0x55, 0x58, {0x1f, 0x1f, 0x00} }, 147 {"Acer", "AOA150", "v0.3114", 0x55, 0x58, {0x1f, 0x00} },
150 {"Acer", "AOA150", "v0.3301", 0x55, 0x58, {0x20, 0x20, 0x00} }, 148 {"Acer", "AOA150", "v0.3301", 0x55, 0x58, {0x20, 0x00} },
151 {"Acer", "AOA150", "v0.3304", 0x55, 0x58, {0x20, 0x20, 0x00} }, 149 {"Acer", "AOA150", "v0.3304", 0x55, 0x58, {0x20, 0x00} },
152 {"Acer", "AOA150", "v0.3305", 0x55, 0x58, {0x20, 0x20, 0x00} }, 150 {"Acer", "AOA150", "v0.3305", 0x55, 0x58, {0x20, 0x00} },
153 {"Acer", "AOA150", "v0.3307", 0x55, 0x58, {0x20, 0x20, 0x00} }, 151 {"Acer", "AOA150", "v0.3307", 0x55, 0x58, {0x20, 0x00} },
154 {"Acer", "AOA150", "v0.3308", 0x55, 0x58, {0x20, 0x20, 0x00} }, 152 {"Acer", "AOA150", "v0.3308", 0x55, 0x58, {0x20, 0x00} },
155 {"Acer", "AOA150", "v0.3309", 0x55, 0x58, {0x20, 0x20, 0x00} }, 153 {"Acer", "AOA150", "v0.3309", 0x55, 0x58, {0x20, 0x00} },
156 {"Acer", "AOA150", "v0.3310", 0x55, 0x58, {0x20, 0x20, 0x00} }, 154 {"Acer", "AOA150", "v0.3310", 0x55, 0x58, {0x20, 0x00} },
157 /* Acer 1410 */ 155 /* Acer 1410 */
158 {"Acer", "Aspire 1410", "v0.3115", 0x55, 0x58, {0x9e, 0x9e, 0x00} }, 156 {"Acer", "Aspire 1410", "v0.3115", 0x55, 0x58, {0x9e, 0x00} },
159 {"Acer", "Aspire 1410", "v0.3120", 0x55, 0x58, {0x9e, 0x9e, 0x00} }, 157 {"Acer", "Aspire 1410", "v0.3120", 0x55, 0x58, {0x9e, 0x00} },
160 {"Acer", "Aspire 1410", "v1.3303", 0x55, 0x58, {0x9e, 0x9e, 0x00} }, 158 {"Acer", "Aspire 1410", "v1.3303", 0x55, 0x58, {0x9e, 0x00} },
161 /* Acer 1810xx */ 159 /* Acer 1810xx */
162 {"Acer", "Aspire 1810TZ", "v0.3115", 0x55, 0x58, {0x9e, 0x9e, 0x00} }, 160 {"Acer", "Aspire 1810TZ", "v0.3115", 0x55, 0x58, {0x9e, 0x00} },
163 {"Acer", "Aspire 1810T", "v0.3115", 0x55, 0x58, {0x9e, 0x9e, 0x00} }, 161 {"Acer", "Aspire 1810T", "v0.3115", 0x55, 0x58, {0x9e, 0x00} },
164 {"Acer", "Aspire 1810TZ", "v0.3119", 0x55, 0x58, {0x9e, 0x9e, 0x00} }, 162 {"Acer", "Aspire 1810TZ", "v0.3119", 0x55, 0x58, {0x9e, 0x00} },
165 {"Acer", "Aspire 1810T", "v0.3119", 0x55, 0x58, {0x9e, 0x9e, 0x00} }, 163 {"Acer", "Aspire 1810T", "v0.3119", 0x55, 0x58, {0x9e, 0x00} },
166 {"Acer", "Aspire 1810TZ", "v0.3120", 0x55, 0x58, {0x9e, 0x9e, 0x00} }, 164 {"Acer", "Aspire 1810TZ", "v0.3120", 0x55, 0x58, {0x9e, 0x00} },
167 {"Acer", "Aspire 1810T", "v0.3120", 0x55, 0x58, {0x9e, 0x9e, 0x00} }, 165 {"Acer", "Aspire 1810T", "v0.3120", 0x55, 0x58, {0x9e, 0x00} },
168 {"Acer", "Aspire 1810TZ", "v1.3204", 0x55, 0x58, {0x9e, 0x9e, 0x00} }, 166 {"Acer", "Aspire 1810TZ", "v1.3204", 0x55, 0x58, {0x9e, 0x00} },
169 {"Acer", "Aspire 1810T", "v1.3204", 0x55, 0x58, {0x9e, 0x9e, 0x00} }, 167 {"Acer", "Aspire 1810T", "v1.3204", 0x55, 0x58, {0x9e, 0x00} },
170 {"Acer", "Aspire 1810TZ", "v1.3303", 0x55, 0x58, {0x9e, 0x9e, 0x00} }, 168 {"Acer", "Aspire 1810TZ", "v1.3303", 0x55, 0x58, {0x9e, 0x00} },
171 {"Acer", "Aspire 1810T", "v1.3303", 0x55, 0x58, {0x9e, 0x9e, 0x00} }, 169 {"Acer", "Aspire 1810T", "v1.3303", 0x55, 0x58, {0x9e, 0x00} },
172 /* Gateway */ 170 /* Gateway */
173 {"Gateway", "AOA110", "v0.3103", 0x55, 0x58, {0x21, 0x21, 0x00} }, 171 {"Gateway", "AOA110", "v0.3103", 0x55, 0x58, {0x21, 0x00} },
174 {"Gateway", "AOA150", "v0.3103", 0x55, 0x58, {0x20, 0x20, 0x00} }, 172 {"Gateway", "AOA150", "v0.3103", 0x55, 0x58, {0x20, 0x00} },
175 {"Gateway", "LT31", "v1.3103", 0x55, 0x58, {0x10, 0x0f, 0x00} }, 173 {"Gateway", "LT31", "v1.3103", 0x55, 0x58, {0x9e, 0x00} },
176 {"Gateway", "LT31", "v1.3201", 0x55, 0x58, {0x10, 0x0f, 0x00} }, 174 {"Gateway", "LT31", "v1.3201", 0x55, 0x58, {0x9e, 0x00} },
177 {"Gateway", "LT31", "v1.3302", 0x55, 0x58, {0x10, 0x0f, 0x00} }, 175 {"Gateway", "LT31", "v1.3302", 0x55, 0x58, {0x9e, 0x00} },
178 /* Packard Bell */ 176 /* Packard Bell */
179 {"Packard Bell", "DOA150", "v0.3104", 0x55, 0x58, {0x21, 0x21, 0x00} }, 177 {"Packard Bell", "DOA150", "v0.3104", 0x55, 0x58, {0x21, 0x00} },
180 {"Packard Bell", "DOA150", "v0.3105", 0x55, 0x58, {0x20, 0x20, 0x00} }, 178 {"Packard Bell", "DOA150", "v0.3105", 0x55, 0x58, {0x20, 0x00} },
181 {"Packard Bell", "AOA110", "v0.3105", 0x55, 0x58, {0x21, 0x21, 0x00} }, 179 {"Packard Bell", "AOA110", "v0.3105", 0x55, 0x58, {0x21, 0x00} },
182 {"Packard Bell", "AOA150", "v0.3105", 0x55, 0x58, {0x20, 0x20, 0x00} }, 180 {"Packard Bell", "AOA150", "v0.3105", 0x55, 0x58, {0x20, 0x00} },
183 {"Packard Bell", "DOTMU", "v1.3303", 0x55, 0x58, {0x9e, 0x9e, 0x00} }, 181 {"Packard Bell", "DOTMU", "v1.3303", 0x55, 0x58, {0x9e, 0x00} },
184 {"Packard Bell", "DOTMU", "v0.3120", 0x55, 0x58, {0x9e, 0x9e, 0x00} }, 182 {"Packard Bell", "DOTMU", "v0.3120", 0x55, 0x58, {0x9e, 0x00} },
185 {"Packard Bell", "DOTMA", "v1.3201", 0x55, 0x58, {0x9e, 0x9e, 0x00} }, 183 {"Packard Bell", "DOTMA", "v1.3201", 0x55, 0x58, {0x9e, 0x00} },
186 /* pewpew-terminator */ 184 /* pewpew-terminator */
187 {"", "", "", 0, 0, {0, 0, 0} } 185 {"", "", "", 0, 0, {0, 0} }
188}; 186};
189 187
190static const struct bios_settings_t *bios_cfg __read_mostly; 188static const struct bios_settings_t *bios_cfg __read_mostly;
@@ -208,7 +206,7 @@ static int acerhdf_get_fanstate(int *state)
208 if (ec_read(bios_cfg->fanreg, &fan)) 206 if (ec_read(bios_cfg->fanreg, &fan))
209 return -EINVAL; 207 return -EINVAL;
210 208
211 if (fan != bios_cfg->cmd.chk_off) 209 if (fan != bios_cfg->cmd.cmd_off)
212 *state = ACERHDF_FAN_AUTO; 210 *state = ACERHDF_FAN_AUTO;
213 else 211 else
214 *state = ACERHDF_FAN_OFF; 212 *state = ACERHDF_FAN_OFF;