lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20250207174255.GA29827@localhost>
Date: Fri, 7 Feb 2025 12:42:55 -0500
From: Trevor Woerner <twoerner@...il.com>
To: Dragan Simic <dsimic@...jaro.org>
Cc: linux-kernel@...r.kernel.org, "Rafael J. Wysocki" <rafael@...nel.org>,
	Daniel Lezcano <daniel.lezcano@...aro.org>,
	Zhang Rui <rui.zhang@...el.com>, Lukasz Luba <lukasz.luba@....com>,
	Heiko Stuebner <heiko@...ech.de>, linux-pm@...r.kernel.org,
	linux-arm-kernel@...ts.infradead.org,
	linux-rockchip@...ts.infradead.org
Subject: Re: [PATCH] thermal/drivers/rockchip: add missing rk3328 mapping
 entry

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@...il.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},

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ