]> git.baikalelectronics.ru Git - kernel.git/commit
mt76: mt7915: add thermal cooling device support
authorRyder Lee <ryder.lee@mediatek.com>
Fri, 23 Apr 2021 22:02:05 +0000 (06:02 +0800)
committerFelix Fietkau <nbd@nbd.name>
Sat, 19 Jun 2021 07:22:45 +0000 (09:22 +0200)
commitac0e78ccdf4cf2902dd2685b6229c3ef1c149c65
tree1c362e0c61a3d14b3ea828f1ce5b336f848fc8b1
parentd9c28bbf7830723fd6d020b037bd2937d0675f73
mt76: mt7915: add thermal cooling device support

Thermal cooling device support is added to control the temperature by
throttling the data transmission for the given duration. Throttling is
done by adjusting Tx period by given percentage of time. The thermal
device allows user to configure duty cycle.

Throttling can be disabled by setting the duty cycle to 0. The cooling
device can be found under /sys/class/thermal/cooling_deviceX/.
Corresponding soft link to this device can be found under phy folder

To set duty cycle as 80%,
echo 80 > /sys/class/ieee80211/phy*/cooling_device/cur_state

Signed-off-by: Ryder Lee <ryder.lee@mediatek.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
drivers/net/wireless/mediatek/mt76/mt7915/init.c
drivers/net/wireless/mediatek/mt76/mt7915/mcu.c
drivers/net/wireless/mediatek/mt76/mt7915/mcu.h
drivers/net/wireless/mediatek/mt76/mt7915/mt7915.h