[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <8555840a-5cbe-4650-9499-f3876528891b@oss.qualcomm.com>
Date: Sat, 21 Jun 2025 11:52:16 +0200
From: Konrad Dybcio <konrad.dybcio@....qualcomm.com>
To: Anjelique Melendez <anjelique.melendez@....qualcomm.com>, amitk@...nel.org,
thara.gopinath@...il.com, rafael@...nel.org, daniel.lezcano@...aro.org
Cc: rui.zhang@...el.com, lukasz.luba@....com, david.collins@....qualcomm.com,
stefan.schmidt@...aro.org, quic_tsoni@...cinc.com,
linux-arm-msm@...r.kernel.org, linux-pm@...r.kernel.org,
linux-kernel@...r.kernel.org, dmitry.baryshkov@...aro.org,
dmitry.baryshkov@....qualcomm.com
Subject: Re: [PATCH v5 4/5] thermal: qcom-spmi-temp-alarm: add support for
GEN2 rev 2 PMIC peripherals
On 6/20/25 2:19 AM, Anjelique Melendez wrote:
> Add support for TEMP_ALARM GEN2 PMIC peripherals with digital major
> revision 2. This revision utilizes individual temp DAC registers
> to set the threshold temperature for over-temperature stages 1 (warning),
> 2 (system shutdown), and 3 (emergency shutdown) instead of a single
> register to specify a set of thresholds.
>
> Signed-off-by: David Collins <david.collins@....qualcomm.com>
A lone s-o-b from a non-author, without a c-d-b or similar is
ambiguous
[...]
> /*
> * This function intializes the internal temp value based on only the
> * current thermal stage and threshold.
> @@ -486,6 +620,8 @@ static int qpnp_tm_probe(struct platform_device *pdev)
> chip->subtype = subtype;
> if (subtype == QPNP_TM_SUBTYPE_GEN1)
> chip->data = &spmi_temp_alarm_data;
> + else if (subtype == QPNP_TM_SUBTYPE_GEN2 && dig_major >= 2)
> + chip->data = &spmi_temp_alarm_gen2_rev2_data;
> else if (subtype == QPNP_TM_SUBTYPE_GEN2 && dig_major >= 1)
> chip->data = &spmi_temp_alarm_gen2_rev1_data;
how about:
if (subtype == ..GEN1)
...
else if (subtype == GEN2 && dig_major == 0)
...
else if (subtype == GEN2 && dig_major == 1)
...
else if (subtype == GEN2 && dig_major == (>=?) 2)
...
else
ENODEV
Konrad
Powered by blists - more mailing lists