Re: [PATCH 2/3] powercap: qcom: Add SPEL powercap driver
From: Konrad Dybcio
Date: Tue Jun 09 2026 - 09:34:31 EST
On 6/9/26 3:23 PM, Manaf Meethalavalappu Pallikunhi wrote:
> Hi Konrad,
>
>
> On 5/21/2026 4:46 PM, Konrad Dybcio wrote:
>> On 5/19/26 12:49 PM, Manaf Meethalavalappu Pallikunhi wrote:
>>> The Qualcomm SoC Power and Electrical Limits (SPEL) provides hardware
>>> based power monitoring and limiting capabilities for various power
>>> domains including System, SoC, CPU clusters, GPU, and various other
>>> subsystems.
>>>
>>> The driver integrates with the Linux powercap framework, exposing SPEL
>>> capabilities through powercap sysfs interfaces.
>>>
>>> Signed-off-by: Manaf Meethalavalappu Pallikunhi <manaf.pallikunhi@xxxxxxxxxxxxxxxx>
>>> ---
[...]
>>> +static void spel_remove(struct platform_device *pdev)
>>> +{
>>> + struct spel_system *sp = platform_get_drvdata(pdev);
>>> + int i;
>>> +
>>> + if (!sp)
>>> + return;
>>> +
>>> + /* Unregister in reverse order: children first, then SOC, then SYS */
>>> + for (i = SPEL_DOMAIN_MAX - 1; i >= 0; i--)
>>> + powercap_unregister_zone(sp->control_type, &sp->domains[i].power_zone);
>>
>> Could you try adding a devm_ variant of these register functions?
>
> Powercap framework doesn't support any devm_* API, you meant add this support in framework in this series ?
Yes, this should be fairly trivial - look at e.g.
drivers/regulator/devres.c : devm_of_regulator_get
Konrad