store_pwm: set zhuan shu, { 0x109, 0x209, 0x309 }. linux driver read speed from this REG also(nct6775_update_pwm). Strange, for pwm num is 3, but fan num is 5.
store_pwm_enable: NCT6775_REG_FAN_MODE, { 0x102, 0x202, 0x302 }. In linux driver, it get value and then set back. So we should get all possible value at first.
1->manual
2->thermal cruise mode (also called SmartFan I)
3->fan speed cruise mode
4->variable thermal cruise (also called
SmartFan III)
5->enhanced variable thermal cruise (also called
SmartFan IV)
store_pwm_mode: W83627EHF_REG_PWM_ENABLE. In Open Hardware no one like this.
0->DC variable voltage,1->PWM variable duty cycle
has no difference for w83627 and nct6776f. No need for nct6776f? If you want to read value for ref, check method nct6775_update_pwm then you know how to write it.
-------------------------------------
http://www.nuvoton.com/hq/enu/ProductAndSales/ProductLines/ComputerIC/SuperIO/LPCSuperIOforDesktopAndServer/Documents/W83627DHG-P_W83627DHG-PT.pdf datasheet of other chip
8.6.2 fan control. each pin has 2 type: pwm or dc
--------------------------------------
static struct sensor_device_attribute sda_pwm[] = {
SENSOR_ATTR(pwm1, S_IWUSR | S_IRUGO, show_pwm, store_pwm, 0),
SENSOR_ATTR(pwm2, S_IWUSR | S_IRUGO, show_pwm, store_pwm, 1),
SENSOR_ATTR(pwm3, S_IWUSR | S_IRUGO, show_pwm, store_pwm, 2),
SENSOR_ATTR(pwm4, S_IWUSR | S_IRUGO, show_pwm, store_pwm, 3),
};
what's pwm1,pwm2? defined in fancontrol configuration?
---------------------------------------------------------------
now I can set speed manually. Then how to control in GUI? There is an tool called Fan control(http://mr21.in/software/macbook-pro-fan-control.html) which used in Macbook Pro. So there is an standard interface to access smc?
user client http://developer.apple.com/library/mac/#documentation/DeviceDrivers/Conceptual/AccessingHardware/AH_IOKitLib_API/AH_IOKitLib_API.html#//apple_ref/doc/uid/TP30000380-TPXREF116