Received: by 2002:a05:6a10:a852:0:0:0:0 with SMTP id d18csp1050725pxy; Wed, 5 May 2021 22:19:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwr2/LCU+tygatcyPQ4szlGm9DDeIgCELiRScVKzMCB1lwYH6uLl0dyPFECTjN3gypX3U+x X-Received: by 2002:a17:906:5052:: with SMTP id e18mr2467266ejk.112.1620278344239; Wed, 05 May 2021 22:19:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620278344; cv=none; d=google.com; s=arc-20160816; b=bG26s3MVf0ZqTp8/EE+AvAEejwBByuUXCbVkaZyZaOc9vBk9aVgJI8Kn7m8VMj/dSw crmqF2SwNGkjGkBDSgGJNJ+NJMIA6cDBCdicA4DnqX8eDAVfA8cmxJ94UUXZIMG4a3l5 Gp27OVLH1TxEYCUlUrxM2irU9oFiMbdwpHdaDwqnBmqiMQ1HTon3Avosr5FCkoPXYNOx FrFkNofpbsdT+Rh9qqKpu2YrvUwKhdU09GZiIuV79Vso1Nr+nmTV2y/w/00MaAQTJTxN ielTFBcxNTpY683Zsz61Si52C+nIkyy7E8+hW0IurqFZ8XHPG+ewM7uqusUD/FL0d/Yc kbpQ== 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=17Jnw/ww2KDeqO9BQ4PypTwrYjq+s7T1OWaDGZZDDMw=; b=Ea4Ier1pce6tluKMwIfSgjwIzjgZZIo/VvXFhVpqf05LkLffN02OsE58VHsX/brTWE 2w+ZpCwluPI6Wee3TaVIDcnxcnddbUpkI9XacMoXMbmfcvokPjBf/zZv7UhZeO50kmnm PtNkWeVNfm4+yP/33fZdpyUjADmOF/okbgJ/sS7GVjfNYREmIgzGRNWF3JDySLHFwLOh yiUyU8j3PiMe9hWSAye0wZI/JgzaX3Yq/s5HGn3hW24i7SG+c/YZWESS/Si5mlYUcaT2 pj9d5/iWvhTyDqBa3zu5tt2h0u/xF2SpD9VdvzszOkl6q9GapPPlHYYZxMyUM+YystaU 5UKw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=hsC7GXeT; 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 p5si1598739edt.42.2021.05.05.22.18.40; Wed, 05 May 2021 22:19:04 -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=hsC7GXeT; 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 S232521AbhEFFPg (ORCPT + 99 others); Thu, 6 May 2021 01:15:36 -0400 Received: from mailgw02.mediatek.com ([210.61.82.184]:35252 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S229622AbhEFFPf (ORCPT ); Thu, 6 May 2021 01:15:35 -0400 X-UUID: 6b5109bf0eff49f38d4bc26565055b5b-20210506 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=17Jnw/ww2KDeqO9BQ4PypTwrYjq+s7T1OWaDGZZDDMw=; b=hsC7GXeTKHxAUgTVLfdILOt0zQ/GJ7w1A0heQB5hnxv3LjOb/hGeOPuIefHZ5ZIqOb+G1DGFfBaZBFNp5st7LXSLM9atYbQwLv0V11iKkdsVuICWsziahqkSJ54G6MzLRmM5AgAMWmI+jAEPtGGeY2u6scj7AoH+xOWfiTE2j/A=; X-UUID: 6b5109bf0eff49f38d4bc26565055b5b-20210506 Received: from mtkcas10.mediatek.inc [(172.21.101.39)] by mailgw02.mediatek.com (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-SHA384 256/256) with ESMTP id 481262748; Thu, 06 May 2021 13:14:33 +0800 Received: from mtkcas10.mediatek.inc (172.21.101.39) by mtkmbs06n2.mediatek.inc (172.21.101.130) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Thu, 6 May 2021 13:14:32 +0800 Received: from mtksdccf07 (172.21.84.99) by mtkcas10.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Thu, 6 May 2021 13:14:32 +0800 Message-ID: <729667920f755d073217a5c52bfe4e20166cce80.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, 6 May 2021 13:14:31 +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: 2F4DE87A9348A7639CFC7C76826AEE09D7E2C7CE38A45FDE8414C866EA4E0B3B2000:8 X-MTK: N Content-Transfer-Encoding: base64 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org SGkgTWFpbnRhaW5lcnMsDQoNCkdlbnRsZSBwaW4gZm9yIHRoaXMgcGF0Y2guDQoNClRoYW5rcw0K DQpPbiBGcmksIDIwMjEtMDQtMDkgYX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