Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp855565ybt; Tue, 7 Jul 2020 01:50:37 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwwtCkpDqFjKeyH6ODvLKqItQFuSbHX9PiSvWgX/dANf4mmHt2Mv+ZPnu1Q89yORqktgyCB X-Received: by 2002:a17:906:17c8:: with SMTP id u8mr47378638eje.129.1594111837489; Tue, 07 Jul 2020 01:50:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594111837; cv=none; d=google.com; s=arc-20160816; b=bLfC5V2z+Yv1woWhcMDW8m2l1Z6LnKWiXscb5QH1Ahd3MaggCIxcUMhzICtwu+VeIA OUDdODUWZYCK2Ce1MfQA19I5BesuwHTMrYHrR4sXM8P7ZBk5oHyLyGX0EIMlcaypyN3U SOSM5s8vnp7qO6ZSSKnWQq7imjsjUuHytidx2G91gHITwK1BDC1VhRYZTtYnjUpTReNs i24CYRJKUaf7lW6K5cYEq+ohAbFMaTzptzG/X0GAdKapPiT+l0vsUJDwI2O/fAQBW3Xa LzYu6wNjx7zltabFHfgUijNfMr78bz7Vhm80l8/DoaaNw6GH3ge0GL9Bq11/SMkXIzxQ G5Nw== 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=Sb6d6du+u32xmEH+8AWhjNciizqqo2v3LVQNgcuf8xc=; b=mQ8JMcwIndqbpQFsB/VQHRvqLOibirMj7dMHCh27AYFkWmuYoaRAqfGQir8GBLXZzL 8WysNeQEdCEJ7s9xrJ77PXKmbVp6NEQzq2VAv6pk8d2igdTm8b49bJEkD8cbLqDI4qFv ifwfMDN+uBgkTLavzP5vL+RDnQWGnDC8JoAMIsVbYNr5fj2aO/nDSresxfHyF8kb0lxl shBsCiJd1RmDfGf8lCeGdue7Q9ZAOWaXQDxgkGDj+xImYQFHvIk8RsQ/9sBHud/rWcGP GfqCySfkVPb10hSCW6gu2IpsepjBISfKu6JROEeOfXiEC3WW8nAV0JiVnHQXmKMH72A1 YhCw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=O96Ns1d2; 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 i16si11276402ejx.549.2020.07.07.01.50.13; Tue, 07 Jul 2020 01:50: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=O96Ns1d2; 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 S1728025AbgGGIru (ORCPT + 99 others); Tue, 7 Jul 2020 04:47:50 -0400 Received: from mailgw01.mediatek.com ([210.61.82.183]:13122 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1727895AbgGGIru (ORCPT ); Tue, 7 Jul 2020 04:47:50 -0400 X-UUID: d379f8817aa84013b6cbfe0ec8dc7a4f-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=Sb6d6du+u32xmEH+8AWhjNciizqqo2v3LVQNgcuf8xc=; b=O96Ns1d2LzR694tV50AhWc0QqxsNU4NPGIU1GpN8rmkgDMp51ZhY6cDbKdha2dvIUkgIRWpO9shDhOkDpVdH9PfsJizCvFE3hHtWyh8GQ7V9UlF9hY5wPb9yv/x5s11YuWS3VOtS3FVRKAByXFWW0mpyO5NcqtLeg5kzDvCmLgg=; X-UUID: d379f8817aa84013b6cbfe0ec8dc7a4f-20200707 Received: from mtkcas10.mediatek.inc [(172.21.101.39)] by mailgw01.mediatek.com (envelope-from ) (Cellopoint E-mail Firewall v4.1.10 Build 0809 with TLS) with ESMTP id 8566352; Tue, 07 Jul 2020 16:47:38 +0800 Received: from mtkcas07.mediatek.inc (172.21.101.84) by mtkmbs02n2.mediatek.inc (172.21.101.101) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Tue, 7 Jul 2020 16:47:26 +0800 Received: from [172.21.84.99] (172.21.84.99) by mtkcas07.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Tue, 7 Jul 2020 16:47:28 +0800 Message-ID: <1594111649.20216.4.camel@mtksdccf07> Subject: Re: [RESEND PATCH] thermal: mediatek: add suspend/resume callback From: Michael Kao To: Zhang Rui CC: Daniel Lezcano , Mark Rutland , "devicetree@vger.kernel.org" , srv_heupstream , "linux-pm@vger.kernel.org" , Louis Yu =?UTF-8?Q?=28=E6=B8=B8=E6=94=BF=E9=8C=95=29?= , "linux-kernel@vger.kernel.org" , "Eduardo Valentin" , Rob Herring , "linux-mediatek@lists.infradead.org" , "hsinyi@chromium.org" , Matthias Brugger , "linux-arm-kernel@lists.infradead.org" Date: Tue, 7 Jul 2020 16:47:29 +0800 In-Reply-To: <1589445965.21630.1.camel@mtksdccf07> References: <20200408090558.12410-1-michael.kao@mediatek.com> <20200408090558.12410-2-michael.kao@mediatek.com> <1589445965.21630.1.camel@mtksdccf07> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.2.3-0ubuntu6 MIME-Version: 1.0 X-TM-SNTS-SMTP: 08AFF907D1819612281EBDF5C665FBC23C45F392B81BE59DD745AE1F7CF801DD2000:8 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 T24gVGh1LCAyMDIwLTA1LTE0IGF0IDE2OjQ2ICswODAwLCBNaWNoYWVsIEthbyB3cm90ZToNCj4g T24gV2VkLCAyMDIwLTA0LTA4IGF0IDE3OjA1ICswODAwLCBNaWNoYWVsIEthbyAo6auY5oyv57+U KSB3cm90ZToNCj4gPiBGcm9tOiBMb3VpcyBZdSA8bG91aXMueXVAbWVkaWF0ZWsuY29tPg0KPiA+ IA0KPiA+IEFkZCBzdXNwZW5kL3Jlc3VtZSBjYWxsYmFjayB0byBkaXNhYmxlL2VuYWJsZSBNZWRp YXRlayB0aGVybWFsIHNlbnNvcg0KPiA+IHJlc3BlY3RpdmVseS4gU2luY2UgdGhlcm1hbCBwb3dl ciBkb21haW4gaXMgb2ZmIGluIHN1c3BlbmQsIHRoZXJtYWwgZHJpdmVyDQo+ID4gbmVlZHMgcmUt aW5pdGlhbGl6YXRpb24gZHVyaW5nIHJlc3VtZS4NCj4gPiANCj4gPiBTaWduZWQtb2ZmLWJ5OiBM b3VpcyBZdSA8bG91aXMueXVAbWVkaWF0ZWsuY29tPg0KPiA+IFNpZ25lZC1vZmYtYnk6IE1pY2hh ZWwgS2FvIDxtaWNoYWVsLmthb0BtZWRpYXRlay5jb20+DQo+ID4gLS0tDQo+ID4gIGRyaXZlcnMv dGhlcm1hbC9tdGtfdGhlcm1hbC5jIHwgMTUyICsrKysrKysrKysrKysrKysrKysrKysrKysrKysr Ky0tLS0NCj4gPiAgMSBmaWxlIGNoYW5nZWQsIDEzNCBpbnNlcnRpb25zKCspLCAxOCBkZWxldGlv bnMoLSkNCj4gPiANCj4gPiBkaWZmIC0tZ2l0IGEvZHJpdmVycy90aGVybWFsL210a190aGVybWFs LmMgYi9kcml2ZXJzL3RoZXJtYWwvbXRrX3RoZXJtYWwuYw0KPiA+IGluZ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V0Ow0KPiA+ICsgICAgICAgICAgICAgICBnb3RvIGVycl9kaXNhYmxlX2Nsa19hdXhh ZGM7DQo+ID4gICAgICAgICB9DQo+ID4gDQo+ID4gICAgICAgICByZXQgPSBjbGtfcHJlcGFyZV9l bmFibGUobXQtPmNsa19wZXJpX3RoZXJtKTsNCj4gPiAgICAgICAgIGlmIChyZXQpIHsNCj4gPiAg ICAgICAgICAgICAgICAgZGV2X2VycigmcGRldi0+ZGV2LCAiQ2FuJ3QgZW5hYmxlIHBlcmkgY2xr OiAlZFxuIiwgcmV0KTsNCj4gPiAtICAgICAgICAgICAgICAgZ290byBlcnJfZGlzYWJsZV9jbGtf YXV4YWRjOw0KPiA+ICsgICAgICAgICAgICAgICBnb3RvIGVycl9kaXNhYmxlX2Nsa19wZXJpX3Ro ZXJtOw0KPiA+ICAgICAgICAgfQ0KPiA+IA0KPiA+ICAgICAgICAgZm9yIChjdHJsX2lkID0gMDsg Y3RybF9pZCA8IG10LT5jb25mLT5udW1fY29udHJvbGxlciA7IGN0cmxfaWQrKykNCj4gPiAgICAg ICAgICAgICAgICAgZm9yIChpID0gMDsgaSA8IG10LT5jb25mLT5udW1fYmFua3M7IGkrKykNCj4g PiAtICAgICAgICAgICAgICAgICAgICAgICBtdGtfdGhlcm1hbF9pbml0X2JhbmsobXQsIGksIGFw bWl4ZWRfcGh5c19iYXNlLA0KPiA+IC0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICBhdXhhZGNfcGh5c19iYXNlLCBjdHJsX2lkKTsNCj4gPiArICAgICAgICAgICAg ICAgICAgICAgICBtdGtfdGhlcm1hbF9pbml0X2JhbmsobXQsIGksIG10LT5hcG1peGVkX3BoeXNf YmFzZSwNCj4gPiArICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg bXQtPmF1eGFkY19waHlzX2Jhc2UsIGN0cmxfaWQpOw0KPiA+IA0KPiA+ICAgICAgICAgcGxhdGZv cm1fc2V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