amlogic: fix cputemp for AMLG12 devices

This commit is contained in:
chewitt 2019-07-02 21:33:46 +00:00
parent 5b5c8a0cc0
commit 5421539136

View File

@ -3,6 +3,14 @@
# SPDX-License-Identifier: GPL-2.0
# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)
TEMP=$(cat /sys/class/hwmon/hwmon0/temp1_input)
case $(dtsoc) in
amlogic,g12*)
TEMP=$(cat /sys/devices/virtual/thermal/thermal_zone1/temp)
;;
*)
TEMP=$(cat /sys/class/hwmon/hwmon0/temp1_input)
;;
esac
TEMP="$(( $TEMP / 1000 ))"
echo "${TEMP} C"