You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
808 B
24 lines
808 B
8 years ago
|
#!/bin/sh /etc/rc.common
|
||
|
|
||
|
START=98
|
||
|
boot() {
|
||
|
. /lib/functions.sh
|
||
|
|
||
6 years ago
|
#configuring (lm85/lm63) onboard temp/fan controller to run the fan on its own
|
||
8 years ago
|
#for more information, please read https://www.kernel.org/doc/Documentation/hwmon/sysfs-interface
|
||
|
|
||
7 years ago
|
case $(board_name) in
|
||
6 years ago
|
zyxel,nsa310b)
|
||
|
path_to_hwmon='/sys/devices/platform/ocp@f1000000/f1011000.i2c/i2c-0/0-002e/hwmon/hwmon0'
|
||
8 years ago
|
echo 2 > "$path_to_hwmon/pwm1_enable" # fan is on pwm1
|
||
|
echo 1 > "$path_to_hwmon/pwm1_auto_channels" # temp1 is the only one that changes
|
||
|
echo 23000 > "$path_to_hwmon/temp1_auto_temp_min"
|
||
|
echo 43000 > "$path_to_hwmon/temp1_auto_temp_max" # next step is 49600 millicelsius, or 50 celsius, 43 celsius is better
|
||
6 years ago
|
;;
|
||
|
iom,ix2-200)
|
||
|
path_to_hwmon='/sys/class/hwmon/hwmon0'
|
||
|
echo 2 > "$path_to_hwmon/pwm1_enable" # fan is on pwm1
|
||
|
;;
|
||
8 years ago
|
esac
|
||
|
}
|