Re: [PATCH 0/5] I8K driver facelift
From: Valdis . Kletnieks
Date: Thu Mar 17 2005 - 09:51:40 EST
On Wed, 16 Mar 2005 14:38:50 MST, Frank Sorenson said:
> Okay, I replaced the sysfs_ops with ops of my own, and now all the show
> and store functions also accept the name of the attribute as a parameter.
> This lets the functions know what attribute is being accessed, and allows
> us to create attributes that share show and store functions, so things
> don't need to be defined at compile time (I feel slightly evil!).
>
> This patch puts the correct number of temp sensors and fans into sysfs,
> and only exposes power_status if enabled by the power_status module
> parameter.
Works for me:
[/sys/bus/platform/drivers/i8k/i8k]2 ls -l
total 0
lrwxrwxrwx 1 root root 0 Mar 17 03:02 bus -> ../../../bus/platform
-r--r--r-- 1 root root 4096 Mar 17 03:02 cpu_temp
-rw-r--r-- 1 root root 4096 Mar 17 03:01 detach_state
lrwxrwxrwx 1 root root 0 Mar 17 03:02 driver -> ../../../bus/platform/drivers/i8k
-r--r--r-- 1 root root 4096 Mar 17 03:02 fan1_speed
-rw-r--r-- 1 root root 4096 Mar 17 03:02 fan1_state
-r--r--r-- 1 root root 4096 Mar 17 03:02 fan2_speed
-rw-r--r-- 1 root root 4096 Mar 17 03:02 fan2_state
drwxr-xr-x 2 root root 0 Mar 17 03:02 power
-r--r--r-- 1 root root 4096 Mar 17 03:02 power_status
-r--r--r-- 1 root root 4096 Mar 17 03:02 temp1
-r--r--r-- 1 root root 4096 Mar 17 03:02 temp2
The valyes of the fan* settings, and cpu_temp match what's reported in /proc/i8k.
temp1 is the same as cpu_temp. temp2 is running about 7C higher and
is still unidentified (though probably the NVidia chip).
I'll give Dmitry's sysfs/array stuff a test tomorrow-ish unless Greg has
comments before then.
Attachment:
pgp00000.pgp
Description: PGP signature