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

sashiko-bot at kernel.org sashiko-bot at kernel.org
Wed Sep 2 06:13:53 PDT 2026


> From: Ronald Claveau <linux-kernel-dev at aliel.fr>
> 
> Read the fan register and level table from platform_data (fan_reg,
> levels[] and nlevels) instead of hardcoding a single register and
> level count, as new MCUs need different values. 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>

Sashiko has reviewed this patch and found no issues. It looks great!

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260902-add-mcu-fan-khadas-vim4-v11-0-5f1610d83bf0@aliel.fr?part=4




More information about the linux-amlogic mailing list