[PATCH v12 4/6] thermal: khadas-mcu-fan: Add fan config from platform data Add regulator support

Daniel Lezcano daniel.lezcano at oss.qualcomm.com
Fri Sep 18 02:12:29 PDT 2026


On 9/17/26 09:59, Ronald Claveau via B4 Relay wrote:
> From: Ronald Claveau <linux-kernel-dev at aliel.fr>
> 
> 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.
> 
> Reviewed-by: Neil Armstrong <neil.armstrong at linaro.org>
> Signed-off-by: Ronald Claveau <linux-kernel-dev at aliel.fr>
> ---
Acked-by: Daniel Lezcano <daniel.lezcano at oss.qualcomm.com>



More information about the linux-amlogic mailing list