acerhdf: Return temperature in milidegree instead of degree
Peter Feuerer
maintainerPATCH 1/2 acerhdf: Return temperature in milidegree instead of degree
Hi Andrew,
please apply.
thanks and regards,
--peter
--
Return temperature in milidegree instead of degree, as sysfs-api requires the temperature in milidegree.
--- drivers/platform/x86/acerhdf.c | 12 ++++++------ 1 files changed, 6 insertions(+), 6 deletions(-)
drivers/platform/x86/acerhdf.c +6 -6
@@ -52,7 +52,7 @@*/ #undef START_IN_KERNEL_MODE -#define DRV_VER "0.5.17" +#define DRV_VER "0.5.18"/* * According to the Atom N270 datasheet,
@@ -61,7 +61,7 @@* measured by the on-die thermal monitor are within 0 <= Tj <= 90. So, * assume 89°C is critical temperature. */ -#define ACERHDF_TEMP_CRIT 89 +#define ACERHDF_TEMP_CRIT 89000#define ACERHDF_FAN_OFF 0#define ACERHDF_FAN_AUTO 1
@@ -69,7 +69,7 @@* No matter what value the user puts into the fanon variable, turn on the fan * at 80 degree Celsius to prevent hardware damage */ -#define ACERHDF_MAX_FANON 80 +#define ACERHDF_MAX_FANON 80000/* * Maximum interval between two temperature checks is 15 seconds, as the die
@@ -85,8 +85,8 @@ static int kernelmode;#endif static unsigned int interval =10 ; -static unsigned int fanon =63 ; -static unsigned int fanoff =58 ; +static unsigned int fanon =63000 ; +static unsigned int fanoff =58000 ;static unsigned int verbose;static unsigned int fanstate =ACERHDF_FAN_AUTO ;static char force_bios[16 ];
@@ -171,7 +171,7 @@ static int acerhdf_get_temp(int *temp)if (ec_read (bios_cfg->tempreg, &read_temp))return -EINVAL ; - *temp = read_temp; + *temp = read_temp *1000 ;return 0 ; }
Signature · 1 line
1.6.5.2
Peter Feuerer
maintainerPATCH 2/2 acerhdf: Added new BIOS versions
Added new BIOS versions for following netbooks: Acer 1410, Gateway LT31, Packard Bell DOA150. As the Gateway LT31 machines have different register values for setting and checking the off-state, the "cmd_off" variable has been splitted up to "cmd_off" and "chk_off".
--- drivers/platform/x86/acerhdf.c | 63 +++++++++++++++++++++++---------------- 1 files changed, 37 insertions(+), 26 deletions(-)
drivers/platform/x86/acerhdf.c +37 -26
@@ -52,7 +52,7 @@*/ #undef START_IN_KERNEL_MODE -#define DRV_VER "0.5.18" +#define DRV_VER "0.5.20"/* * According to the Atom N270 datasheet,
@@ -112,12 +112,14 @@ module_param_string(force_product, force_product, 16, 0);MODULE_PARM_DESC (force_product,"Force BIOS product and omit BIOS check" );/* -* cmd_off: to switch the fan completely off / to check if the fan is off +* cmd_off: to switch the fan completely off +* chk_off: to check if the fan is off * cmd_auto: to set the BIOS in control of the fan. The BIOS regulates then * the fan speed depending on the temperature */ struct fancmd {u8 cmd_off; +u8 chk_off;u8 cmd_auto; };
@@ -134,32 +136,41 @@ struct bios_settings_t {/* Register addresses and values for different BIOS versions */ static const struct bios_settings_t bios_tbl[] = {/* AOA110 */ - {"Acer" ,"AOA110" ,"v0.3109" ,0x55 ,0x58 , {0x1f ,0x00 } }, - {"Acer" ,"AOA110" ,"v0.3114" ,0x55 ,0x58 , {0x1f ,0x00 } }, - {"Acer" ,"AOA110" ,"v0.3301" ,0x55 ,0x58 , {0xaf ,0x00 } }, - {"Acer" ,"AOA110" ,"v0.3304" ,0x55 ,0x58 , {0xaf ,0x00 } }, - {"Acer" ,"AOA110" ,"v0.3305" ,0x55 ,0x58 , {0xaf ,0x00 } }, - {"Acer" ,"AOA110" ,"v0.3307" ,0x55 ,0x58 , {0xaf ,0x00 } }, - {"Acer" ,"AOA110" ,"v0.3308" ,0x55 ,0x58 , {0x21 ,0x00 } }, - {"Acer" ,"AOA110" ,"v0.3309" ,0x55 ,0x58 , {0x21 ,0x00 } }, - {"Acer" ,"AOA110" ,"v0.3310" ,0x55 ,0x58 , {0x21 ,0x00 } }, + {"Acer" ,"AOA110" ,"v0.3109" ,0x55 ,0x58 , {0x1f ,0x1f ,0x00 } }, + {"Acer" ,"AOA110" ,"v0.3114" ,0x55 ,0x58 , {0x1f ,0x1f ,0x00 } }, + {"Acer" ,"AOA110" ,"v0.3301" ,0x55 ,0x58 , {0xaf ,0xaf ,0x00 } }, + {"Acer" ,"AOA110" ,"v0.3304" ,0x55 ,0x58 , {0xaf ,0xaf ,0x00 } }, + {"Acer" ,"AOA110" ,"v0.3305" ,0x55 ,0x58 , {0xaf ,0xaf ,0x00 } }, + {"Acer" ,"AOA110" ,"v0.3307" ,0x55 ,0x58 , {0xaf ,0xaf ,0x00 } }, + {"Acer" ,"AOA110" ,"v0.3308" ,0x55 ,0x58 , {0x21 ,0x21 ,0x00 } }, + {"Acer" ,"AOA110" ,"v0.3309" ,0x55 ,0x58 , {0x21 ,0x21 ,0x00 } }, + {"Acer" ,"AOA110" ,"v0.3310" ,0x55 ,0x58 , {0x21 ,0x21 ,0x00 } },/* AOA150 */ - {"Acer" ,"AOA150" ,"v0.3114" ,0x55 ,0x58 , {0x20 ,0x00 } }, - {"Acer" ,"AOA150" ,"v0.3301" ,0x55 ,0x58 , {0x20 ,0x00 } }, - {"Acer" ,"AOA150" ,"v0.3304" ,0x55 ,0x58 , {0x20 ,0x00 } }, - {"Acer" ,"AOA150" ,"v0.3305" ,0x55 ,0x58 , {0x20 ,0x00 } }, - {"Acer" ,"AOA150" ,"v0.3307" ,0x55 ,0x58 , {0x20 ,0x00 } }, - {"Acer" ,"AOA150" ,"v0.3308" ,0x55 ,0x58 , {0x20 ,0x00 } }, - {"Acer" ,"AOA150" ,"v0.3309" ,0x55 ,0x58 , {0x20 ,0x00 } }, - {"Acer" ,"AOA150" ,"v0.3310" ,0x55 ,0x58 , {0x20 ,0x00 } }, + {"Acer" ,"AOA150" ,"v0.3114" ,0x55 ,0x58 , {0x20 ,0x20 ,0x00 } }, + {"Acer" ,"AOA150" ,"v0.3301" ,0x55 ,0x58 , {0x20 ,0x20 ,0x00 } }, + {"Acer" ,"AOA150" ,"v0.3304" ,0x55 ,0x58 , {0x20 ,0x20 ,0x00 } }, + {"Acer" ,"AOA150" ,"v0.3305" ,0x55 ,0x58 , {0x20 ,0x20 ,0x00 } }, + {"Acer" ,"AOA150" ,"v0.3307" ,0x55 ,0x58 , {0x20 ,0x20 ,0x00 } }, + {"Acer" ,"AOA150" ,"v0.3308" ,0x55 ,0x58 , {0x20 ,0x20 ,0x00 } }, + {"Acer" ,"AOA150" ,"v0.3309" ,0x55 ,0x58 , {0x20 ,0x20 ,0x00 } }, + {"Acer" ,"AOA150" ,"v0.3310" ,0x55 ,0x58 , {0x20 ,0x20 ,0x00 } }, +/* Acer 1410 */ + {"Acer" ,"Aspire 1410" ,"v0.3120" ,0x55 ,0x58 , {0x9e ,0x9e ,0x00 } },/* special BIOS / other */ - {"Gateway" ,"AOA110" ,"v0.3103" ,0x55 ,0x58 , {0x21 ,0x00 } }, - {"Gateway" ,"AOA150" ,"v0.3103" ,0x55 ,0x58 , {0x20 ,0x00 } }, - {"Packard Bell" ,"DOA150" ,"v0.3104" ,0x55 ,0x58 , {0x21 ,0x00 } }, - {"Packard Bell" ,"AOA110" ,"v0.3105" ,0x55 ,0x58 , {0x21 ,0x00 } }, - {"Packard Bell" ,"AOA150" ,"v0.3105" ,0x55 ,0x58 , {0x20 ,0x00 } }, + {"Gateway" ,"AOA110" ,"v0.3103" ,0x55 ,0x58 , {0x21 ,0x21 ,0x00 } }, + {"Gateway" ,"AOA150" ,"v0.3103" ,0x55 ,0x58 , {0x20 ,0x20 ,0x00 } }, + {"Gateway " ,"LT31 " ,"v1.3103 " ,0x55 ,0x58 , + {0x10 ,0x0f ,0x00 } }, + {"Gateway " ,"LT31 " ,"v1.3201 " ,0x55 ,0x58 , + {0x10 ,0x0f ,0x00 } }, + {"Gateway " ,"LT31 " ,"v1.3302 " ,0x55 ,0x58 , + {0x10 ,0x0f ,0x00 } }, + {"Packard Bell" ,"DOA150" ,"v0.3104" ,0x55 ,0x58 , {0x21 ,0x21 ,0x00 } }, + {"Packard Bell" ,"DOA150" ,"v0.3105" ,0x55 ,0x58 , {0x20 ,0x20 ,0x00 } }, + {"Packard Bell" ,"AOA110" ,"v0.3105" ,0x55 ,0x58 , {0x21 ,0x21 ,0x00 } }, + {"Packard Bell" ,"AOA150" ,"v0.3105" ,0x55 ,0x58 , {0x20 ,0x20 ,0x00 } },/* pewpew-terminator */ - {"" ,"" ,"" ,0 ,0 , {0 ,0 } } + {"" ,"" ,"" ,0 ,0 , {0 ,0 ,0 } } };static const struct bios_settings_t *bios_cfg__read_mostly ;
@@ -183,7 +194,7 @@ static int acerhdf_get_fanstate(int *state)if (ec_read (bios_cfg->fanreg, &fan))return -EINVAL ; -if (fan != bios_cfg->cmd.cmd_off) +if (fan != bios_cfg->cmd.chk_off) *state =ACERHDF_FAN_AUTO ;else *state =ACERHDF_FAN_OFF ;
Signature · 1 line
1.6.5.2
Re: [PATCH 2/2] acerhdf: Added new BIOS versions
Len, patch 1/2 looks like 2.6.32 material to me?
Ordinarily I'd consider an add-device-support patch like 2/2 to be 2.6.32 material also, but this one looks a bit large and scary for that treatment.
Re: [PATCH 2/2] acerhdf: Added new BIOS versions
Quoted 5 lines · Andrew Morton
Len, patch 1/2 looks like 2.6.32 material to me?
Ordinarily I'd consider an add-device-support patch like 2/2 to be 2.6.32 material also, but this one looks a bit large and scary for that treatment.
Agreed on both points.
I sent the 1st patch up yesterday -- though I've not seen any pulls from Linus today...
The fact that the 1st patch was necessary suggests that this driver is thinkly tested, and so patch #2 should wait for the merge window like most patches do.
thanks,
-Len Brown, Intel Open Source Technology Center