Re: acpithinkpad(4) fan control - sysctl callback in kernel?

2010-11-30 Thread Christopher Zimmermann
On 11/22/10 23:01, joshua stein wrote:
 as for code implementing the sysctl, it would probably be something
 created under machdep, like the recently added machdep.lidsuspend.

Thanks for your code. It helped me to do a first test of the fan control
on my T43. It reacts strangely (regulates fan speed on only 3 steps from
3000 to 4000 rpm).

Still I'd like to implement a sysctl interface. The example of
lid_suspend did not help much. I need something like a callback when
userspace changes the sysctl variable. Is this possible? Or should I do
it like it is done for lid_suspend and regularly poll the variable?


Christopher



Re: acpithinkpad(4) fan control - sysctl callback in kernel?

2010-11-30 Thread Stuart Henderson
On 2010/11/30 09:10, Christopher Zimmermann wrote:
 Still I'd like to implement a sysctl interface. The example of
 lid_suspend did not help much. I need something like a callback when
 userspace changes the sysctl variable. Is this possible? Or should I do
 it like it is done for lid_suspend and regularly poll the variable?

Look at ddb.trigger (DBCTL_TRIGGER).