From: Jonathan Cameron <jic23@kernel.org>
To: Satya Priya Kakitapalli <quic_skakitap@quicinc.com>
Cc: "Rafael J. Wysocki" <rafael@kernel.org>,
Daniel Lezcano <daniel.lezcano@linaro.org>,
Zhang Rui <rui.zhang@intel.com>,
Lukasz Luba <lukasz.luba@arm.com>, Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Lars-Peter Clausen <lars@metafoo.de>, Lee Jones <lee@kernel.org>,
Stephen Boyd <sboyd@kernel.org>, Amit Kucheria <amitk@kernel.org>,
Thara Gopinath <thara.gopinath@gmail.com>,
"Bjorn Andersson" <andersson@kernel.org>,
Konrad Dybcio <konradybcio@kernel.org>,
Ajit Pandey <quic_ajipan@quicinc.com>,
Imran Shaik <quic_imrashai@quicinc.com>,
Taniya Das <quic_tdas@quicinc.com>,
"Jagadeesh Kona" <quic_jkona@quicinc.com>,
<quic_kamalw@quicinc.com>, <quic_jprakash@quicinc.com>,
<linux-arm-msm@vger.kernel.org>, <linux-pm@vger.kernel.org>,
<devicetree@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
<linux-iio@vger.kernel.org>
Subject: Re: [PATCH RFC v2 3/5] thermal: qcom: Add support for MBG thermal monitoring
Date: Sat, 14 Dec 2024 14:17:37 +0000 [thread overview]
Message-ID: <20241214141737.1c3a305e@jic23-huawei> (raw)
In-Reply-To: <20241212-mbg-v2-support-v2-3-3249a4339b6e@quicinc.com>
On Thu, 12 Dec 2024 21:41:22 +0530
Satya Priya Kakitapalli <quic_skakitap@quicinc.com> wrote:
> Add driver for the MBG thermal monitoring device. It monitors
> the die temperature, and when there is a level 1 upper threshold
> violation, it receives an interrupt over spmi. The driver reads
> the fault status register and notifies thermal accordingly.
>
> Signed-off-by: Satya Priya Kakitapalli <quic_skakitap@quicinc.com>
Just a quick comment on consistency of formatting.
> +static int mbg_tm_set_trip_temp(struct thermal_zone_device *tz, int low_temp,
> + int temp)
> +{
> + struct mbg_tm_chip *chip = thermal_zone_device_priv(tz);
> + int ret = 0;
> +
> + guard(mutex)(&chip->lock);
> +
> + /* The HW has a limitation that the trip set must be above 25C */
> + if (temp > MBG_MIN_TRIP_TEMP && temp < MBG_MAX_SUPPORTED_TEMP) {
> + regmap_set_bits(chip->map,
> + chip->base + MBG_TEMP_MON2_MISC_CFG, MON2_UP_THRESH_EN);
> + ret = regmap_write(chip->map, chip->base + MON2_LVL1_UP_THRESH,
> + temp_to_vtemp(temp));
Alignment in this driver should be consistent / tidied up.
I'm not sure on style preferred in thermal, but I'd always default to align
after the opening bracket + wrap at 80 chars unless readability is hurt.
> + if (ret < 0)
> + return ret;
> + } else {
> + dev_dbg(chip->dev, "Set trip b/w 25C and 160C\n");
> + regmap_clear_bits(chip->map,
> + chip->base + MBG_TEMP_MON2_MISC_CFG, MON2_UP_THRESH_EN);
> + }
next prev parent reply other threads:[~2024-12-14 14:17 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-12 16:11 [PATCH RFC v2 0/5] Add support for MBG Thermal monitoring device Satya Priya Kakitapalli
2024-12-12 16:11 ` [PATCH RFC v2 1/5] dt-bindings: thermal: Add MBG thermal monitor support Satya Priya Kakitapalli
2024-12-12 17:44 ` Rob Herring (Arm)
2024-12-13 8:38 ` Krzysztof Kozlowski
[not found] ` <7a5db383-914c-4c1e-846e-5d68cc6a7765@quicinc.com>
2025-02-11 11:46 ` Krzysztof Kozlowski
2025-02-11 11:50 ` Krzysztof Kozlowski
2025-02-11 23:57 ` Dmitry Baryshkov
2025-02-12 6:06 ` Krzysztof Kozlowski
2025-02-12 11:12 ` Dmitry Baryshkov
2025-02-12 6:24 ` Satya Priya Kakitapalli
2025-02-12 6:47 ` Krzysztof Kozlowski
2024-12-13 15:50 ` Konrad Dybcio
2024-12-12 16:11 ` [PATCH RFC v2 2/5] dt-bindings: mfd: qcom,spmi-pmic: Add MBG thermal monitor ref Satya Priya Kakitapalli
2024-12-12 17:44 ` Rob Herring (Arm)
2024-12-13 8:40 ` Krzysztof Kozlowski
2024-12-12 16:11 ` [PATCH RFC v2 3/5] thermal: qcom: Add support for MBG thermal monitoring Satya Priya Kakitapalli
2024-12-13 15:48 ` Konrad Dybcio
2024-12-30 9:45 ` Satya Priya Kakitapalli
2024-12-30 14:06 ` Konrad Dybcio
2025-01-16 8:05 ` Satya Priya Kakitapalli
2025-01-16 21:18 ` Konrad Dybcio
2024-12-14 14:17 ` Jonathan Cameron [this message]
2024-12-12 16:11 ` [PATCH RFC v2 4/5] arm64: dts: qcom: sa8775p-pmics: Add vadc support on SA8775P Satya Priya Kakitapalli
2024-12-12 16:11 ` [PATCH RFC v2 5/5] arm64: dts: qcom: sa8775p-pmics: Add support for MBG TM Satya Priya Kakitapalli
2025-02-11 13:24 ` Konrad Dybcio
2024-12-13 8:38 ` [PATCH RFC v2 0/5] Add support for MBG Thermal monitoring device Krzysztof Kozlowski
2024-12-13 9:20 ` Satya Priya Kakitapalli
2024-12-13 15:52 ` Krzysztof Kozlowski
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=20241214141737.1c3a305e@jic23-huawei \
--to=jic23@kernel.org \
--cc=amitk@kernel.org \
--cc=andersson@kernel.org \
--cc=conor+dt@kernel.org \
--cc=daniel.lezcano@linaro.org \
--cc=devicetree@vger.kernel.org \
--cc=konradybcio@kernel.org \
--cc=krzk+dt@kernel.org \
--cc=lars@metafoo.de \
--cc=lee@kernel.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=lukasz.luba@arm.com \
--cc=quic_ajipan@quicinc.com \
--cc=quic_imrashai@quicinc.com \
--cc=quic_jkona@quicinc.com \
--cc=quic_jprakash@quicinc.com \
--cc=quic_kamalw@quicinc.com \
--cc=quic_skakitap@quicinc.com \
--cc=quic_tdas@quicinc.com \
--cc=rafael@kernel.org \
--cc=robh@kernel.org \
--cc=rui.zhang@intel.com \
--cc=sboyd@kernel.org \
--cc=thara.gopinath@gmail.com \
/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