summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorRonald Claveau <linux-kernel-dev@aliel.fr>2026-09-17 09:59:03 +0200
committerLee Jones <lee@kernel.org>2026-09-23 12:01:27 +0100
commitdad6f7897a93b4e1614664dbbcae0f61e57d1ac0 (patch)
tree70ef2b98d58223a3da3bacd553c88a900670729d /include/linux
parentc94c97f8c97e684d44ef5483d7f2ad6b3dfa55ac (diff)
thermal: khadas-mcu-fan: Add fan config from platform data Add regulator support
Introduce platform name, control register and duty-cycle levels per variant. VIM4 uses a different register and level set (0-100) declared as a list (0, 30, 40, 55, 75, 100) compared to previous boards (0-3). MAX_LEVEL is kept and bumped from 3 to 5 to make the speed change more gradual with the newer MCUs. The cooling device's state is stored as an index into levels[], and khadas_mcu_fan_set_level() writes levels[state] to fan_reg, rather than writing the raw state value as before. Optionally acquire and enable a "fan" regulator supply at probe time and on resume, so boards that gate fan power through a regulator are handled. The regulator is released via a devm_add_action_or_reset() callback. Signed-off-by: Ronald Claveau <linux-kernel-dev@aliel.fr> Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org> Acked-by: Daniel Lezcano <daniel.lezcano@oss.qualcomm.com> Link: https://patch.msgid.link/20260917-add-mcu-fan-khadas-vim4-v12-4-497cd543a148@aliel.fr Signed-off-by: Lee Jones <lee@kernel.org>
Diffstat (limited to 'include/linux')
0 files changed, 0 insertions, 0 deletions