Received: by 2002:a25:2c96:0:0:0:0:0 with SMTP id s144csp1313570ybs; Mon, 25 May 2020 12:38:40 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwcGaBn2pL+yYDYZkhuuHh5+EGpq9bcGdyWKDdT3zrQw8qNnRM/qIck49vGYRy6MBUFoIkm X-Received: by 2002:a05:6402:2211:: with SMTP id cq17mr16116021edb.171.1590435519955; Mon, 25 May 2020 12:38:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590435519; cv=none; d=google.com; s=arc-20160816; b=Ya6dCW+r/Uo1b0VJSznWWCyzmQPRUSlWIE739zzujgwWAKoyOe8lnU93ABUavUjgpE pTI3s0ZZwIZ+c03Zcoeza5b/f8TsYp/uckPS7K/5Xf6MrJrt8lkqjYzxdLb27TnWrf7Q UBFrF1Chlfbv4Xv8vyO16X0SfB1nF0/XXiogNHPrZ2uTbweJLTzlgR2weUbpwNLgKxT/ V3MoqADxcedzDaBlQzi+0oeI8/bwxEg/76AvLUizM0ABaVx6i1Ificcgba66FZsaYUDT 6y4gGgKTYocTyvC974RUeEixl1tMqlH/yRdqlur9N9aZoMujClZe/KwuJi0waL4TNwqR DlWQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=iBXFsq/YRJNCwLhfCmeFdcjlel1EZijBKcYLRzOu38Q=; b=ZSvYP2TL6Hs01HPVc3r4zYszcDaJnd0z+GOFQE8sIbZLfDXVvbslawKk2g9BoFna+l wGdYJpRbxv8rGLXMpwpJ35GMKZcToBdiQzT8jd/h76DUjcvMrCm3EwapHkCLKzb8Ly4D GFxzlOcuh3vgaDVY7u/icsHe5yAhupa+2jwowCYXhxhJNPTCAi+JDqQIzkIlrDVh4IOZ Yydj6rl8+/D7/HBUUvVxSx5f1Q8KxWgMzswdFIMq9/vPh/7oVP0sZXoMV/tuvZaYKFJI 9a9o49DvHkDou15+nl3kPKeLe9X7zH8hwLDgoiWQBZsJydy2cCoeTDNNi2vtiA7hlI5A 5I0w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="gh/9+Yv0"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id s24si10221410ejx.153.2020.05.25.12.38.17; Mon, 25 May 2020 12:38:39 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="gh/9+Yv0"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390092AbgEYLWs (ORCPT + 99 others); Mon, 25 May 2020 07:22:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45254 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389897AbgEYLWs (ORCPT ); Mon, 25 May 2020 07:22:48 -0400 Received: from mail-wr1-x444.google.com (mail-wr1-x444.google.com [IPv6:2a00:1450:4864:20::444]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DBE55C05BD43 for ; Mon, 25 May 2020 04:22:47 -0700 (PDT) Received: by mail-wr1-x444.google.com with SMTP id l11so16810198wru.0 for ; Mon, 25 May 2020 04:22:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=iBXFsq/YRJNCwLhfCmeFdcjlel1EZijBKcYLRzOu38Q=; b=gh/9+Yv09sgbbtm3vqifgn2cPo3AJETQ4e9OZBODF204Lf4iGD8nsJqV4WvCsTgazk tcXETVo/y553zKNDOEa7REnmLWD7PguAm6tPteMqfHl2jFxSEGBexwggMjO0ydFAePUK B/Y83qEZoSvtMsAcKkZdzgOLIdsvhZRogL+Kn8FGa9VtVG012fC7yFS6yxnCau6/H3E8 URhZVGk2iN3e4nxqQ4EHWonIjP1NFtZiXJEBjCVMtAW9UMP8oR5qCb/H82/KHZYquEyX 0Vgw4bcLCm8FI8XnFP8ECKzzzkt8QzHENhpyOXi1aNPcyIgEo9BemP145SqWODRQziiW pg0A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=iBXFsq/YRJNCwLhfCmeFdcjlel1EZijBKcYLRzOu38Q=; b=RA7Ffv2wvDRGEa9EdR7Ya3Vj4CD/XjSpF/JjskxOt4yl3cvB8O+JInva8Mu51Yh3hC 9s2YhXNyuCJMbDuqiI+dgufJo+ebBlwQXIvjiB3z4H+10pG/4XE/K8ltlFy7wD1CEStL Z8hwUfPCzsY+PkPNAa5jk+BONp89TC6oqCe07ydTee4ePSBfCMx4atTH/0XWgsI2steZ 0LB8Mgs4vwsu5kcpEfWG23A8pvrz8ZqOkybaHm8TsNu/fxAieb8GFoY4IwEWZRwnIEEl sfkQpFMFo6AuEvvmQ4AaEU1iEh8FgJk6yPi0t/9qZ5+VMhZWYvZstxPD5xJ9miNHcSOW 220g== X-Gm-Message-State: AOAM532GkkTIt/AKrj30vpN6lUcnosnUjC9xqN6AyUCKz+LC2dZ8yVb8 IjvETMTxcZjn4mGQB96kW6ygYf6kxnM= X-Received: by 2002:a5d:40d0:: with SMTP id b16mr14590871wrq.218.1590405766298; Mon, 25 May 2020 04:22:46 -0700 (PDT) Received: from ?IPv6:2a01:e34:ed2f:f020:f5b2:610d:e426:c0dd? ([2a01:e34:ed2f:f020:f5b2:610d:e426:c0dd]) by smtp.googlemail.com with ESMTPSA id 30sm3905659wrd.47.2020.05.25.04.22.44 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 25 May 2020 04:22:45 -0700 (PDT) Subject: Re: [PATCH v3] thermal: qoriq: Update the settings for TMUv2 To: Yuantian Tang , rui.zhang@intel.com, edubezval@gmail.com Cc: linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org References: <20200525072106.12993-1-andy.tang@nxp.com> From: Daniel Lezcano Message-ID: <24d2d2c9-0f30-743b-dfe0-6acd2d3de367@linaro.org> Date: Mon, 25 May 2020 13:22:44 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 MIME-Version: 1.0 In-Reply-To: <20200525072106.12993-1-andy.tang@nxp.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 25/05/2020 09:21, Yuantian Tang wrote: > For TMU v2, TMSAR registers need to be set properly to get the > accurate temperature values. > Also the temperature read needs to be converted to degree Celsius > since it is in degrees Kelvin. > Signed-off-by: Yuantian Tang > --- [ ... ] > @@ -202,6 +213,8 @@ static void qoriq_tmu_init_device(struct qoriq_tmu_data *data) > } else { > regmap_write(data->regmap, REGS_V2_TMTMIR, TMTMIR_DEFAULT); > regmap_write(data->regmap, REGS_V2_TEUMR(0), TEUMR0_V2); > + for (i = 0; i < 7; i++) Please wrap this litteral 7 to an explicit constant name > + regmap_write(data->regmap, REGS_V2_TMSAR(i), TMSARA_V2); > } > > /* Disable monitoring */ > @@ -212,6 +225,7 @@ static const struct regmap_range qoriq_yes_ranges[] = { > regmap_reg_range(REGS_TMR, REGS_TSCFGR), > regmap_reg_range(REGS_TTRnCR(0), REGS_TTRnCR(3)), > regmap_reg_range(REGS_V2_TEUMR(0), REGS_V2_TEUMR(2)), > + regmap_reg_range(REGS_V2_TMSAR(0), REGS_V2_TMSAR(15)), > regmap_reg_range(REGS_IPBRR(0), REGS_IPBRR(1)), > /* Read only registers below */ > regmap_reg_range(REGS_TRITSR(0), REGS_TRITSR(15)), > -- Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog