Received: by 2002:a05:6a10:a841:0:0:0:0 with SMTP id d1csp993265pxy; Wed, 28 Apr 2021 19:40:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzK51IAa2s8A/T697RrnGTswdPuCZJAN/CdypHLh0Wbcc132QLdRdZnOX7lAg/x9lHNXrMm X-Received: by 2002:a17:90b:30c3:: with SMTP id hi3mr22625971pjb.235.1619664058680; Wed, 28 Apr 2021 19:40:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1619664058; cv=none; d=google.com; s=arc-20160816; b=GDIF99og+taBvSHpZNkKP6wJ1bPU4eA6Ho8WL0x3oDK0kofcONojECAlyRZdIJvMfF sk9O1c8oUG2rz69Ea0Jo9aTvkIp5k8/oFEbLQ2QDf8OFtYTHYe6u+Pkt/kr9wpPWBaVt +TvwwmZ0W4X6CfvYpm24HaNBPqDADQvc6fsD668xLtf3mGPV4vxAc/JeRhUoob6Czw/G CBsvegJNfioRPKgMJaGNnFKJO//KoHeyb5daD1QRX+nXDj7ew81ezFhGBrr3t4sPwTLO L3YKAoRhKbnyv1ZFZBrQICUhjkLQiEg/F++hs1e3MBvLJNFzT+pbtzRlZnQUpJDQrOfq qVHQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:date:cc:to:from:subject:message-id :dkim-signature; bh=q/FaoQLv6QgSAico/USd2b8Yj3HsXw/rCw1Qjb021Po=; b=MVtthv0BkMebq+Um2UqRWEF+U9ArCz0q6C1P3yOf1yy+cLmRpJtdshcQw7Y2f8rUnf IW2lBOwGigIYhDYlnsNa6L2XpwatdE7jvcwc7vEgu/byayrxFSCb2xmmYYEse48F79JW 5Lx7NmiBuVcBA5HqZZkgUpCa6JlLcqxKmIw7xqV0mMm8YZTk0E3REyBvtbDd8q6/yUox e12yPJyj1PWkewD317Zs4gUVBZRYSQRFzQc2CPx3xJhS92r5yPTOZpz8Lm6wPMKQr37I PiAnBuWfb87GHZsY+fOWeTSSeFHJp81dX1J7Tm3A3ruJf0zpzMwvsvYICT8k1JTQL322 ECTQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=TAEQfl1v; 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=mediatek.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r10si1743527pff.291.2021.04.28.19.40.45; Wed, 28 Apr 2021 19:40:58 -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=@mediatek.com header.s=dk header.b=TAEQfl1v; 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=mediatek.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233240AbhD2Ck3 (ORCPT + 99 others); Wed, 28 Apr 2021 22:40:29 -0400 Received: from mailgw01.mediatek.com ([210.61.82.183]:51579 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S229805AbhD2Ck3 (ORCPT ); Wed, 28 Apr 2021 22:40:29 -0400 X-UUID: 80e2a5cdf8704ee9af038be2f67c37e6-20210429 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Transfer-Encoding:MIME-Version:Content-Type:References:In-Reply-To:Date:CC:To:From:Subject:Message-ID; bh=q/FaoQLv6QgSAico/USd2b8Yj3HsXw/rCw1Qjb021Po=; b=TAEQfl1vO0gIaLD1jQlFM7XspgDi81ZZJRuxRk2n4IQnuLdNjf8hS8meD5/TqPSLeV39ilCA3SpLSbvY1yXPR1J+kYEjCiNXFwQItY1HqqnxYuIXRVySlzY6KnubpLoUqWkAtyEPsDUD/yJoZhff/KX7lCt0gZIDwj1pcIQ2QDI=; X-UUID: 80e2a5cdf8704ee9af038be2f67c37e6-20210429 Received: from mtkmrs01.mediatek.inc [(172.21.131.159)] by mailgw01.mediatek.com (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-SHA384 256/256) with ESMTP id 878876303; Thu, 29 Apr 2021 10:39:12 +0800 Received: from mtkcas11.mediatek.inc (172.21.101.40) by mtkmbs02n2.mediatek.inc (172.21.101.101) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Thu, 29 Apr 2021 10:39:09 +0800 Received: from mtksdccf07 (172.21.84.99) by mtkcas11.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Thu, 29 Apr 2021 10:39:09 +0800 Message-ID: <91163899840b5009a9e02c3b08a6f4fbe194b40b.camel@mediatek.com> Subject: Re: [v7,3/3] thermal: mediatek: add another get_temp ops for thermal sensors From: Michael Kao To: Daniel Lezcano , , "Zhang Rui" , , , CC: Eduardo Valentin , Rob Herring , Mark Rutland , "Matthias Brugger" , , , , , Date: Thu, 29 Apr 2021 10:39:09 +0800 In-Reply-To: References: <20210316070144.28440-1-michael.kao@mediatek.com> <20210316070144.28440-4-michael.kao@mediatek.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.28.5-0ubuntu0.18.04.2 MIME-Version: 1.0 X-TM-SNTS-SMTP: E88A581E76E76BF163A2CF2E64BBB0620794D4DF9058610DBE80509E5CC1BC332000:8 X-MTK: N Content-Transfer-Encoding: base64 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org T24gRnJpLCAyMDIxLTA0LTA5IGF0IDEwOjE2ICswMjAwLCBEYW5pZWwgTGV6Y2FubyB3cm90ZToN Cj4gT24gMTYvMD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