From: Bjorn Andersson <bjorn.andersson@linaro.org>
To: Amit Kucheria <amit.kucheria@linaro.org>
Cc: linux-kernel@vger.kernel.org, rnayak@codeaurora.org,
linux-arm-msm@vger.kernel.org, edubezval@gmail.com,
smohanad@codeaurora.org, vivek.gautam@codeaurora.org,
andy.gross@linaro.org, Zhang Rui <rui.zhang@intel.com>,
Rob Herring <robh+dt@kernel.org>,
Mark Rutland <mark.rutland@arm.com>,
Kees Cook <keescook@chromium.org>,
linux-pm@vger.kernel.org, devicetree@vger.kernel.org
Subject: Re: [PATCH v4 4/6] thermal: tsens: Add support for SDM845
Date: Mon, 2 Jul 2018 11:51:32 -0700 [thread overview]
Message-ID: <20180702185132.GC2050@tuxbook-pro> (raw)
In-Reply-To: <43e3ae530334efab3fa0151430879f03731e9daa.1530533998.git.amit.kucheria@linaro.org>
On Mon 02 Jul 05:44 PDT 2018, Amit Kucheria wrote:
> SDM845 uses v2.4.0 of the TSENS IP block but the get_temp() function
> appears to be identical across v2.x.y in code seen so far. We use the
> generic get_temp() function.
>
Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Regards,
Bjorn
> Signed-off-by: Amit Kucheria <amit.kucheria@linaro.org>
> ---
> Documentation/devicetree/bindings/thermal/qcom-tsens.txt | 2 ++
> drivers/thermal/qcom/tsens-v2.c | 6 +++++-
> drivers/thermal/qcom/tsens.c | 6 ++++++
> drivers/thermal/qcom/tsens.h | 5 ++++-
> 4 files changed, 17 insertions(+), 2 deletions(-)
>
> diff --git a/Documentation/devicetree/bindings/thermal/qcom-tsens.txt b/Documentation/devicetree/bindings/thermal/qcom-tsens.txt
> index 06195e8..075182e 100644
> --- a/Documentation/devicetree/bindings/thermal/qcom-tsens.txt
> +++ b/Documentation/devicetree/bindings/thermal/qcom-tsens.txt
> @@ -5,6 +5,8 @@ Required properties:
> - "qcom,msm8916-tsens" : For 8916 Family of SoCs
> - "qcom,msm8974-tsens" : For 8974 Family of SoCs
> - "qcom,msm8996-tsens" : For 8996 Family of SoCs
> + - "qcom,tsens-v2.4.0" : For SDM845 Family of SoCs
> + - "qcom,tsens-v2" : Generic fallback binding for any Soc using 2.x.y version of the tsens IP
>
> - reg: Address range of the thermal registers
> - #thermal-sensor-cells : Should be 1. See ./thermal.txt for a description.
> diff --git a/drivers/thermal/qcom/tsens-v2.c b/drivers/thermal/qcom/tsens-v2.c
> index 2eca7ff..1871945 100644
> --- a/drivers/thermal/qcom/tsens-v2.c
> +++ b/drivers/thermal/qcom/tsens-v2.c
> @@ -69,8 +69,12 @@ static const struct tsens_ops ops_generic_v2 = {
> .get_temp = get_temp_tsens_v2,
> };
>
> +const struct tsens_data data_tsens_v2 = {
> + .ops = &ops_generic_v2,
> +};
> +
> +/* Kept around for backward compatibility with old msm8996.dtsi */
> const struct tsens_data data_8996 = {
> .num_sensors = 13,
> .ops = &ops_generic_v2,
> };
> -
> diff --git a/drivers/thermal/qcom/tsens.c b/drivers/thermal/qcom/tsens.c
> index 3440166c..992ed17 100644
> --- a/drivers/thermal/qcom/tsens.c
> +++ b/drivers/thermal/qcom/tsens.c
> @@ -72,6 +72,12 @@ static const struct of_device_id tsens_table[] = {
> }, {
> .compatible = "qcom,msm8996-tsens",
> .data = &data_8996,
> + }, {
> + .compatible = "qcom,tsens-v2.4.0",
> + .data = &data_tsens_v2,
> + }, {
> + .compatible = "qcom,tsens-v2",
> + .data = &data_tsens_v2,
> },
> {}
> };
> diff --git a/drivers/thermal/qcom/tsens.h b/drivers/thermal/qcom/tsens.h
> index dc56e1e..69212cb 100644
> --- a/drivers/thermal/qcom/tsens.h
> +++ b/drivers/thermal/qcom/tsens.h
> @@ -87,6 +87,9 @@ void compute_intercept_slope(struct tsens_device *, u32 *, u32 *, u32);
> int init_common(struct tsens_device *);
> int get_temp_common(struct tsens_device *, int, int *);
>
> -extern const struct tsens_data data_8916, data_8974, data_8960, data_8996;
> +/* TSENS v1 targets */
> +extern const struct tsens_data data_8916, data_8974, data_8960;
> +/* TSENS v2 targets */
> +extern const struct tsens_data data_8996, data_tsens_v2;
>
> #endif /* __QCOM_TSENS_H__ */
> --
> 2.7.4
>
next prev parent reply other threads:[~2018-07-02 18:51 UTC|newest]
Thread overview: 45+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-02 12:44 [PATCH v4 0/6] thermal: tsens: Refactoring for TSENSv2 IP Amit Kucheria
2018-07-02 12:44 ` Amit Kucheria
2018-07-02 12:44 ` Amit Kucheria
2018-07-02 12:44 ` [PATCH v4 1/6] thermal: tsens: Get rid of unused fields in structure Amit Kucheria
2018-07-02 12:44 ` [PATCH v4 2/6] dt: qcom: 8996: thermal: Move to DT initialisation Amit Kucheria
2018-07-02 12:44 ` Amit Kucheria
2018-07-02 18:48 ` Bjorn Andersson
2018-07-02 18:48 ` Bjorn Andersson
2018-07-02 12:44 ` [PATCH v4 3/6] thermal: tsens: Rename tsens-8996 to tsens-v2 for reuse Amit Kucheria
2018-07-02 18:55 ` Bjorn Andersson
2018-07-04 12:38 ` Amit Kucheria
2018-07-02 12:44 ` [PATCH v4 4/6] thermal: tsens: Add support for SDM845 Amit Kucheria
2018-07-02 18:51 ` Bjorn Andersson [this message]
2018-07-03 16:26 ` Rob Herring
2018-07-04 17:26 ` Amit Kucheria
2018-07-05 20:37 ` Rob Herring
2018-07-06 5:13 ` Amit Kucheria
2018-07-06 17:47 ` Rob Herring
2018-07-02 12:44 ` [PATCH v4 5/6] thermal: tsens: Check if we have valid data before reading Amit Kucheria
2018-07-02 17:47 ` Eduardo Valentin
2018-07-02 12:44 ` [PATCH v4 6/6] arm64: dts: sdm845: Add tsens nodes Amit Kucheria
2018-07-02 12:44 ` Amit Kucheria
2018-07-02 18:50 ` Bjorn Andersson
2018-07-02 18:50 ` Bjorn Andersson
2018-07-03 21:48 ` Matthias Kaehlcke
2018-07-03 21:48 ` Matthias Kaehlcke
2018-07-09 11:26 ` Amit Kucheria
2018-07-09 11:26 ` Amit Kucheria
2018-07-09 16:01 ` Matthias Kaehlcke
2018-07-09 16:01 ` Matthias Kaehlcke
2018-07-09 16:01 ` Matthias Kaehlcke
2018-07-09 16:04 ` Amit Kucheria
2018-07-09 16:04 ` Amit Kucheria
2018-07-09 16:10 ` Matthias Kaehlcke
2018-07-09 16:10 ` Matthias Kaehlcke
2018-07-06 17:31 ` Stephen Boyd
2018-07-06 17:31 ` Stephen Boyd
2018-07-09 11:27 ` Amit Kucheria
2018-07-09 11:27 ` Amit Kucheria
2018-07-02 14:00 ` [PATCH v4 0/6] thermal: tsens: Refactoring for TSENSv2 IP Amit Kucheria
2018-07-02 14:00 ` Amit Kucheria
2018-07-02 17:53 ` Eduardo Valentin
2018-07-02 17:53 ` Eduardo Valentin
2018-07-09 11:30 ` Amit Kucheria
2018-07-09 11:30 ` Amit Kucheria
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=20180702185132.GC2050@tuxbook-pro \
--to=bjorn.andersson@linaro.org \
--cc=amit.kucheria@linaro.org \
--cc=andy.gross@linaro.org \
--cc=devicetree@vger.kernel.org \
--cc=edubezval@gmail.com \
--cc=keescook@chromium.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=rnayak@codeaurora.org \
--cc=robh+dt@kernel.org \
--cc=rui.zhang@intel.com \
--cc=smohanad@codeaurora.org \
--cc=vivek.gautam@codeaurora.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.