kirkwood: add support for NETGEAR ReadyNAS Duo v2
[openwrt/openwrt.git] / target / linux / kirkwood / base-files / etc / init.d / hwmon_fancontrol
index ec85b56ca16c7fd656ee14b4132d2d3d06ec43c1..1bd086a489f63c823cbf9bd3f286d293a311c533 100755 (executable)
@@ -3,7 +3,7 @@
 START=98
 
 boot() {
-       # configuring (lm85/lm63) onboard temp/fan controller to run the fan on its own
+       # configuring onboard temp/fan controller to run the fan on its own
        # for more information, please read https://www.kernel.org/doc/Documentation/hwmon/sysfs-interface
 
        case $(board_name) in
@@ -18,6 +18,10 @@ boot() {
                path_to_hwmon='/sys/class/hwmon/hwmon0'
                echo 2 > "$path_to_hwmon/pwm1_enable" # fan is on pwm1
                ;;
+       netgear,readynas-duo-v2)
+               path_to_hwmon='/sys/class/hwmon/hwmon0'
+               echo 1200 > "$path_to_hwmon/fan1_target" # set target rpm
+               ;;
        seagate,blackarmor-nas220)
                path_to_hwmon='/sys/devices/platform/ocp@f1000000/f1011000.i2c/i2c-0/0-002e/hwmon/hwmon0'
                # adt7476 fan control chip. 3 temp sensors. Set to 1/4 speed at 35C and max speed at 48C.