2 * i8k.c -- Linux driver for accessing the SMM BIOS on Dell laptops.
4 * Copyright (C) 2001 Massimo Dal Zotto <dz@debian.org>
7 * Copyright (C) 2011 Jean Delvare <jdelvare@suse.de>
8 * Copyright (C) 2013 Guenter Roeck <linux@roeck-us.net>
10 * This program is free software; you can redistribute it and/or modify it
11 * under the terms of the GNU General Public License as published by the
12 * Free Software Foundation; either version 2, or (at your option) any
15 * This program is distributed in the hope that it will be useful, but
16 * WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 * General Public License for more details.
21 #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
23 #include <linux/module.h>
24 #include <linux/types.h>
25 #include <linux/init.h>
26 #include <linux/proc_fs.h>
27 #include <linux/seq_file.h>
28 #include <linux/dmi.h>
29 #include <linux/capability.h>
30 #include <linux/mutex.h>
31 #include <linux/hwmon.h>
32 #include <linux/hwmon-sysfs.h>
33 #include <linux/uaccess.h>
35 #include <linux/sched.h>
37 #include <linux/i8k.h>
39 #define I8K_SMM_FN_STATUS 0x0025
40 #define I8K_SMM_POWER_STATUS 0x0069
41 #define I8K_SMM_SET_FAN 0x01a3
42 #define I8K_SMM_GET_FAN 0x00a3
43 #define I8K_SMM_GET_SPEED 0x02a3
44 #define I8K_SMM_GET_TEMP 0x10a3
45 #define I8K_SMM_GET_DELL_SIG1 0xfea3
46 #define I8K_SMM_GET_DELL_SIG2 0xffa3
48 #define I8K_FAN_MULT 30
49 #define I8K_MAX_TEMP 127
51 #define I8K_FN_NONE 0x00
52 #define I8K_FN_UP 0x01
53 #define I8K_FN_DOWN 0x02
54 #define I8K_FN_MUTE 0x04
55 #define I8K_FN_MASK 0x07
56 #define I8K_FN_SHIFT 8
58 #define I8K_POWER_AC 0x05
59 #define I8K_POWER_BATTERY 0x01
61 #define I8K_TEMPERATURE_BUG 1
63 static DEFINE_MUTEX(i8k_mutex
);
64 static char bios_version
[4];
65 static char bios_machineid
[16];
66 static struct device
*i8k_hwmon_dev
;
67 static u32 i8k_hwmon_flags
;
68 static int i8k_fan_mult
;
70 #define I8K_HWMON_HAVE_TEMP1 (1 << 0)
71 #define I8K_HWMON_HAVE_TEMP2 (1 << 1)
72 #define I8K_HWMON_HAVE_TEMP3 (1 << 2)
73 #define I8K_HWMON_HAVE_TEMP4 (1 << 3)
74 #define I8K_HWMON_HAVE_FAN1 (1 << 4)
75 #define I8K_HWMON_HAVE_FAN2 (1 << 5)
77 MODULE_AUTHOR("Massimo Dal Zotto (dz@debian.org)");
78 MODULE_DESCRIPTION("Driver for accessing SMM BIOS on Dell laptops");
79 MODULE_LICENSE("GPL");
82 module_param(force
, bool, 0);
83 MODULE_PARM_DESC(force
, "Force loading without checking for supported models");
85 static bool ignore_dmi
;
86 module_param(ignore_dmi
, bool, 0);
87 MODULE_PARM_DESC(ignore_dmi
, "Continue probing hardware even if DMI data does not match");
89 static bool restricted
= true;
90 module_param(restricted
, bool, 0);
91 MODULE_PARM_DESC(restricted
, "Restrict fan control and serial number to CAP_SYS_ADMIN (default: 1)");
93 static bool power_status
;
94 module_param(power_status
, bool, 0600);
95 MODULE_PARM_DESC(power_status
, "Report power status in /proc/i8k (default: 0)");
97 static int fan_mult
= I8K_FAN_MULT
;
98 module_param(fan_mult
, int, 0);
99 MODULE_PARM_DESC(fan_mult
, "Factor to multiply fan speed with");
101 static int i8k_open_fs(struct inode
*inode
, struct file
*file
);
102 static long i8k_ioctl(struct file
*, unsigned int, unsigned long);
104 static const struct file_operations i8k_fops
= {
105 .owner
= THIS_MODULE
,
109 .release
= single_release
,
110 .unlocked_ioctl
= i8k_ioctl
,
115 unsigned int ebx __packed
;
116 unsigned int ecx __packed
;
117 unsigned int edx __packed
;
118 unsigned int esi __packed
;
119 unsigned int edi __packed
;
122 static inline const char *i8k_get_dmi_data(int field
)
124 const char *dmi_data
= dmi_get_system_info(field
);
126 return dmi_data
&& *dmi_data
? dmi_data
: "?";
130 * Call the System Management Mode BIOS. Code provided by Jonathan Buzzard.
132 static int i8k_smm(struct smm_regs
*regs
)
136 cpumask_var_t old_mask
;
138 /* SMM requires CPU 0 */
139 if (!alloc_cpumask_var(&old_mask
, GFP_KERNEL
))
141 cpumask_copy(old_mask
, ¤t
->cpus_allowed
);
142 rc
= set_cpus_allowed_ptr(current
, cpumask_of(0));
145 if (smp_processor_id() != 0) {
150 #if defined(CONFIG_X86_64)
151 asm volatile("pushq %%rax\n\t"
152 "movl 0(%%rax),%%edx\n\t"
154 "movl 4(%%rax),%%ebx\n\t"
155 "movl 8(%%rax),%%ecx\n\t"
156 "movl 12(%%rax),%%edx\n\t"
157 "movl 16(%%rax),%%esi\n\t"
158 "movl 20(%%rax),%%edi\n\t"
162 "xchgq %%rax,(%%rsp)\n\t"
163 "movl %%ebx,4(%%rax)\n\t"
164 "movl %%ecx,8(%%rax)\n\t"
165 "movl %%edx,12(%%rax)\n\t"
166 "movl %%esi,16(%%rax)\n\t"
167 "movl %%edi,20(%%rax)\n\t"
169 "movl %%edx,0(%%rax)\n\t"
175 : "%ebx", "%ecx", "%edx", "%esi", "%edi", "memory");
177 asm volatile("pushl %%eax\n\t"
178 "movl 0(%%eax),%%edx\n\t"
180 "movl 4(%%eax),%%ebx\n\t"
181 "movl 8(%%eax),%%ecx\n\t"
182 "movl 12(%%eax),%%edx\n\t"
183 "movl 16(%%eax),%%esi\n\t"
184 "movl 20(%%eax),%%edi\n\t"
188 "xchgl %%eax,(%%esp)\n\t"
189 "movl %%ebx,4(%%eax)\n\t"
190 "movl %%ecx,8(%%eax)\n\t"
191 "movl %%edx,12(%%eax)\n\t"
192 "movl %%esi,16(%%eax)\n\t"
193 "movl %%edi,20(%%eax)\n\t"
195 "movl %%edx,0(%%eax)\n\t"
201 : "%ebx", "%ecx", "%edx", "%esi", "%edi", "memory");
203 if (rc
!= 0 || (regs
->eax
& 0xffff) == 0xffff || regs
->eax
== eax
)
207 set_cpus_allowed_ptr(current
, old_mask
);
208 free_cpumask_var(old_mask
);
213 * Read the Fn key status.
215 static int i8k_get_fn_status(void)
217 struct smm_regs regs
= { .eax
= I8K_SMM_FN_STATUS
, };
224 switch ((regs
.eax
>> I8K_FN_SHIFT
) & I8K_FN_MASK
) {
237 * Read the power status.
239 static int i8k_get_power_status(void)
241 struct smm_regs regs
= { .eax
= I8K_SMM_POWER_STATUS
, };
248 return (regs
.eax
& 0xff) == I8K_POWER_AC
? I8K_AC
: I8K_BATTERY
;
252 * Read the fan status.
254 static int i8k_get_fan_status(int fan
)
256 struct smm_regs regs
= { .eax
= I8K_SMM_GET_FAN
, };
258 regs
.ebx
= fan
& 0xff;
259 return i8k_smm(®s
) ? : regs
.eax
& 0xff;
263 * Read the fan speed in RPM.
265 static int i8k_get_fan_speed(int fan
)
267 struct smm_regs regs
= { .eax
= I8K_SMM_GET_SPEED
, };
269 regs
.ebx
= fan
& 0xff;
270 return i8k_smm(®s
) ? : (regs
.eax
& 0xffff) * i8k_fan_mult
;
274 * Set the fan speed (off, low, high). Returns the new fan status.
276 static int i8k_set_fan(int fan
, int speed
)
278 struct smm_regs regs
= { .eax
= I8K_SMM_SET_FAN
, };
280 speed
= (speed
< 0) ? 0 : ((speed
> I8K_FAN_MAX
) ? I8K_FAN_MAX
: speed
);
281 regs
.ebx
= (fan
& 0xff) | (speed
<< 8);
283 return i8k_smm(®s
) ? : i8k_get_fan_status(fan
);
287 * Read the cpu temperature.
289 static int i8k_get_temp(int sensor
)
291 struct smm_regs regs
= { .eax
= I8K_SMM_GET_TEMP
, };
295 #ifdef I8K_TEMPERATURE_BUG
298 regs
.ebx
= sensor
& 0xff;
303 temp
= regs
.eax
& 0xff;
305 #ifdef I8K_TEMPERATURE_BUG
307 * Sometimes the temperature sensor returns 0x99, which is out of range.
308 * In this case we return (once) the previous cached value. For example:
309 # 1003655137 00000058 00005a4b
310 # 1003655138 00000099 00003a80 <--- 0x99 = 153 degrees
311 # 1003655139 00000054 00005c52
313 if (temp
> I8K_MAX_TEMP
) {
315 prev
[sensor
] = I8K_MAX_TEMP
;
324 static int i8k_get_dell_signature(int req_fn
)
326 struct smm_regs regs
= { .eax
= req_fn
, };
333 return regs
.eax
== 1145651527 && regs
.edx
== 1145392204 ? 0 : -1;
337 i8k_ioctl_unlocked(struct file
*fp
, unsigned int cmd
, unsigned long arg
)
341 unsigned char buff
[16];
342 int __user
*argp
= (int __user
*)arg
;
348 case I8K_BIOS_VERSION
:
349 val
= (bios_version
[0] << 16) |
350 (bios_version
[1] << 8) | bios_version
[2];
354 if (restricted
&& !capable(CAP_SYS_ADMIN
))
357 memset(buff
, 0, sizeof(buff
));
358 strlcpy(buff
, bios_machineid
, sizeof(buff
));
362 val
= i8k_get_fn_status();
365 case I8K_POWER_STATUS
:
366 val
= i8k_get_power_status();
370 val
= i8k_get_temp(0);
374 if (copy_from_user(&val
, argp
, sizeof(int)))
377 val
= i8k_get_fan_speed(val
);
381 if (copy_from_user(&val
, argp
, sizeof(int)))
384 val
= i8k_get_fan_status(val
);
388 if (restricted
&& !capable(CAP_SYS_ADMIN
))
391 if (copy_from_user(&val
, argp
, sizeof(int)))
394 if (copy_from_user(&speed
, argp
+ 1, sizeof(int)))
397 val
= i8k_set_fan(val
, speed
);
408 case I8K_BIOS_VERSION
:
409 if (copy_to_user(argp
, &val
, 4))
414 if (copy_to_user(argp
, buff
, 16))
419 if (copy_to_user(argp
, &val
, sizeof(int)))
428 static long i8k_ioctl(struct file
*fp
, unsigned int cmd
, unsigned long arg
)
432 mutex_lock(&i8k_mutex
);
433 ret
= i8k_ioctl_unlocked(fp
, cmd
, arg
);
434 mutex_unlock(&i8k_mutex
);
440 * Print the information for /proc/i8k.
442 static int i8k_proc_show(struct seq_file
*seq
, void *offset
)
444 int fn_key
, cpu_temp
, ac_power
;
445 int left_fan
, right_fan
, left_speed
, right_speed
;
447 cpu_temp
= i8k_get_temp(0); /* 11100 µs */
448 left_fan
= i8k_get_fan_status(I8K_FAN_LEFT
); /* 580 µs */
449 right_fan
= i8k_get_fan_status(I8K_FAN_RIGHT
); /* 580 µs */
450 left_speed
= i8k_get_fan_speed(I8K_FAN_LEFT
); /* 580 µs */
451 right_speed
= i8k_get_fan_speed(I8K_FAN_RIGHT
); /* 580 µs */
452 fn_key
= i8k_get_fn_status(); /* 750 µs */
454 ac_power
= i8k_get_power_status(); /* 14700 µs */
461 * 1) Format version (this will change if format changes)
466 * 6) Right fan status
472 return seq_printf(seq
, "%s %s %s %d %d %d %d %d %d %d\n",
475 (restricted
&& !capable(CAP_SYS_ADMIN
)) ? "-1" : bios_machineid
,
477 left_fan
, right_fan
, left_speed
, right_speed
,
481 static int i8k_open_fs(struct inode
*inode
, struct file
*file
)
483 return single_open(file
, i8k_proc_show
, NULL
);
491 static ssize_t
i8k_hwmon_show_temp(struct device
*dev
,
492 struct device_attribute
*devattr
,
495 int index
= to_sensor_dev_attr(devattr
)->index
;
498 temp
= i8k_get_temp(index
);
501 return sprintf(buf
, "%d\n", temp
* 1000);
504 static ssize_t
i8k_hwmon_show_fan(struct device
*dev
,
505 struct device_attribute
*devattr
,
508 int index
= to_sensor_dev_attr(devattr
)->index
;
511 fan_speed
= i8k_get_fan_speed(index
);
514 return sprintf(buf
, "%d\n", fan_speed
);
517 static ssize_t
i8k_hwmon_show_pwm(struct device
*dev
,
518 struct device_attribute
*devattr
,
521 int index
= to_sensor_dev_attr(devattr
)->index
;
524 status
= i8k_get_fan_status(index
);
527 return sprintf(buf
, "%d\n", clamp_val(status
* 128, 0, 255));
530 static ssize_t
i8k_hwmon_set_pwm(struct device
*dev
,
531 struct device_attribute
*attr
,
532 const char *buf
, size_t count
)
534 int index
= to_sensor_dev_attr(attr
)->index
;
538 err
= kstrtoul(buf
, 10, &val
);
541 val
= clamp_val(DIV_ROUND_CLOSEST(val
, 128), 0, 2);
543 mutex_lock(&i8k_mutex
);
544 err
= i8k_set_fan(index
, val
);
545 mutex_unlock(&i8k_mutex
);
547 return err
< 0 ? -EIO
: count
;
550 static ssize_t
i8k_hwmon_show_label(struct device
*dev
,
551 struct device_attribute
*devattr
,
554 static const char *labels
[3] = {
559 int index
= to_sensor_dev_attr(devattr
)->index
;
561 return sprintf(buf
, "%s\n", labels
[index
]);
564 static SENSOR_DEVICE_ATTR(temp1_input
, S_IRUGO
, i8k_hwmon_show_temp
, NULL
, 0);
565 static SENSOR_DEVICE_ATTR(temp2_input
, S_IRUGO
, i8k_hwmon_show_temp
, NULL
, 1);
566 static SENSOR_DEVICE_ATTR(temp3_input
, S_IRUGO
, i8k_hwmon_show_temp
, NULL
, 2);
567 static SENSOR_DEVICE_ATTR(temp4_input
, S_IRUGO
, i8k_hwmon_show_temp
, NULL
, 3);
568 static SENSOR_DEVICE_ATTR(fan1_input
, S_IRUGO
, i8k_hwmon_show_fan
, NULL
,
570 static SENSOR_DEVICE_ATTR(pwm1
, S_IRUGO
| S_IWUSR
, i8k_hwmon_show_pwm
,
571 i8k_hwmon_set_pwm
, I8K_FAN_LEFT
);
572 static SENSOR_DEVICE_ATTR(fan2_input
, S_IRUGO
, i8k_hwmon_show_fan
, NULL
,
574 static SENSOR_DEVICE_ATTR(pwm2
, S_IRUGO
| S_IWUSR
, i8k_hwmon_show_pwm
,
575 i8k_hwmon_set_pwm
, I8K_FAN_RIGHT
);
576 static SENSOR_DEVICE_ATTR(temp1_label
, S_IRUGO
, i8k_hwmon_show_label
, NULL
, 0);
577 static SENSOR_DEVICE_ATTR(fan1_label
, S_IRUGO
, i8k_hwmon_show_label
, NULL
, 1);
578 static SENSOR_DEVICE_ATTR(fan2_label
, S_IRUGO
, i8k_hwmon_show_label
, NULL
, 2);
580 static struct attribute
*i8k_attrs
[] = {
581 &sensor_dev_attr_temp1_input
.dev_attr
.attr
, /* 0 */
582 &sensor_dev_attr_temp1_label
.dev_attr
.attr
, /* 1 */
583 &sensor_dev_attr_temp2_input
.dev_attr
.attr
, /* 2 */
584 &sensor_dev_attr_temp3_input
.dev_attr
.attr
, /* 3 */
585 &sensor_dev_attr_temp4_input
.dev_attr
.attr
, /* 4 */
586 &sensor_dev_attr_fan1_input
.dev_attr
.attr
, /* 5 */
587 &sensor_dev_attr_pwm1
.dev_attr
.attr
, /* 6 */
588 &sensor_dev_attr_fan1_label
.dev_attr
.attr
, /* 7 */
589 &sensor_dev_attr_fan2_input
.dev_attr
.attr
, /* 8 */
590 &sensor_dev_attr_pwm2
.dev_attr
.attr
, /* 9 */
591 &sensor_dev_attr_fan2_label
.dev_attr
.attr
, /* 10 */
595 static umode_t
i8k_is_visible(struct kobject
*kobj
, struct attribute
*attr
,
598 if ((index
== 0 || index
== 1) &&
599 !(i8k_hwmon_flags
& I8K_HWMON_HAVE_TEMP1
))
601 if (index
== 2 && !(i8k_hwmon_flags
& I8K_HWMON_HAVE_TEMP2
))
603 if (index
== 3 && !(i8k_hwmon_flags
& I8K_HWMON_HAVE_TEMP3
))
605 if (index
== 4 && !(i8k_hwmon_flags
& I8K_HWMON_HAVE_TEMP4
))
607 if (index
>= 5 && index
<= 7 &&
608 !(i8k_hwmon_flags
& I8K_HWMON_HAVE_FAN1
))
610 if (index
>= 8 && index
<= 10 &&
611 !(i8k_hwmon_flags
& I8K_HWMON_HAVE_FAN2
))
617 static const struct attribute_group i8k_group
= {
619 .is_visible
= i8k_is_visible
,
621 __ATTRIBUTE_GROUPS(i8k
);
623 static int __init
i8k_init_hwmon(void)
629 /* CPU temperature attributes, if temperature reading is OK */
630 err
= i8k_get_temp(0);
632 i8k_hwmon_flags
|= I8K_HWMON_HAVE_TEMP1
;
633 /* check for additional temperature sensors */
634 err
= i8k_get_temp(1);
636 i8k_hwmon_flags
|= I8K_HWMON_HAVE_TEMP2
;
637 err
= i8k_get_temp(2);
639 i8k_hwmon_flags
|= I8K_HWMON_HAVE_TEMP3
;
640 err
= i8k_get_temp(3);
642 i8k_hwmon_flags
|= I8K_HWMON_HAVE_TEMP4
;
644 /* Left fan attributes, if left fan is present */
645 err
= i8k_get_fan_status(I8K_FAN_LEFT
);
647 i8k_hwmon_flags
|= I8K_HWMON_HAVE_FAN1
;
649 /* Right fan attributes, if right fan is present */
650 err
= i8k_get_fan_status(I8K_FAN_RIGHT
);
652 i8k_hwmon_flags
|= I8K_HWMON_HAVE_FAN2
;
654 i8k_hwmon_dev
= hwmon_device_register_with_groups(NULL
, "i8k", NULL
,
656 if (IS_ERR(i8k_hwmon_dev
)) {
657 err
= PTR_ERR(i8k_hwmon_dev
);
658 i8k_hwmon_dev
= NULL
;
659 pr_err("hwmon registration failed (%d)\n", err
);
665 static struct dmi_system_id i8k_dmi_table
[] __initdata
= {
667 .ident
= "Dell Inspiron",
669 DMI_MATCH(DMI_SYS_VENDOR
, "Dell Computer"),
670 DMI_MATCH(DMI_PRODUCT_NAME
, "Inspiron"),
674 .ident
= "Dell Latitude",
676 DMI_MATCH(DMI_SYS_VENDOR
, "Dell Computer"),
677 DMI_MATCH(DMI_PRODUCT_NAME
, "Latitude"),
681 .ident
= "Dell Inspiron 2",
683 DMI_MATCH(DMI_SYS_VENDOR
, "Dell Inc."),
684 DMI_MATCH(DMI_PRODUCT_NAME
, "Inspiron"),
688 .ident
= "Dell Latitude 2",
690 DMI_MATCH(DMI_SYS_VENDOR
, "Dell Inc."),
691 DMI_MATCH(DMI_PRODUCT_NAME
, "Latitude"),
694 { /* UK Inspiron 6400 */
695 .ident
= "Dell Inspiron 3",
697 DMI_MATCH(DMI_SYS_VENDOR
, "Dell Inc."),
698 DMI_MATCH(DMI_PRODUCT_NAME
, "MM061"),
702 .ident
= "Dell Inspiron 3",
704 DMI_MATCH(DMI_SYS_VENDOR
, "Dell Inc."),
705 DMI_MATCH(DMI_PRODUCT_NAME
, "MP061"),
709 .ident
= "Dell Precision",
711 DMI_MATCH(DMI_SYS_VENDOR
, "Dell Inc."),
712 DMI_MATCH(DMI_PRODUCT_NAME
, "Precision"),
716 .ident
= "Dell Vostro",
718 DMI_MATCH(DMI_SYS_VENDOR
, "Dell Inc."),
719 DMI_MATCH(DMI_PRODUCT_NAME
, "Vostro"),
723 .ident
= "Dell XPS421",
725 DMI_MATCH(DMI_SYS_VENDOR
, "Dell Inc."),
726 DMI_MATCH(DMI_PRODUCT_NAME
, "XPS L421X"),
730 .ident
= "Dell Studio",
732 DMI_MATCH(DMI_SYS_VENDOR
, "Dell Inc."),
733 DMI_MATCH(DMI_PRODUCT_NAME
, "Studio"),
735 .driver_data
= (void *)1, /* fan multiplier override */
738 .ident
= "Dell XPS M140",
740 DMI_MATCH(DMI_SYS_VENDOR
, "Dell Inc."),
741 DMI_MATCH(DMI_PRODUCT_NAME
, "MXC051"),
743 .driver_data
= (void *)1, /* fan multiplier override */
749 * Probe for the presence of a supported laptop.
751 static int __init
i8k_probe(void)
753 const struct dmi_system_id
*id
;
756 * Get DMI information
758 if (!dmi_check_system(i8k_dmi_table
)) {
759 if (!ignore_dmi
&& !force
)
762 pr_info("not running on a supported Dell system.\n");
763 pr_info("vendor=%s, model=%s, version=%s\n",
764 i8k_get_dmi_data(DMI_SYS_VENDOR
),
765 i8k_get_dmi_data(DMI_PRODUCT_NAME
),
766 i8k_get_dmi_data(DMI_BIOS_VERSION
));
769 strlcpy(bios_version
, i8k_get_dmi_data(DMI_BIOS_VERSION
),
770 sizeof(bios_version
));
771 strlcpy(bios_machineid
, i8k_get_dmi_data(DMI_PRODUCT_SERIAL
),
772 sizeof(bios_machineid
));
775 * Get SMM Dell signature
777 if (i8k_get_dell_signature(I8K_SMM_GET_DELL_SIG1
) &&
778 i8k_get_dell_signature(I8K_SMM_GET_DELL_SIG2
)) {
779 pr_err("unable to get SMM Dell signature\n");
784 i8k_fan_mult
= fan_mult
;
785 id
= dmi_first_match(i8k_dmi_table
);
786 if (id
&& fan_mult
== I8K_FAN_MULT
&& id
->driver_data
)
787 i8k_fan_mult
= (unsigned long)id
->driver_data
;
792 static int __init
i8k_init(void)
794 struct proc_dir_entry
*proc_i8k
;
797 /* Are we running on an supported laptop? */
801 /* Register the proc entry */
802 proc_i8k
= proc_create("i8k", 0, NULL
, &i8k_fops
);
806 err
= i8k_init_hwmon();
808 goto exit_remove_proc
;
813 remove_proc_entry("i8k", NULL
);
817 static void __exit
i8k_exit(void)
819 hwmon_device_unregister(i8k_hwmon_dev
);
820 remove_proc_entry("i8k", NULL
);
823 module_init(i8k_init
);
824 module_exit(i8k_exit
);