From: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
To: Manikanta Mylavarapu <quic_mmanikan@quicinc.com>
Cc: quic_srichara@quicinc.com, quic_varada@quicinc.com,
srinivas.kandagatla@linaro.org, robh@kernel.org,
krzk+dt@kernel.org, conor+dt@kernel.org, amitk@kernel.org,
thara.gopinath@gmail.com, rafael@kernel.org,
daniel.lezcano@linaro.org, rui.zhang@intel.com,
lukasz.luba@arm.com, andersson@kernel.org,
konradybcio@kernel.org, linux-arm-msm@vger.kernel.org,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-pm@vger.kernel.org
Subject: Re: [PATCH v9 3/7] thermal/drivers/tsens: Add TSENS enable and calibration support for V2
Date: Fri, 13 Dec 2024 20:02:02 +0100 [thread overview]
Message-ID: <f7f8f087-f3bb-4dbc-b95d-6a6edd6bf64c@wanadoo.fr> (raw)
In-Reply-To: <20241125050728.3699241-4-quic_mmanikan@quicinc.com>
Le 25/11/2024 à 06:07, Manikanta Mylavarapu a écrit :
> From: Praveenkumar I <quic_ipkumar-jfJNa2p1gH1BDgjK7y7TUQ@public.gmane.org>
>
> SoCs without RPM need to enable sensors and calibrate them from the kernel.
> The IPQ5332 and IPQ5424 use the tsens v2.3.3 IP and do not have RPM.
> Therefore, add a new calibration function for V2, as the tsens.c calib
> function only supports V1. Also add new feature_config, ops and data for
> IPQ5332, IPQ5424.
>
> Although the TSENS IP supports 16 sensors, not all are used. The hw_id
> is used to enable the relevant sensors.
...
> diff --git a/drivers/thermal/qcom/tsens-v2.c b/drivers/thermal/qcom/tsens-v2.c
> index 0cb7301eca6e..836155fa9ab2 100644
> --- a/drivers/thermal/qcom/tsens-v2.c
> +++ b/drivers/thermal/qcom/tsens-v2.c
> @@ -4,13 +4,32 @@
> * Copyright (c) 2018, Linaro Limited
> */
>
> +#include <linux/bitfield.h>
> #include <linux/bitops.h>
> #include <linux/regmap.h>
> +#include <linux/nvmem-consumer.h>
If moved one line above, alphabetical order would be kept.
> #include "tsens.h"
>
> /* ----- SROT ------ */
> #define SROT_HW_VER_OFF 0x0000
...
> +static const struct tsens_ops ops_ipq5332 = {
> + .init = init_tsens_v2_no_rpm,
> + .get_temp = get_temp_tsens_valid,
> + .calibrate = tsens_v2_calibration,
> +};
> +
> +struct tsens_plat_data data_ipq5332 = {
This could easily be made as const.
> + .num_sensors = 5,
> + .ops = &ops_ipq5332,
> + .hw_ids = (unsigned int []){11, 12, 13, 14, 15},
> + .feat = &ipq5332_feat,
> + .fields = tsens_v2_regfields,
> +};
> +
> +struct tsens_plat_data data_ipq5424 = {
This could easily be made as const.
> + .num_sensors = 7,
> + .ops = &ops_ipq5332,
> + .hw_ids = (unsigned int []){9, 10, 11, 12, 13, 14, 15},
> + .feat = &ipq5332_feat,
> + .fields = tsens_v2_regfields,
> +};
...
CJ
next prev parent reply other threads:[~2024-12-13 19:02 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-25 5:07 [PATCH v9 0/7] Add TSENS support for IPQ5332, IPQ5424 Manikanta Mylavarapu
2024-11-25 5:07 ` [PATCH v9 1/7] dt-bindings: thermal: tsens: Add ipq5332, ipq5424 compatible Manikanta Mylavarapu
2024-11-25 5:07 ` [PATCH v9 2/7] dt-bindings: nvmem: Add compatible for IPQ5424 Manikanta Mylavarapu
2024-11-25 5:07 ` [PATCH v9 3/7] thermal/drivers/tsens: Add TSENS enable and calibration support for V2 Manikanta Mylavarapu
2024-11-26 12:06 ` Dmitry Baryshkov
2024-12-13 19:02 ` Christophe JAILLET [this message]
2024-12-18 11:22 ` Manikanta Mylavarapu
2024-11-25 5:07 ` [PATCH v9 4/7] arm64: dts: qcom: ipq5332: Add tsens node Manikanta Mylavarapu
2024-12-13 12:59 ` Konrad Dybcio
2024-12-18 11:15 ` Manikanta Mylavarapu
2024-11-25 5:07 ` [PATCH v9 5/7] arm64: dts: qcom: ipq5332: Add thermal zone nodes Manikanta Mylavarapu
2024-11-25 5:07 ` [PATCH v9 6/7] arm64: dts: qcom: ipq5424: Add tsens node Manikanta Mylavarapu
2024-12-13 13:00 ` Konrad Dybcio
2024-12-18 11:17 ` Manikanta Mylavarapu
2024-11-25 5:07 ` [PATCH v9 7/7] arm64: dts: qcom: ipq5424: Add thermal zone nodes Manikanta Mylavarapu
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=f7f8f087-f3bb-4dbc-b95d-6a6edd6bf64c@wanadoo.fr \
--to=christophe.jaillet@wanadoo.fr \
--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=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=lukasz.luba@arm.com \
--cc=quic_mmanikan@quicinc.com \
--cc=quic_srichara@quicinc.com \
--cc=quic_varada@quicinc.com \
--cc=rafael@kernel.org \
--cc=robh@kernel.org \
--cc=rui.zhang@intel.com \
--cc=srinivas.kandagatla@linaro.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
all inboxes | Powered by JetHome®