From: Daniel Lezcano <daniel.lezcano@linaro.org>
To: Yuantian Tang <andy.tang@nxp.com>,
rui.zhang@intel.com, edubezval@gmail.com
Cc: linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3] thermal: qoriq: Update the settings for TMUv2
Date: Mon, 25 May 2020 13:22:44 +0200 [thread overview]
Message-ID: <24d2d2c9-0f30-743b-dfe0-6acd2d3de367@linaro.org> (raw)
In-Reply-To: <20200525072106.12993-1-andy.tang@nxp.com>
On 25/05/2020 09:21, Yuantian Tang wrote:
> For TMU v2, TMSAR registers need to be set properly to get the
> accurate temperature values.
> Also the temperature read needs to be converted to degree Celsius
> since it is in degrees Kelvin.
> Signed-off-by: Yuantian Tang <andy.tang@nxp.com>
> ---
[ ... ]
> @@ -202,6 +213,8 @@ static void qoriq_tmu_init_device(struct qoriq_tmu_data *data)
> } else {
> regmap_write(data->regmap, REGS_V2_TMTMIR, TMTMIR_DEFAULT);
> regmap_write(data->regmap, REGS_V2_TEUMR(0), TEUMR0_V2);
> + for (i = 0; i < 7; i++)
Please wrap this litteral 7 to an explicit constant name
> + regmap_write(data->regmap, REGS_V2_TMSAR(i), TMSARA_V2);
> }
>
> /* Disable monitoring */
> @@ -212,6 +225,7 @@ static const struct regmap_range qoriq_yes_ranges[] = {
> regmap_reg_range(REGS_TMR, REGS_TSCFGR),
> regmap_reg_range(REGS_TTRnCR(0), REGS_TTRnCR(3)),
> regmap_reg_range(REGS_V2_TEUMR(0), REGS_V2_TEUMR(2)),
> + regmap_reg_range(REGS_V2_TMSAR(0), REGS_V2_TMSAR(15)),
> regmap_reg_range(REGS_IPBRR(0), REGS_IPBRR(1)),
> /* Read only registers below */
> regmap_reg_range(REGS_TRITSR(0), REGS_TRITSR(15)),
>
--
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs
Follow Linaro: <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog
prev parent reply other threads:[~2020-05-25 11:22 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-25 7:21 Yuantian Tang
2020-05-25 11:22 ` Daniel Lezcano [this message]
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=24d2d2c9-0f30-743b-dfe0-6acd2d3de367@linaro.org \
--to=daniel.lezcano@linaro.org \
--cc=andy.tang@nxp.com \
--cc=edubezval@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=rui.zhang@intel.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®