Re: [PATCH 2/3] powercap: qcom: Add SPEL powercap driver

From: Konrad Dybcio

Date: Thu May 21 2026 - 07:19:27 EST


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 const char *const spel_domain_names[] = {
> + "sys", "soc", "cl0", "cl1", "cl2", "igpu", "dgpu", "nsp",
> + "mmcx", "infra", "dram", "mdm", "wlan", "usb1", "usb2", "usb3",
> +};

If the domain data is not going to change for future platforms (but
e.g. only the offsets will), which I doubt, please use designated
initializers

Otherwise, please coalesce the names and offsets in a struct

Konrad