Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp675602ybt; Mon, 6 Jul 2020 20:10:41 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzX7NJzO6ACR4IJx21OqZBZLOtxFeZWgAYFKk8Z5Ar8N8vinyFtngogullWco9rkMuPb0lk X-Received: by 2002:a05:6402:ca1:: with SMTP id cn1mr46803890edb.223.1594091441207; Mon, 06 Jul 2020 20:10:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594091441; cv=none; d=google.com; s=arc-20160816; b=WFiUDry3xtxdN7/hQuJLyismbBpI8Ms15EAtwfz9wBSCPsP4X6/YldjFIJOMSHvI7G GnRIuehsGBTyZDrQedWzFAMPgZTcUTB4lGCaALEyVfoS3Q0oXNYGVaSzlyAcBEFpYRgp R1JxiA42wDj6nevZoMTgnEyAQHW9o92pTwtYjOjKBYgFmVdCz3mt2stItDXFZx2eQNN6 unZS7eq1KJ67l2bU7CBRhXyiCKgDyXWDe0JYxr+jeiV+1PzzBgFxqHYMHIrmcBB7quoN p2IvgLx3Loby8z2+WXcJaPoChnVpFlqcsSCc/UvuxCUPqqXL/30ShccUaLDKPcqowHyT bCUQ== 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:mime-version :references:in-reply-to:date:cc:to:from:subject:message-id :dkim-signature; bh=T+ZuskSCtDAA8wvmKSdUy+6kIp3oOV+tNxuPtAN8RIA=; b=baB/GSnaW6KHCx3qifzrA8PdPccKUWYtsGzHRbx64muFRfRkx2rxUYsWuLlehRjfcd 2OeqchfEVyzjRvlPJM81+wyTiXJFcIx1Eck0bWZhfkqyaBc+y8jsBogwFkkXbE6ECFhK LmGVcg/64Eg3a1GxCpw0Ordz4MV6HZZzPzC0ngW2jDu839wDa4i1FWcWYPuMsTx/IoBD tJ2FJWFoIAQg/hgVCoTHYv5n8kPBBMK2qWZvhqUGjf5ySDlfMuHCo8N6ryWRZIlqdEWM umSW3qKQxI5Ie1almCkLEbEinSbvtj+pUO7clC7jwIlQyJiojITIMXTekIsOyoCu5nO2 NADw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=LkwLLfSi; 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 h23si14170211edv.18.2020.07.06.20.10.17; Mon, 06 Jul 2020 20:10:41 -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=LkwLLfSi; 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 S1728218AbgGGDHl (ORCPT + 99 others); Mon, 6 Jul 2020 23:07:41 -0400 Received: from mailgw02.mediatek.com ([210.61.82.184]:17982 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726434AbgGGDHk (ORCPT ); Mon, 6 Jul 2020 23:07:40 -0400 X-UUID: f822552349a74e6e92034b424d467864-20200707 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=T+ZuskSCtDAA8wvmKSdUy+6kIp3oOV+tNxuPtAN8RIA=; b=LkwLLfSif7S916Snxc0RHUvNY3tZB1YmzBpmcdLZnU0ScfDngkYuOWMxUEZBT/q2SbNzfXbDw8VJYqzo04rqkheH4/Eao9xUTVn8aG8ydIx1dRRsSRRFlgFFQFbAprNvNPlrP7294gxLTa9fYGCakv32lx2HlPOi9O9bEqm/2ls=; X-UUID: f822552349a74e6e92034b424d467864-20200707 Received: from mtkcas10.mediatek.inc [(172.21.101.39)] by mailgw02.mediatek.com (envelope-from ) (Cellopoint E-mail Firewall v4.1.10 Build 0809 with TLS) with ESMTP id 1077106017; Tue, 07 Jul 2020 11:07:33 +0800 Received: from MTKCAS06.mediatek.inc (172.21.101.30) by mtkmbs07n2.mediatek.inc (172.21.101.141) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Tue, 7 Jul 2020 11:07:30 +0800 Received: from [172.21.84.99] (172.21.84.99) by MTKCAS06.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Tue, 7 Jul 2020 11:07:25 +0800 Message-ID: <1594091245.20216.3.camel@mtksdccf07> Subject: Re: [v4, 6/7] thermal: mediatek: add another get_temp ops for thermal sensors From: Michael Kao To: Daniel Lezcano CC: Matthias Brugger , Zhang Rui , Eduardo Valentin , Rob Herring , Mark Rutland , , , , , , , Date: Tue, 7 Jul 2020 11:07:25 +0800 In-Reply-To: References: <20200323121537.22697-1-michael.kao@mediatek.com> <20200323121537.22697-7-michael.kao@mediatek.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.2.3-0ubuntu6 MIME-Version: 1.0 X-MTK: N Content-Transfer-Encoding: base64 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org T24gRnJpLCAyMDIwLTA1LTIyIGF0IDE3OjMyICswMjAwLCBEYW5pZWwgTGV6Y2FubyB3cm90ZToN Cj4gT24gMjMvMDMvMjAyMCAxMzoxNSwgTWljaGFlbCBLYW8gd3JvdGU6DQo+ID4gUHJvdmlkZSB0 aGVybWFsIHpvbmUgdG8gcmVhZCB0aGVyb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