linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Michael Kao <michael.kao@mediatek.com>
To: Matthias Brugger <matthias.bgg@gmail.com>
Cc: =Mark Rutland <mark.rutland@arm.com>,
	devicetree@vger.kernel.org, srv_heupstream@mediatek.com,
	linux-pm@vger.kernel.org,
	=Daniel Lezcano <daniel.lezcano@linaro.org>,
	linux-kernel@vger.kernel.org,
	=Eduardo Valentin <edubezval@gmail.com>,
	=Rob Herring <robh+dt@kernel.org>,
	linux-mediatek@lists.infradead.org,
	=Zhang Rui <rui.zhang@intel.com>,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH 1/7] thermal: mediatek: fix register index error
Date: Tue, 12 Feb 2019 16:20:13 +0800	[thread overview]
Message-ID: <1549959613.22716.6.camel@mtksdccf07> (raw)
In-Reply-To: <6496b13f-57e4-af86-bb59-91a4705d91b0@gmail.com>

On Mon, 2019-02-04 at 18:24 +0100, Matthias Brugger wrote:
> 
> On 01/02/2019 08:38, michael.kao@mediatek.com wrote:
> > From: Michael Kao <michael.kao@mediatek.com>
> > 
> > The index of msr and adcpnp should match the sensor
> > which belongs to the selected bank in the for loop.
> > 
> 
> If I get that right, this fixes
> b7cf0053738c ("thermal: Add Mediatek thermal driver for mt2701.")
> 
> So please add a fixes tag to the commit.

It is true that the patch is fix b7cf0053738c.
I will add 
Fixes: b7cf0053738c ("thermal: Add Mediatek thermal driver for mt2701.")
to the commit message of next version.

> Thanks,
> Matthias
> 
> > Signed-off-by: Michael Kao <michael.kao@mediatek.com>
> > ---
> >  drivers/thermal/mtk_thermal.c | 6 ++++--
> >  1 file changed, 4 insertions(+), 2 deletions(-)
> > 
> > diff --git a/drivers/thermal/mtk_thermal.c b/drivers/thermal/mtk_thermal.c
> > index 0691f26..f646436 100644
> > --- a/drivers/thermal/mtk_thermal.c
> > +++ b/drivers/thermal/mtk_thermal.c
> > @@ -431,7 +431,8 @@ static int mtk_thermal_bank_temperature(struct mtk_thermal_bank *bank)
> >  	u32 raw;
> >  
> >  	for (i = 0; i < conf->bank_data[bank->id].num_sensors; i++) {
> > -		raw = readl(mt->thermal_base + conf->msr[i]);
> > +		raw = readl(mt->thermal_base +
> > +			    conf->msr[conf->bank_data[bank->id].sensors[i]]);
> >  
> >  		temp = raw_to_mcelsius(mt,
> >  				       conf->bank_data[bank->id].sensors[i],
> > @@ -568,7 +569,8 @@ static void mtk_thermal_init_bank(struct mtk_thermal *mt, int num,
> >  
> >  	for (i = 0; i < conf->bank_data[num].num_sensors; i++)
> >  		writel(conf->sensor_mux_values[conf->bank_data[num].sensors[i]],
> > -		       mt->thermal_base + conf->adcpnp[i]);
> > +		       mt->thermal_base +
> > +		       conf->adcpnp[conf->bank_data[num].sensors[i]]);
> >  
> >  	writel((1 << conf->bank_data[num].num_sensors) - 1,
> >  	       mt->thermal_base + TEMP_MONCTL0);
> > 



_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2019-02-12  8:20 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-01  7:38 [PATCH 0/7] Add Mediatek thermal dirver for mt8183 michael.kao
2019-02-01  7:38 ` [PATCH 1/7] thermal: mediatek: fix register index error michael.kao
2019-02-04 17:24   ` Matthias Brugger
2019-02-12  8:20     ` Michael Kao [this message]
2019-02-01  7:38 ` [PATCH 2/7] thermal: mediatek: add common index of vts settings michael.kao
2019-02-01  7:38 ` [PATCH 3/7] thermal: mediatek: add calibration item michael.kao
2019-02-04 17:31   ` Matthias Brugger
2019-02-06  0:48     ` Eduardo Valentin
2019-02-01  7:38 ` [PATCH 4/7] thermal: mediatek: add thermal controller offset michael.kao
2019-02-06  0:53   ` Eduardo Valentin
2019-02-12  9:55     ` Michael Kao
2019-02-01  7:38 ` [PATCH 5/7] thermal: mediatek: add flag for bank selection michael.kao
2019-02-01  7:38 ` [PATCH 6/7] dt-bindings: thermal: add binding document for mt8183 thermal controller michael.kao
2019-02-01  7:38 ` [PATCH 7/7] thermal: mediatek: add support for MT8183 michael.kao

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=1549959613.22716.6.camel@mtksdccf07 \
    --to=michael.kao@mediatek.com \
    --cc=daniel.lezcano@linaro.org \
    --cc=devicetree@vger.kernel.org \
    --cc=edubezval@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=matthias.bgg@gmail.com \
    --cc=robh+dt@kernel.org \
    --cc=rui.zhang@intel.com \
    --cc=srv_heupstream@mediatek.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;
as well as URLs for NNTP newsgroup(s).