mvebu: puzzle: fix fan thermal cooling driver
authorDaniel Golle <daniel@makrotopia.org>
Sat, 25 Feb 2023 02:35:16 +0000 (02:35 +0000)
committerDaniel Golle <daniel@makrotopia.org>
Sat, 25 Feb 2023 19:01:40 +0000 (19:01 +0000)
commitea33a5def506b0ba647f779e60e6ccca03c29a17
treeee9521ebb962fa93aa05afac98deb8f090542170
parent2a104365dc50e3df5d63809aee16497402278f02
mvebu: puzzle: fix fan thermal cooling driver

Several fixes for the Puzzle WT61P803 hwmon driver were needed to make
it behave well as thermal cooling device:
 - wire-up cooling device with OF node in device tree
 - properly parse cooling-levels (u32 with range check vs. u8)
 - actually use cooling-levels
 - keep current state and only write to uC if state has changed
   (avoids flooding the uC with commands which will result in uC crashing)

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
target/linux/mvebu/patches-5.10/903-drivers-hwmon-Add-the-IEI-WT61P803-PUZZLE-HWMON-driv.patch
target/linux/mvebu/patches-5.15/903-drivers-hwmon-Add-the-IEI-WT61P803-PUZZLE-HWMON-driv.patch