From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-11.6 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,NICE_REPLY_A,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2760EC433E2 for ; Fri, 17 Jul 2020 04:26:36 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 00C6320704 for ; Fri, 17 Jul 2020 04:26:36 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="eUL8MwSU" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726563AbgGQE0e (ORCPT ); Fri, 17 Jul 2020 00:26:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35848 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725936AbgGQE0d (ORCPT ); Fri, 17 Jul 2020 00:26:33 -0400 Received: from mail-wr1-x443.google.com (mail-wr1-x443.google.com [IPv6:2a00:1450:4864:20::443]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 69D9EC08C5C0 for ; Thu, 16 Jul 2020 21:26:33 -0700 (PDT) Received: by mail-wr1-x443.google.com with SMTP id z15so9576629wrl.8 for ; Thu, 16 Jul 2020 21:26:33 -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=LoCUtP8byPHdkiL2VvJP/PIMUDoLEvSomGOoDI3TEH0=; b=eUL8MwSUooNOIy0u9skl2Et94Mj8yJVYuS5nVceQJbHXsMvsPHn0KDAuVB15zh0oGw 2xt3MzqRtVJEJpZCtg7TtxoScYas+7vKfWz2nHVllEWxogynfT04AK9E3jpffboYshhH irioSZYr4JkX7p8mwgL9IMwfDlkPBF3i1YTQxZEJiWIVnVPz/pnRf0vAm9HLvlPrSR9w 6c4Hcqj5kgOxmal0KQP0pDedkmviWlTWTv3wMsVKNhP5mfT5XoWtsu20WpAlkzsEoqsp 752Cz6phrviS+klq1GMCG+ykHczCZK1VZnXVC29zsFe43T436Zjnv2lysudyF05nas/2 2Szw== 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=LoCUtP8byPHdkiL2VvJP/PIMUDoLEvSomGOoDI3TEH0=; b=Z+h8qwdRPyc6trysU8ksOu+exUgDSmqwARPZgBbwDm+4zwsHF9vJcWPbs6mvqBNgeB Lwa3H6iWcprNU+iC6tDNnb4MOP/hxYfwoSm3DvM/ShPos6Y3ZO0EWd7MC+KQD6KFBLM3 hcqxTZ+r2D7aAuVBTw7D7/UnnhupZnTYi0/wtL/9zVL/oI1Spkw1ttPS59gCgxWjeoQ5 3itOA7mqIsqDNFgAVKGekBMsSw4Pb2oMx5WfO3T70G3gH3cXfH/lBad8Rgc+1f8wyVE7 Ab6zr23OFApaUsarSNEAcepNr0cREDNS+isBvGUZ1K9xt6Sd9tvqkFEttmxI4MJxCS4T p3Lg== X-Gm-Message-State: AOAM533z/yxF7AeI+P8cv6ri7JVhSSabsZ2Rb9CG+3NLSi3YwbIEK5qe I5dwWwlDwxTKCKHsJoTEIzIENwJyWos= X-Google-Smtp-Source: ABdhPJxZRpGSv5FtriBWUwmet70Rne8lc1DFz2TGU/bz/xpz6vX0D33o8sMUKQ35HSmG//ceMjFJ8w== X-Received: by 2002:a5d:498f:: with SMTP id r15mr8883201wrq.175.1594959991866; Thu, 16 Jul 2020 21:26:31 -0700 (PDT) Received: from ?IPv6:2a01:e34:ed2f:f020:9880:a643:3e69:6393? ([2a01:e34:ed2f:f020:9880:a643:3e69:6393]) by smtp.googlemail.com with ESMTPSA id 138sm7191805wmb.1.2020.07.16.21.26.30 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 16 Jul 2020 21:26:31 -0700 (PDT) Subject: Re: [PATCH v4 08/16] thermal: sun8i: add TEMP_CALIB_MASK for calibration data in sun50i_h6_ths_calibrate To: Frank Lee , anarsoul@gmail.com, tiny.windzz@gmail.com, rui.zhang@intel.com, amit.kucheria@verdurent.com, mripard@kernel.org, wens@csie.org, linux-pm@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, huangshuosheng@allwinnertech.com, liyong@allwinnertech.com References: From: Daniel Lezcano Message-ID: <4771acd6-ecd3-b8e1-8605-75d78720b1d3@linaro.org> Date: Fri, 17 Jul 2020 06:26:30 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: 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 14/07/2020 09:13, Frank Lee wrote: > From: Yangtao Li > > For sun50i_h6_ths_calibrate(), the data read from nvmem needs a round of > calculation. On the other hand, the newer SOC may store other data in > the space other than 12bit sensor data. Add mask operation to read data > to avoid conversion error. > > Signed-off-by: Yangtao Li > Reviewed-by: Yangtao Li Can you clarify these SoB ? Frank Lee==Yangtao Li==frank@allwinnertech.com==tiny.windzz@gmail.com ? > --- > drivers/thermal/sun8i_thermal.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/thermal/sun8i_thermal.c b/drivers/thermal/sun8i_thermal.c > index 74d73be16496..f423d44b9290 100644 > --- a/drivers/thermal/sun8i_thermal.c > +++ b/drivers/thermal/sun8i_thermal.c > @@ -244,7 +244,7 @@ static int sun50i_h6_ths_calibrate(struct ths_device *tmdev, > ft_temp = (caldata[0] & FT_TEMP_MASK) * 100; > > for (i = 0; i < tmdev->chip->sensor_num; i++) { > - int sensor_reg = caldata[i + 1]; > + int sensor_reg = caldata[i + 1] & TEMP_CALIB_MASK; > int cdata, offset; > int sensor_temp = tmdev->chip->calc_temp(tmdev, i, sensor_reg); > > -- Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog