Skip to content

Commit

Permalink
qualcommax: ipq807x: set thermal governor to Bang Bang for Zyxel NBG7815
Browse files Browse the repository at this point in the history
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
Ansuel committed May 15, 2024
1 parent bea26db commit b82be94
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
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
}
1 change: 1 addition & 0 deletions target/linux/qualcommax/ipq807x/config-default
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,4 @@ CONFIG_SPMI=y
# CONFIG_SPMI_HISI3670 is not set
CONFIG_SPMI_MSM_PMIC_ARB=y
# CONFIG_SPMI_PMIC_CLKDIV is not set
CONFIG_THERMAL_GOV_BANG_BANG=y

0 comments on commit b82be94

Please sign in to comment.