aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/kirkwood/base-files
diff options
context:
space:
mode:
authorSungbo Eo <mans0n@gorani.run>2020-02-24 00:17:16 +0900
committerAdrian Schmutzler <freifunk@adrianschmutzler.de>2020-02-24 01:22:26 +0100
commit7e9c7e7b2d4c36734912074aa1c19acea8f3801a (patch)
tree128fcb20bd3a3d997bc58d71314434db68eed216 /target/linux/kirkwood/base-files
parent3124c9afe32d80f8068777bec0ed785cc85a6738 (diff)
downloadupstream-7e9c7e7b2d4c36734912074aa1c19acea8f3801a.tar.gz
upstream-7e9c7e7b2d4c36734912074aa1c19acea8f3801a.tar.bz2
upstream-7e9c7e7b2d4c36734912074aa1c19acea8f3801a.zip
kirkwood: tidy up hwmon_fancontrol
Add indent and sort board_name alphabetically. Sourcing /lib/functions.sh is already handled by /etc/rc.common. Drop the line. Signed-off-by: Sungbo Eo <mans0n@gorani.run>
Diffstat (limited to 'target/linux/kirkwood/base-files')
-rwxr-xr-xtarget/linux/kirkwood/base-files/etc/init.d/hwmon_fancontrol33
1 files changed, 16 insertions, 17 deletions
diff --git a/target/linux/kirkwood/base-files/etc/init.d/hwmon_fancontrol b/target/linux/kirkwood/base-files/etc/init.d/hwmon_fancontrol
index 0adc5d0726..a0e3de062b 100755
--- a/target/linux/kirkwood/base-files/etc/init.d/hwmon_fancontrol
+++ b/target/linux/kirkwood/base-files/etc/init.d/hwmon_fancontrol
@@ -1,23 +1,22 @@
#!/bin/sh /etc/rc.common
START=98
-boot() {
-. /lib/functions.sh
-#configuring (lm85/lm63) 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
+boot() {
+ # configuring (lm85/lm63) 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
-zyxel,nsa310b)
- path_to_hwmon='/sys/devices/platform/ocp@f1000000/f1011000.i2c/i2c-0/0-002e/hwmon/hwmon0'
- 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
- ;;
-iom,ix2-200)
- path_to_hwmon='/sys/class/hwmon/hwmon0'
- echo 2 > "$path_to_hwmon/pwm1_enable" # fan is on pwm1
- ;;
-esac
+ case $(board_name) in
+ iom,ix2-200)
+ path_to_hwmon='/sys/class/hwmon/hwmon0'
+ echo 2 > "$path_to_hwmon/pwm1_enable" # fan is on pwm1
+ ;;
+ zyxel,nsa310b)
+ path_to_hwmon='/sys/devices/platform/ocp@f1000000/f1011000.i2c/i2c-0/0-002e/hwmon/hwmon0'
+ 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
+ ;;
+ esac
}