Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp412018ybt; Wed, 8 Jul 2020 03:01:37 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxgBv9pM1zNs8NcpmmInKGQo1/VSyb5sVSuiaZtQUcs8Hr/B+UmrAdAU4BbUwpz4lOb1Pda X-Received: by 2002:a17:906:ccd3:: with SMTP id ot19mr55190223ejb.468.1594202497356; Wed, 08 Jul 2020 03:01:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594202497; cv=none; d=google.com; s=arc-20160816; b=XxscNs178Tv7HUIRTngASIXIaDNo/hsMZGiOuQ6Z8er3iae3GIPeauXga/vsEISh9F GlfxPwjGF/lU8/BL6k8ac1X5viOBqoclGu1D8YyU31gI+qW1IV6WCTuPbDYknuNvgBH9 lHEhqykSDElqGHPoF3QzabY0s0WIu3DhfOM14Qay+Qzn1X/fWhzrmhV+MrRKi/fHPvPH GxW+lGYSY07XY7nrFWC3Ej5fe+E4A08FdmP8sV55raU2rn/jSIrlOOkxdFciEoAKDDLN ZTqF1nZj/PbBVkMwkVYab/dfJB5QEvL4qP/mCDR9RDfm2Oo7GDLB+CPXAZhZ8vkIYu38 vOfg== 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=mNBRD0ukUR3We0EMt+SXwtboaBMsJAHJGnz1Pk9Q/bw=; b=I3Q6SOBZXewsr9faOwc2ZQc8rW3o6RiPqfXWXJCJLdnaZEc5p555uu/hm5/s0VspHF j+RDQTAUClvzkU5Aaz732vHN6PPhyLFDxHcUEfQXIl2CPEzf0LwOPafOSw8iYW/ZSRJv 8gNtwVM3CVCO8XAXjb6kHJlqC97C1CcT9eHtxqwAGsxVsaBwzq1YXrmM2ExYsKK/0Mvw Zo/WS29F3J0pVBg7S1673jpTuXNZX0sWejXdImyglDHjzVK0jhI9qA4PF/flbB0mIy+g JjSBotbl0+Jlv1SQ78Q9NsXsd8MW+/cH5Vzb8RnChWgfMFkxYzH12TGjTVoqz6p7ZXmV ZgjA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=MeOHIASa; 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 i3si17250887edr.555.2020.07.08.03.01.13; Wed, 08 Jul 2020 03:01:37 -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=MeOHIASa; 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 S1728321AbgGHKAl (ORCPT + 99 others); Wed, 8 Jul 2020 06:00:41 -0400 Received: from mailgw02.mediatek.com ([210.61.82.184]:41354 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726196AbgGHKAk (ORCPT ); Wed, 8 Jul 2020 06:00:40 -0400 X-UUID: 1ba09f5c50ff4620baf021339969ea33-20200708 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=mNBRD0ukUR3We0EMt+SXwtboaBMsJAHJGnz1Pk9Q/bw=; b=MeOHIASaSgC9MchyaIOVqbJjEikbT8wid8K2gQCN1g7E92/rQ/dIF5C8BUjVIVTjexpWDNcIsAtw6aDfz1qapoMlliIeCQ96J76I1ih641G4uwlo7m6SaRS1f8mQ60W304uIOv5J3fZm8jD0ME/u6aHjDnqc3GbKYw70xefi42o=; X-UUID: 1ba09f5c50ff4620baf021339969ea33-20200708 Received: from mtkcas07.mediatek.inc [(172.21.101.84)] by mailgw02.mediatek.com (envelope-from ) (Cellopoint E-mail Firewall v4.1.10 Build 0809 with TLS) with ESMTP id 662547110; Wed, 08 Jul 2020 18:00:35 +0800 Received: from mtkcas08.mediatek.inc (172.21.101.126) by mtkmbs07n1.mediatek.inc (172.21.101.16) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Wed, 8 Jul 2020 18:00:31 +0800 Received: from [172.21.84.99] (172.21.84.99) by mtkcas08.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Wed, 8 Jul 2020 18:00:32 +0800 Message-ID: <1594202433.20216.5.camel@mtksdccf07> Subject: Re: [v4,7/7] thermal: mediatek: use spinlock to protect PTPCORESEL From: Michael Kao To: Daniel Lezcano CC: Matthias Brugger , Zhang Rui , Eduardo Valentin , Rob Herring , Mark Rutland , , , , , , , Date: Wed, 8 Jul 2020 18:00:33 +0800 In-Reply-To: <4c9e9abf-1f87-ae68-3827-22df52adfd19@linaro.org> References: <20200323121537.22697-1-michael.kao@mediatek.com> <20200323121537.22697-8-michael.kao@mediatek.com> <1afbf412-fbeb-8abe-66d8-bd7ac4e9dd83@linaro.org> <1591329023.12739.0.camel@mtksdccf07> <4c9e9abf-1f87-ae68-3827-22df52adfd19@linaro.org> 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 T24gVHVlLCAyMDIwLTA3LTA3IGF0IDEwOjEz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