Re: [PATCH/RFT v2 1/3] thermal: rcar_gen3_thermal: Update value of Tj_1

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, May 08, 2019 at 03:36:36PM +0900, Yoshihiro Kaneko wrote:
> Hi Simon-san,
> 
> Thanks for testing this patch!
> 
> 2019年4月24日(水) 23:54 Simon Horman <horms@xxxxxxxxxxxx>:
> >
> > Hi Kaneko-san,
> >
> > On Wed, Apr 17, 2019 at 02:44:13AM +0900, Yoshihiro Kaneko wrote:
> > > As evaluation of hardware team, temperature calculation formula
> > > of M3-W is difference from all other SoCs as below:
> > > - M3-W: Tj_1: 116 (so Tj_1 - Tj_3 = 157)
> > > - Others: Tj_1: 126 (so Tj_1 - Tj_3 = 167)
> > >
> > > Signed-off-by: Yoshihiro Kaneko <ykaneko0929@xxxxxxxxx>
> > > ---
> > >  drivers/thermal/rcar_gen3_thermal.c | 41 +++++++++++++++++++++++++++----------
> > >  1 file changed, 30 insertions(+), 11 deletions(-)
> > >
> > > diff --git a/drivers/thermal/rcar_gen3_thermal.c b/drivers/thermal/rcar_gen3_thermal.c
> > > index 88fa41c..a2fd0fd 100644
> > > --- a/drivers/thermal/rcar_gen3_thermal.c
> > > +++ b/drivers/thermal/rcar_gen3_thermal.c
> > > @@ -124,11 +124,11 @@ static inline void rcar_gen3_thermal_write(struct rcar_gen3_thermal_tsc *tsc,
> > >  #define RCAR3_THERMAL_GRAN 500 /* mili Celsius */
> > >
> > >  /* no idea where these constants come from */
> > > -#define TJ_1 116
> > >  #define TJ_3 -41
> > >
> > >  static void rcar_gen3_thermal_calc_coefs(struct equation_coefs *coef,
> > > -                                      int *ptat, int *thcode)
> > > +                                      int *ptat, int *thcode,
> > > +                                      unsigned int ths_tj_1)
> >
> > While testing I found that the type of ths_tj_1 needs to be int
> > rather than unsigned int, in order for the FIXPT logic to work correctly.
> >
> > And with that change in place the entire series appears to work correctly.
> >
> > My suggestion is to change the types of ths_tj_1 here, rcar_gen3_ths_tj_1
> > in rcar_gen3_thermal_probe(), and rcar_gen3_ths_tj_1 and
> > rcar_gen3_ths_tj_1_m3_w, which are gloabl to this file accordingly.
> 
> I understood. Why did I decide to use unsigned?
> I will fix it in v3.

Probably due to an earlier suggestion by me.
Sorry about that.

...

Could you post v3 with this fix and the changes suggested by Niklas
for patch 2/3?



[Index of Archives]     [Linux Samsung SOC]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux