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

[email protected]
Newsgroups org.kernel.vger.linux-i2c,dev.linux.lists.mfd,org.infradead.lists.linux-amlogic,org.infradead.lists.linux-arm-kernel,org.kernel.vger.linux-devicetree,org.kernel.vger.linux-kernel,org.kernel.vger.linux-pm
Message-ID <[email protected]>
On 8/7/26 4:34 AM, Daniel Lezcano wrote:
> On 8/5/26 10:06, Ronald Claveau via B4 Relay wrote:
>> From: Ronald Claveau <[email protected]>
>>
>> Replace the hardcoded MAX_LEVEL constant and fan register
>> with values read from platform_data (fan_reg, levels[] and nlevels),
>> as new MCUs need different values.
>>
>> 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.
>>
>> Reviewed-by: Neil Armstrong <[email protected]>
>> Signed-off-by: Ronald Claveau <[email protected]>
>> ---
> 
>  * Through which tree this patch should go ? (assuming there is a
> dependency on other patches)
> 

I think this patch should go through MFD as this patch depends on it.

>  * How this will behave with 100 levels with the step wise governor ?
> For a 100ms passive delay and 100 states, it will take 10s before
> reaching the full speed

Yes the VIM4 MCU accept values from 0 to 100, but here I'm giving a list
which is (0, 30, 40, 55, 75, 100), so 5 steps to full speed.

-- 
Best regards,
Ronald
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.