Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

i8k: make fan multiplier tunable with a module parameter

The i8k driver multiplies the fan speed reported by the BIOS with a factor of
30. On my Dell Latitude D800, this factor is not required.

I'd suggest to make this configurable.

Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

Jochen Eisinger and committed by
Linus Torvalds
4ed99a27 af8e2a4c

+5 -1
+5 -1
drivers/char/i8k.c
··· 77 77 module_param(power_status, bool, 0600); 78 78 MODULE_PARM_DESC(power_status, "Report power status in /proc/i8k"); 79 79 80 + static int fan_mult = I8K_FAN_MULT; 81 + module_param(fan_mult, int, 0); 82 + MODULE_PARM_DESC(fan_mult, "Factor to multiply fan speed with"); 83 + 80 84 static int i8k_open_fs(struct inode *inode, struct file *file); 81 85 static int i8k_ioctl(struct inode *, struct file *, unsigned int, 82 86 unsigned long); ··· 243 239 struct smm_regs regs = { .eax = I8K_SMM_GET_SPEED, }; 244 240 245 241 regs.ebx = fan & 0xff; 246 - return i8k_smm(&regs) ? : (regs.eax & 0xffff) * I8K_FAN_MULT; 242 + return i8k_smm(&regs) ? : (regs.eax & 0xffff) * fan_mult; 247 243 } 248 244 249 245 /*