Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp3558892imj; Tue, 12 Feb 2019 00:20:51 -0800 (PST) X-Google-Smtp-Source: AHgI3IaxZaoNcQKfg8YxiBOZ575J4H1m/isD8H72Xkn02r9HGUU0swRZrHqi+SGH7M/RqMDE/5wF X-Received: by 2002:a63:fe58:: with SMTP id x24mr2524120pgj.255.1549959651198; Tue, 12 Feb 2019 00:20:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549959651; cv=none; d=google.com; s=arc-20160816; b=AVvvJaeLUJdgh5MCzmPYhkZRCVz9J1LdouuSoEYMagARguScDt2q9v73Rptz2mZIbp xfuFi3Kxun5OtCP+zheX4ZhI+iy0sJ6pAXwLP0Yce0+Zucv295jPgGnchdhtXbNcSGQ3 gQknIHKQ6WX8yKPnAsHnUifK6OPD9bCo5vsd/n/KsZOo2ix1+ExyZHzQwg1i8dMfcGHE e/ESclEktCOdxDsFn84skDf5JYSCOR7dxRImttKfdSwwGfQx8OzOnUBAlLzwufsuv1JO 8xt0d3Dxm4q/jNb6IUxO0QUhsONrl4fY5edmrEb278MIV0x/A7DMODqNm7CETaFSddRT 73Ag== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :references:in-reply-to:date:cc:to:from:subject:message-id; bh=xQCNpLq82+PL7TUKWhHNbs5SI04064JHMqLoI+mzyUg=; b=MAJGqdV880vP1LjOHLGpQBrA/2Bggci1fpDdZIZyxxb3FIRmC0roR3RAVJd5A59/Sf TrB937tfbzG/rJt8oorA9EtH0Qc2WfEWcp+vzn2kP+t+y8D910JF4M6IGVOJ5tjurTBP GwV5RWZeuVidwUK/lqybrpNCamyAUtNmZRqf6ZL+FkEIWggU0NA6hjbmFRCw8r3IzifJ f/GyGE5vB0Hm78eajK046LVziNIbREyFkodg2gxFU6SepMpSo4Rfb86OnHGKG9/LHbIa FH+rV+hbMxgcF2JYdp9tCylVsWuslvHbsrO292uiN/wjLxYCipqzOnUdR3xRXSC7eIlc 6WqA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e129si11549242pgc.333.2019.02.12.00.20.34; Tue, 12 Feb 2019 00:20:51 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728373AbfBLIUW (ORCPT + 99 others); Tue, 12 Feb 2019 03:20:22 -0500 Received: from mailgw02.mediatek.com ([210.61.82.184]:28710 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1727509AbfBLIUW (ORCPT ); Tue, 12 Feb 2019 03:20:22 -0500 X-UUID: 3407cdf92e8d4a4dab858e746932f055-20190212 X-UUID: 3407cdf92e8d4a4dab858e746932f055-20190212 Received: from mtkcas06.mediatek.inc [(172.21.101.30)] by mailgw02.mediatek.com (envelope-from ) (mhqrelay.mediatek.com ESMTP with TLS) with ESMTP id 557104309; Tue, 12 Feb 2019 16:20:14 +0800 Received: from mtkcas09.mediatek.inc (172.21.101.178) by mtkmbs03n1.mediatek.inc (172.21.101.181) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Tue, 12 Feb 2019 16:20:13 +0800 Received: from [172.21.84.99] (172.21.84.99) by mtkcas09.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1395.4 via Frontend Transport; Tue, 12 Feb 2019 16:20:13 +0800 Message-ID: <1549959613.22716.6.camel@mtksdccf07> Subject: Re: [PATCH 1/7] thermal: mediatek: fix register index error From: Michael Kao To: Matthias Brugger CC: =Zhang Rui , =Eduardo Valentin , =Daniel Lezcano , "=Rob Herring" , =Mark Rutland , , , , , , Date: Tue, 12 Feb 2019 16:20:13 +0800 In-Reply-To: <6496b13f-57e4-af86-bb59-91a4705d91b0@gmail.com> References: <1549006693-11659-1-git-send-email-michael.kao@mediatek.com> <1549006693-11659-2-git-send-email-michael.kao@mediatek.com> <6496b13f-57e4-af86-bb59-91a4705d91b0@gmail.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.2.3-0ubuntu6 Content-Transfer-Encoding: 7bit MIME-Version: 1.0 X-MTK: N Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 > > > > 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 > > --- > > 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); > >