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, andy.gross@linaro.org,
dianders@chromium.org, mka@chromium.org,
Zhang Rui <rui.zhang@intel.com>,
Daniel Lezcano <daniel.lezcano@linaro.org>,
linux-pm@vger.kernel.org
Subject: Re: [PATCH v3 07/16] thermal: tsens: Pass register offsets as private data
Date: Tue, 18 Sep 2018 12:34:48 -0700 [thread overview]
Message-ID: <20180918193448.GA1367@tuxbook-pro> (raw)
In-Reply-To: <dccdcf386d8d5298a77ec31cde699852cc4409c5.1536744310.git.amit.kucheria@linaro.org>
On Wed 12 Sep 02:52 PDT 2018, Amit Kucheria wrote:
> diff --git a/drivers/thermal/qcom/tsens.c b/drivers/thermal/qcom/tsens.c
> index 9a8e8f7b4ae1..f1ec9bbe4717 100644
> --- a/drivers/thermal/qcom/tsens.c
> +++ b/drivers/thermal/qcom/tsens.c
> @@ -144,6 +144,9 @@ static int tsens_probe(struct platform_device *pdev)
> else
> tmdev->sensor[i].hw_id = i;
> }
> + for (i = 0; i < REG_ARRAY_SIZE; i++) {
> + tmdev->reg_offsets[i] = data->reg_offsets[i];
> + }
Unnecessary {}
>
> if (!tmdev->ops || !tmdev->ops->init || !tmdev->ops->get_temp)
> return -EINVAL;
> diff --git a/drivers/thermal/qcom/tsens.h b/drivers/thermal/qcom/tsens.h
> index b9c4bcf255fa..7b7feee5dc46 100644
> --- a/drivers/thermal/qcom/tsens.h
> +++ b/drivers/thermal/qcom/tsens.h
> @@ -48,15 +48,23 @@ struct tsens_ops {
> int (*get_trend)(struct tsens_device *, int, enum thermal_trend *);
> };
>
> +enum reg_list {
> + SROT_CTRL_OFFSET,
> +
> + REG_ARRAY_SIZE,
> +};
> +
> /**
> * struct tsens_data - tsens instance specific data
> * @num_sensors: Max number of sensors supported by platform
> * @ops: operations the tsens instance supports
> * @hw_ids: Subset of sensors ids supported by platform, if not the first n
> + * @reg_offsets: Register offsets for commonly used registers
Order doesn't match struct.
> */
> struct tsens_data {
> const u32 num_sensors;
> const struct tsens_ops *ops;
> + const u16 reg_offsets[REG_ARRAY_SIZE];
> unsigned int *hw_ids;
> };
Except of that you have my:
Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Regards,
Bjorn
next prev parent reply other threads:[~2018-09-18 19:30 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-12 9:52 [PATCH v3 00/16] Another round of tsens cleanups Amit Kucheria
2018-09-12 9:52 ` [PATCH v3 01/16] thermal: tsens: Prepare 8916 and 8974 tsens to use SROT and TM address space Amit Kucheria
2018-09-12 9:52 ` [PATCH v3 02/16] thermal: tsens: Add SPDX license identifiers Amit Kucheria
2018-09-12 9:52 ` [PATCH v3 03/16] thermal: tsens: Get rid of dead code Amit Kucheria
2018-09-12 9:52 ` [PATCH v3 04/16] thermal: tsens: Rename map field in order to add a second address map Amit Kucheria
2018-09-12 9:52 ` [PATCH v3 05/16] thermal: tsens: Add the SROT " Amit Kucheria
2018-09-12 9:52 ` [PATCH v3 06/16] MAINTAINERS: Add entry for Qualcomm TSENS thermal drivers Amit Kucheria
2018-09-12 9:52 ` [PATCH v3 07/16] thermal: tsens: Pass register offsets as private data Amit Kucheria
2018-09-18 19:34 ` Bjorn Andersson [this message]
[not found] ` <cover.1537547011.git.amit.kucheria@linaro.org>
2018-09-21 17:46 ` [PATCH v4 " Amit Kucheria
2018-09-21 17:25 ` Amit Kucheria
2018-09-12 9:52 ` [PATCH v3 08/16] thermal: tsens: Check if the IP is correctly enabled by firmware Amit Kucheria
2018-09-12 9:52 ` [PATCH v3 09/16] arm: dts: msm8974: thermal: split address space into two Amit Kucheria
2018-09-20 18:57 ` Andy Gross
2018-09-12 9:52 ` [PATCH v3 10/16] arm64: dts: msm8916: " Amit Kucheria
2018-09-20 18:57 ` Andy Gross
2018-09-12 9:52 ` [PATCH v3 11/16] arm: dts: msm8974: thermal: Add "qcom,sensors" property Amit Kucheria
2018-09-20 18:58 ` Andy Gross
2018-09-12 9:52 ` [PATCH v3 12/16] arm64: dts: msm8916: " Amit Kucheria
2018-09-20 18:58 ` Andy Gross
2018-09-12 9:52 ` [PATCH v3 13/16] dt-bindings: thermal: Fix a typo in documentation Amit Kucheria
2018-09-12 9:52 ` [PATCH v3 14/16] arm64: dts: msm8916: Add gpu thermal zone Amit Kucheria
2018-09-20 18:59 ` Andy Gross
2018-09-12 9:53 ` [PATCH v3 15/16] arm64: dts: msm8916: Add camera " Amit Kucheria
2018-09-20 19:00 ` Andy Gross
2018-09-12 9:53 ` [PATCH v3 16/16] arm64: dts: sdm845: enable tsens thermal zones Amit Kucheria
2018-09-20 19:01 ` Andy Gross
2018-10-25 19:25 ` Matthias Kaehlcke
2018-10-25 20:03 ` Amit Kucheria
2018-10-25 20:37 ` Matthias Kaehlcke
2018-09-18 15:01 ` [PATCH v3 00/16] Another round of tsens cleanups Amit Kucheria
2018-09-20 19:02 ` Andy Gross
2018-09-21 17:48 ` 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=20180918193448.GA1367@tuxbook-pro \
--to=bjorn.andersson@linaro.org \
--cc=amit.kucheria@linaro.org \
--cc=andy.gross@linaro.org \
--cc=daniel.lezcano@linaro.org \
--cc=dianders@chromium.org \
--cc=edubezval@gmail.com \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=mka@chromium.org \
--cc=rnayak@codeaurora.org \
--cc=rui.zhang@intel.com \
--cc=smohanad@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).