mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
To: Manaf Meethalavalappu Pallikunhi
	<manaf.pallikunhi@oss.qualcomm.com>,
	Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	"Rafael J. Wysocki" <rafael@kernel.org>,
	Bjorn Andersson <andersson@kernel.org>,
	Konrad Dybcio <konradybcio@kernel.org>,
	Daniel Lezcano <daniel.lezcano@oss.qualcomm.com>
Cc: Gaurav Kohli <gaurav.kohli@oss.qualcomm.com>,
	linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org
Subject: Re: [PATCH v2 2/3] powercap: qcom: Add SPEL powercap driver
Date: Tue, 23 Jun 2026 13:11:29 +0200	[thread overview]
Message-ID: <22e0ab27-4b80-4a08-9d3f-919014e741bb@oss.qualcomm.com> (raw)
In-Reply-To: <298cf2f5-64eb-4430-b264-0d046df14dbf@oss.qualcomm.com>

On 6/23/26 12:58 PM, Manaf Meethalavalappu Pallikunhi wrote:
> Hi Konrad,
> 
> 
> On 6/22/2026 4:31 PM, Konrad Dybcio wrote:
>> On 6/19/26 10:39 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@oss.qualcomm.com>
>>> ---

[...]

>>> +/* Domain configuration */
>>> +static const struct spel_domain_info domain_info[SPEL_DOMAIN_MAX] = {
>>> +    [SPEL_DOMAIN_SYS]    = { "sys", 0x40 },
>>> +    [SPEL_DOMAIN_SOC]    = { "soc", 0x00 },
>>> +    [SPEL_DOMAIN_CL0]    = { "cl0", 0x5c },
>>> +    [SPEL_DOMAIN_CL1]    = { "cl1", 0x60 },
>>> +    [SPEL_DOMAIN_CL2]    = { "cl2", 0x64 },
>>> +    [SPEL_DOMAIN_IGPU]    = { "igpu", 0x08 },
>>> +    [SPEL_DOMAIN_DGPU]    = { "dgpu", 0x44 },
>>> +    [SPEL_DOMAIN_NSP]    = { "nsp", 0x0c },
>>> +    [SPEL_DOMAIN_MMCX]    = { "mmcx", 0x10 },
>>> +    [SPEL_DOMAIN_INFRA]    = { "infra", 0x18 },
>>> +    [SPEL_DOMAIN_DRAM]    = { "dram", 0x1c },
>>> +    [SPEL_DOMAIN_MDM]    = { "mdm", 0x48 },
>>> +    [SPEL_DOMAIN_WLAN]    = { "wlan", 0x4c },
>>> +    [SPEL_DOMAIN_USB1]    = { "usb1", 0x50 },
>>> +    [SPEL_DOMAIN_USB2]    = { "usb2", 0x54 },
>>> +    [SPEL_DOMAIN_USB3]    = { "usb3", 0x58 },
>>> +};
>>
>> I would expect that the names are going to stay common, but the offsets
> 
> Names also can be different here. For example, hawi, It has only subset of these domain and it doesn't have dgpu, it has only "gpu". cpu domain
> names also different there.

Presumably we can unify the names (i.e. use SPEL_DOMAIN_IGPU on both
hawi and glymur)

> 
>> will be different. This array should probably be called
>> glymur_domain_info[]. We may have another LUT just for names of indices
> 
> ACK for glymur_domain_info.
>> (i.e. [SPEL_DOMAIN_xxx] = "xxx")

This approach would still save us quite some bytes for the names that are
the same

i.e.

foobar_names_lut[] = {
	[SPEL_DOMAIN_xxx] = "xxx",
	[SPEL_DOMAIN_yyy] = "yyy",
	[SPEL_DOMAIN_zzz] = "zzz"
};

glymur_domain_offsets[] = {
	[SPEL_DOMAIN_xxx] = 0x20,
	[SPEL_DOMAIN_yyy] = 0x24,
	[SPEL_DOMAIN_zzz] = 0x28
};

Konrad

  reply	other threads:[~2026-06-23 11:11 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-19 20:39 [PATCH v2 0/3] Add Qualcomm " Manaf Meethalavalappu Pallikunhi
2026-06-19 20:39 ` [PATCH v2 1/3] dt-bindings: power: limits: Describe Qualcomm SPEL hardware Manaf Meethalavalappu Pallikunhi
2026-06-22 11:02   ` Konrad Dybcio
2026-06-22 15:11     ` Manaf Meethalavalappu Pallikunhi
2026-06-22 12:28   ` Krzysztof Kozlowski
2026-06-23  9:47     ` Manaf Meethalavalappu Pallikunhi
2026-06-24 10:45       ` Krzysztof Kozlowski
2026-06-24 20:41         ` Daniel Lezcano
2026-06-25  6:45           ` Krzysztof Kozlowski
2026-06-19 20:39 ` [PATCH v2 2/3] powercap: qcom: Add SPEL powercap driver Manaf Meethalavalappu Pallikunhi
2026-06-22 11:01   ` Konrad Dybcio
2026-06-23 10:58     ` Manaf Meethalavalappu Pallikunhi
2026-06-23 11:11       ` Konrad Dybcio [this message]
2026-06-19 20:39 ` [PATCH v2 3/3] arm64: dts: qcom: glymur: Enable " Manaf Meethalavalappu Pallikunhi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=22e0ab27-4b80-4a08-9d3f-919014e741bb@oss.qualcomm.com \
    --to=konrad.dybcio@oss.qualcomm.com \
    --cc=andersson@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=daniel.lezcano@oss.qualcomm.com \
    --cc=devicetree@vger.kernel.org \
    --cc=gaurav.kohli@oss.qualcomm.com \
    --cc=konradybcio@kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=manaf.pallikunhi@oss.qualcomm.com \
    --cc=rafael@kernel.org \
    --cc=robh@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome