public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
From: Trevor Woerner <twoerner@gmail.com>
To: Dragan Simic <dsimic@manjaro.org>
Cc: linux-kernel@vger.kernel.org,
	"Rafael J. Wysocki" <rafael@kernel.org>,
	Daniel Lezcano <daniel.lezcano@linaro.org>,
	Zhang Rui <rui.zhang@intel.com>,
	Lukasz Luba <lukasz.luba@arm.com>,
	Heiko Stuebner <heiko@sntech.de>,
	linux-pm@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	linux-rockchip@lists.infradead.org
Subject: Re: [PATCH] thermal/drivers/rockchip: add missing rk3328 mapping entry
Date: Fri, 7 Feb 2025 12:42:55 -0500	[thread overview]
Message-ID: <20250207174255.GA29827@localhost> (raw)
In-Reply-To: <fc3c4542d5cc4d95f74692140e5ea8b5@manjaro.org>

On Fri 2025-02-07 @ 06:15:22 PM, Dragan Simic wrote:
> Hello Trevor,
> 
> On 2025-02-07 17:47, Trevor Woerner wrote:
> > The mapping table for the rk3328 is missing the entry for -25°C which is
> > found in the TRM[1] §9.5.2 "Temperature-to-code mapping".
> > 
> > NOTE: the kernel uses the tsadc_q_sel=1'b1 mode which is defined as:
> >       4096-<code in table>. Whereas the table in the TRM gives the code
> >       "3774" for -25°C, the kernel uses 4096-3774=322.
> > 
> > Link:
> > https://opensource.rock-chips.com/images/9/97/Rockchip_RK3328TRM_V1.1-Part1-20170321.pdf
> > Signed-off-by: Trevor Woerner <twoerner@gmail.com>
> 
> Thanks for the patch.  I think this should also include a Fixes tag

Okay, I'll send a v2. It's not really a big fix. The TRM instructs the code
to interpolate linearly between values (which I assume the Linux kernel does?)
and the table is completely linear in this range.

> and be submitted for inclusion into stable kernels.
> 
> > ---
> >  drivers/thermal/rockchip_thermal.c | 1 +
> >  1 file changed, 1 insertion(+)
> > 
> > diff --git a/drivers/thermal/rockchip_thermal.c
> > b/drivers/thermal/rockchip_thermal.c
> > index f551df48eef9..a8ad85feb68f 100644
> > --- a/drivers/thermal/rockchip_thermal.c
> > +++ b/drivers/thermal/rockchip_thermal.c
> > @@ -386,6 +386,7 @@ static const struct tsadc_table rk3328_code_table[]
> > = {
> >  	{296, -40000},
> >  	{304, -35000},
> >  	{313, -30000},
> > +	{322, -25000},
> >  	{331, -20000},
> >  	{340, -15000},
> >  	{349, -10000},


      reply	other threads:[~2025-02-07 17:52 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-07 16:47 [PATCH] thermal/drivers/rockchip: add missing rk3328 mapping entry Trevor Woerner
2025-02-07 17:15 ` Dragan Simic
2025-02-07 17:42   ` Trevor Woerner [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=20250207174255.GA29827@localhost \
    --to=twoerner@gmail.com \
    --cc=daniel.lezcano@linaro.org \
    --cc=dsimic@manjaro.org \
    --cc=heiko@sntech.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=linux-rockchip@lists.infradead.org \
    --cc=lukasz.luba@arm.com \
    --cc=rafael@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