From: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
To: Praveenkumar I <quic_ipkumar@quicinc.com>,
agross@kernel.org, andersson@kernel.org,
konrad.dybcio@linaro.org, amitk@kernel.org,
thara.gopinath@gmail.com, rafael@kernel.org,
daniel.lezcano@linaro.org, rui.zhang@intel.com,
robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org,
conor+dt@kernel.org, linux-arm-msm@vger.kernel.org,
linux-pm@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org
Cc: quic_varada@quicinc.com
Subject: Re: [PATCH 6/6] thermal/drivers/tsens: Add IPQ5332 support
Date: Mon, 10 Jul 2023 14:24:29 +0300 [thread overview]
Message-ID: <96e52c65-6216-91ba-8d2b-197f86433d98@linaro.org> (raw)
In-Reply-To: <20230710103735.1375847-7-quic_ipkumar@quicinc.com>
On 10/07/2023 13:37, Praveenkumar I wrote:
> IPQ5332 uses tsens v2.3.3 IP and it is having combined interrupt as
> like IPQ8074. But as the SoCs does not have RPM, kernel needs to
> take care of sensor enablement and calibration. Hence introduced
> new ops and data for IPQ5332 and reused the feature_config from
> IPQ8074.
>
> Signed-off-by: Praveenkumar I <quic_ipkumar@quicinc.com>
> ---
> drivers/thermal/qcom/tsens-v2.c | 13 +++++++++++++
> drivers/thermal/qcom/tsens.c | 3 +++
> drivers/thermal/qcom/tsens.h | 2 +-
> 3 files changed, 17 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/thermal/qcom/tsens-v2.c b/drivers/thermal/qcom/tsens-v2.c
> index db48b1d95348..8b6e3876fd2c 100644
> --- a/drivers/thermal/qcom/tsens-v2.c
> +++ b/drivers/thermal/qcom/tsens-v2.c
> @@ -237,6 +237,19 @@ struct tsens_plat_data data_ipq8074 = {
> .fields = tsens_v2_regfields,
> };
>
> +static const struct tsens_ops ops_ipq5332_v2 = {
Please drop v2. It is unclear if it refers to tsens being v2 or being
specific to ipq5332 v2.
> + .init = init_common,
> + .get_temp = get_temp_tsens_valid,
> + .calibrate = tsens_v2_calibration,
> +};
> +
> +struct tsens_plat_data data_ipq5332 = {
> + .sensors_to_en = 0xF800,
This doesn't seem to match the offsets that you have enabled in the DTSI.
> + .ops = &ops_ipq5332_v2,
> + .feat = &ipq8074_feat,
> + .fields = tsens_v2_regfields,
> +};
> +
> /* Kept around for backward compatibility with old msm8996.dtsi */
> struct tsens_plat_data data_8996 = {
> .num_sensors = 13,
> diff --git a/drivers/thermal/qcom/tsens.c b/drivers/thermal/qcom/tsens.c
> index 169690355dad..e8ba2901cda8 100644
> --- a/drivers/thermal/qcom/tsens.c
> +++ b/drivers/thermal/qcom/tsens.c
> @@ -1140,6 +1140,9 @@ static const struct of_device_id tsens_table[] = {
> }, {
> .compatible = "qcom,ipq8074-tsens",
> .data = &data_ipq8074,
> + }, {
> + .compatible = "qcom,ipq5332-tsens",
> + .data = &data_ipq5332,
> }, {
> .compatible = "qcom,mdm9607-tsens",
> .data = &data_9607,
> diff --git a/drivers/thermal/qcom/tsens.h b/drivers/thermal/qcom/tsens.h
> index f8897bc8944e..36040f9beebc 100644
> --- a/drivers/thermal/qcom/tsens.h
> +++ b/drivers/thermal/qcom/tsens.h
> @@ -701,6 +701,6 @@ extern struct tsens_plat_data data_8226, data_8909, data_8916, data_8939, data_8
> extern struct tsens_plat_data data_tsens_v1, data_8976, data_8956;
>
> /* TSENS v2 targets */
> -extern struct tsens_plat_data data_8996, data_ipq8074, data_tsens_v2;
> +extern struct tsens_plat_data data_8996, data_ipq8074, data_ipq5332, data_tsens_v2;
>
> #endif /* __QCOM_TSENS_H__ */
--
With best wishes
Dmitry
next prev parent reply other threads:[~2023-07-10 11:24 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-10 10:37 [PATCH 0/6] Add IPQ5332 TSENS support Praveenkumar I
2023-07-10 10:37 ` [PATCH 1/6] dt-bindings: thermal: tsens: Add nvmem cells for calibration data Praveenkumar I
2023-07-10 20:10 ` Krzysztof Kozlowski
2023-07-11 9:39 ` Praveenkumar I
2023-07-11 9:52 ` Krzysztof Kozlowski
2023-07-11 14:13 ` Praveenkumar I
2023-07-13 11:38 ` Krzysztof Kozlowski
2023-07-10 10:37 ` [PATCH 2/6] thermal/drivers/tsens: Add TSENS enable and calibration support for V2 Praveenkumar I
2023-07-10 11:19 ` Dmitry Baryshkov
2023-07-10 11:22 ` Dmitry Baryshkov
2023-07-10 13:24 ` Praveenkumar I
2023-07-10 13:22 ` Praveenkumar I
2023-07-10 15:02 ` Dmitry Baryshkov
2023-07-11 9:19 ` Praveenkumar I
2023-07-10 10:37 ` [PATCH 3/6] dt-bindings: thermal: tsens: Add ipq5332 compatible Praveenkumar I
2023-07-10 20:06 ` Krzysztof Kozlowski
2023-07-11 9:24 ` Praveenkumar I
2023-07-10 10:37 ` [PATCH 4/6] arm64: dts: qcom: ipq5332: Add tsens node Praveenkumar I
2023-07-10 11:21 ` Dmitry Baryshkov
2023-07-10 13:25 ` Praveenkumar I
2023-07-10 20:07 ` Krzysztof Kozlowski
2023-07-11 9:27 ` Praveenkumar I
2023-07-10 10:37 ` [PATCH 5/6] arm64: dts: qcom: ipq5332: Add thermal zone nodes Praveenkumar I
2023-07-10 11:23 ` Dmitry Baryshkov
2023-07-10 12:14 ` Konrad Dybcio
2023-07-10 13:34 ` Praveenkumar I
2023-07-10 13:54 ` Praveenkumar I
2023-07-10 13:30 ` Praveenkumar I
2023-07-10 10:37 ` [PATCH 6/6] thermal/drivers/tsens: Add IPQ5332 support Praveenkumar I
2023-07-10 11:24 ` Dmitry Baryshkov [this message]
2023-07-10 13:47 ` Praveenkumar I
2023-07-10 15:03 ` Dmitry Baryshkov
2023-07-11 9:20 ` Praveenkumar I
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=96e52c65-6216-91ba-8d2b-197f86433d98@linaro.org \
--to=dmitry.baryshkov@linaro.org \
--cc=agross@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=konrad.dybcio@linaro.org \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=quic_ipkumar@quicinc.com \
--cc=quic_varada@quicinc.com \
--cc=rafael@kernel.org \
--cc=robh+dt@kernel.org \
--cc=rui.zhang@intel.com \
--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
all inboxes | Powered by JetHome®