From patchwork Tue Feb 21 12:26:52 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dawei Chien X-Patchwork-Id: 9584423 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 2A9FC600CA for ; Tue, 21 Feb 2017 12:28:11 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1E2DB28516 for ; Tue, 21 Feb 2017 12:28:11 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 12D6C2853A; Tue, 21 Feb 2017 12:28:11 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,UNPARSEABLE_RELAY autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 880BD28516 for ; Tue, 21 Feb 2017 12:28:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=z6vh2/djkmWcZWYNm+0PfTiYgNzyp009lvOuRAk6CLE=; b=Nbt+4ETPv8nKoQ 7OYCFLmxYhPxSy/3b/AmBsjSgiPUp+M0BDRrwg7FYa0oC4+ZCFi0LDHapdZl1KLIPJqmYahrqZTbK C+Xevz0H9rEk/npt59oGTkDjcn/R/VV/8XM89kCdT4il80QwEcPuCoO+ahpJ5HnMPyvbB7CMb9avz cXRDmvax0W9prdmoJh7n3h8k1w9HM35Ydy5QB9w4ga8S2RTyapxEHjI86p1yxWqViQtF27GVF9m3H NkOK1wyrFEpvqYydcQwopT4CRJxvBrpAlgQWc2un76uqVkB0ThCnXsC+qw/7EJ1qJEy7wYiaFpxvM E5LHlZ80r7mDWIziKDVw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1cg9Y9-00071g-Bt; Tue, 21 Feb 2017 12:28:09 +0000 Received: from [210.61.82.184] (helo=mailgw02.mediatek.com) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1cg9XZ-0006hK-3s; Tue, 21 Feb 2017 12:27:34 +0000 Received: from mtkhts09.mediatek.inc [(172.21.101.70)] by mailgw02.mediatek.com (envelope-from ) (mhqrelay.mediatek.com ESMTP with TLS) with ESMTP id 1398182072; Tue, 21 Feb 2017 20:27:01 +0800 Received: from mtkslt303.mediatek.inc (10.21.14.116) by mtkhts09.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 14.3.266.1; Tue, 21 Feb 2017 20:26:59 +0800 From: Dawei Chien To: Zhang Rui , Eduardo Valentin Subject: [PATCH v2 1/1] thermal: mt8173: minor mtk_thermal.c cleanups Date: Tue, 21 Feb 2017 20:26:52 +0800 Message-ID: <1487680012-61948-2-git-send-email-dawei.chien@mediatek.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1487680012-61948-1-git-send-email-dawei.chien@mediatek.com> References: <1487680012-61948-1-git-send-email-dawei.chien@mediatek.com> MIME-Version: 1.0 X-MTK: N X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170221_042733_296455_A55959D8 X-CRM114-Status: GOOD ( 13.05 ) X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , devicetree@vger.kernel.org, srv_heupstream@mediatek.com, Pawel Moll , Ian Campbell , Erin Lo , linux-pm@vger.kernel.org, Dawei Chien , Russell King , Stable , linux-kernel@vger.kernel.org, Fan Chen , Rob Herring , linux-mediatek@lists.infradead.org, Sascha Hauer , Kumar Gala , Matthias Brugger , Yingjoe Chen , Eddie Huang , linux-arm-kernel@lists.infradead.org Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+patchwork-linux-mediatek=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP If thermal bank with 4 sensors, thermal driver should read TEMP_MSR3. However, currently thermal driver would not read TEMP_MSR3 since mt8173 thermal driver only use 3 sensors on each thermal bank at the same time, so this patch would not effect temperature. Only if mt mt8173 thermal driver use 4 sensors on any thermal bank, would read third sensor two times, and lose fourth sensor of vale. cc: stable@vger.kernel.org Fixes: b7cf0053738c ("thermal: Add Mediatek thermal driver for mt2701.") Reviewed-by: Matthias Brugger Signed-off-by: Dawei Chien --- drivers/thermal/mtk_thermal.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/thermal/mtk_thermal.c b/drivers/thermal/mtk_thermal.c index 34169c3..c124151 100644 --- a/drivers/thermal/mtk_thermal.c +++ b/drivers/thermal/mtk_thermal.c @@ -191,7 +191,7 @@ struct mtk_thermal { }; const int mt8173_msr[MT8173_NUM_SENSORS_PER_ZONE] = { - TEMP_MSR0, TEMP_MSR1, TEMP_MSR2, TEMP_MSR2 + TEMP_MSR0, TEMP_MSR1, TEMP_MSR2, TEMP_MSR3 }; const int mt8173_adcpnp[MT8173_NUM_SENSORS_PER_ZONE] = {