forked from openwrt/openwrt
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
qualcommax: ipq807x: set thermal governor to Bang Bang for Zyxel NBG7815
Add boot script to set a better thermal governor for Zyxel NBG7815 that makes use of a Fan to cool down the device. Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
- Loading branch information
Showing
2 changed files
with
17 additions
and
0 deletions.
There are no files selected for viewing
16 changes: 16 additions & 0 deletions
16
target/linux/qualcommax/ipq807x/base-files/etc/init.d/thermal_fan_policy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#!/bin/sh /etc/rc.common | ||
|
||
START=99 | ||
|
||
boot() { | ||
case $(board_name) in | ||
zyxel_nbg7815) | ||
# get correct thermal zone defined in DTS | ||
aqr_thermal=$(grep -Ril "aqr-thermal" /sys/class/thermal/thermal_zone*/type | cut -d'/' -f 5) | ||
tmp103_thermal=$(grep -Ril "tmp103-thermal" /sys/class/thermal/thermal_zone*/type | cut -d'/' -f 5) | ||
# setting thermal governor from step_wise to bang_bang | ||
echo "bang_bang" > /sys/class/thermal/${aqr_thermal}/policy | ||
echo "bang_bang" > /sys/class/thermal/${tmp103_thermal}/policy | ||
;; | ||
esac | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters