From: Daniel Lezcano <daniel.lezcano@linaro.org>
To: Keerthy <j-keerthy@ti.com>, rui.zhang@intel.com, robh+dt@kernel.org
Cc: amit.kucheria@verdurent.com, t-kristo@ti.com,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org, linux-pm@vger.kernel.org,
mark.rutland@arm.com
Subject: Re: [PATCH v5 2/4] thermal: k3: Add support for bandgap sensors
Date: Mon, 6 Apr 2020 18:40:07 +0200 [thread overview]
Message-ID: <3dce9790-1414-0768-7e47-07cdfba52aab@linaro.org> (raw)
In-Reply-To: <20200331075356.19171-3-j-keerthy@ti.com>
On 31/03/2020 09:53, Keerthy wrote:
> The bandgap provides current and voltage reference for its internal
> circuits and other analog IP blocks. The analog-to-digital
> converter (ADC) produces an output value that is proportional
> to the silicon temperature.
>
> Currently reading temperatures only is supported.
> There are no active/passive cooling agent supported.
>
> Signed-off-by: Keerthy <j-keerthy@ti.com>
> ---
[ ... ]
> +static int k3_bandgap_probe(struct platform_device *pdev)
> +{
> + int ret = 0, cnt, val, id, reg_cnt = 0;
We missed 'reg_cnt' which is not used.
[ ... ]
> + /* Register the thermal sensors */
> + for (id = 0; id < cnt; id++) {
> + data[id].sensor_id = id;
> + data[id].bgp = bgp;
> + data[id].ctrl_offset = K3_VTM_TMPSENS0_CTRL_OFFSET +
> + id * K3_VTM_REGS_PER_TS;
> + data[id].stat_offset = data[id].ctrl_offset + 0x8;
> +
> + val = readl(data[id].bgp->base + data[id].ctrl_offset);
> + val |= (K3_VTM_TMPSENS_CTRL_SOC |
> + K3_VTM_TMPSENS_CTRL_CLRZ |
> + K3_VTM_TMPSENS_CTRL_CLKON_REQ);
> + val &= ~K3_VTM_TMPSENS_CTRL_CBIASSEL;
> + writel(val, data[id].bgp->base + data[id].ctrl_offset);
> +
> + data[id].ti_thermal =
> + devm_thermal_zone_of_sensor_register(dev, id,
> + &data[id],
> + &k3_of_thermal_ops);
> + if (IS_ERR(data[id].ti_thermal)) {
> + dev_err(dev, "thermal zone device is NULL\n");
> + ret = PTR_ERR(data[id].ti_thermal);
> + goto err_alloc;
> + }
> +
> + reg_cnt++;
> + }
[ ... ]
--
<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
next prev parent reply other threads:[~2020-04-06 16:40 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-31 7:53 [PATCH v5 0/4] " Keerthy
2020-03-31 7:53 ` [PATCH v5 1/4] dt-bindings: thermal: k3: Add VTM bindings documentation Keerthy
2020-04-04 7:30 ` Amit Kucheria
2020-03-31 7:53 ` [PATCH v5 2/4] thermal: k3: Add support for bandgap sensors Keerthy
2020-04-06 3:11 ` J, KEERTHY
2020-04-06 16:40 ` Daniel Lezcano [this message]
2020-04-06 18:55 ` Amit Kucheria
2020-04-07 1:22 ` J, KEERTHY
2020-04-06 18:59 ` Amit Kucheria
2020-04-07 1:24 ` J, KEERTHY
2020-03-31 7:53 ` [PATCH v5 3/4] arm64: dts: ti: am654: Add thermal zones Keerthy
2020-04-06 19:04 ` Amit Kucheria
2020-03-31 7:53 ` [PATCH v5 4/4] arm64: dts: ti: am6: Add VTM node Keerthy
2020-04-06 19:05 ` Amit Kucheria
2020-04-07 1:35 ` J, KEERTHY
2020-04-06 19:18 ` 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=3dce9790-1414-0768-7e47-07cdfba52aab@linaro.org \
--to=daniel.lezcano@linaro.org \
--cc=amit.kucheria@verdurent.com \
--cc=devicetree@vger.kernel.org \
--cc=j-keerthy@ti.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=robh+dt@kernel.org \
--cc=rui.zhang@intel.com \
--cc=t-kristo@ti.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®