ADT7462 can operate in manual mode for fan control.
Currently if we want to read fan speed,
there is a check if TACH measurement is enabled for a fan.
(In fan_enabled function).
There is no way to enable TACH measurement currently.
This is addressed in this commit.
Along with the above support few more features are enabled
- Support for setting fan presence.
- Support for setting low and high frequency mode.
- Support for setting easy config option.
- Support for setting the duration of the fan startup timeout.
- Once the setting is done, there is a setup complete bit in cfg1 register.
Settings this bit will start the monitoring of all selected channels.
Added support for that.
Based on this, below is the flow to set/get fan speed (example:pwm1)
echo 1 > pwm1_enable #Set to manual mode
echo 1 > pwm_freq_mode #High freq mode (optional.newly added)
echo 1 > fan1_presence #Set fan 1 as present(newly added)
echo 1 > fan1_tach_enable #Start TACH measurement-fan1(newly added)
echo 1 > setup_complete #Mark as setup complete (newly added)