Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp706946pxb; Thu, 21 Jan 2021 18:49:27 -0800 (PST) X-Google-Smtp-Source: ABdhPJwUyuaki6FNFILjKz8z2nVgtUKuM0W2VZpEUCL6S4nkEKB6e3xALArOm3btDkgLKemcuqSE X-Received: by 2002:a17:906:d159:: with SMTP id br25mr1567307ejb.398.1611283767340; Thu, 21 Jan 2021 18:49:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611283767; cv=none; d=google.com; s=arc-20160816; b=eHQis5g6hvtETY15hXLvBaBnTIW/X1szjTaAaTBd7tePa5prqIBYbCVlxQEMEj3D1h umcDPX3dy3UpbY/qZIe/mQ4BBL6+85UeqZ89hyCOWhxuzUu05bj2Mfo4vf5rPAbzoYhr 9L2dGSstcGc5IiU3niHDBNT8c3oKcICHegDWZekgNNgOhcnrzXo2SF0kC8OBSkvefSCm kQePdkDNe/v3CoQajafSDwdHmPaJtF6F1WtnZz9NIM7A9ylLRf/oEP9xlbSQEtQaDDtp NWlUkGpFrltcw6mjempFk/LFYNblFDqi92NElrgAtmkAkBRkEcHPV299wM3eFfM5H/Y0 eOOQ== 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=X5v+utYffwyTYKqjma24lnBW4YqumRxZipWEo8CW1UA=; b=AMrKD0EIz3p/5lyPLSetjREfCqSznoVuk97Ga5gGvTcDeUcHWaH0RaGGWVPhyJyDSZ gGqJpDieagPQ9dzHM90NP3TTqhWzM0TmTJVzLpOCwL4XENXgCSXDIA7DyEzn3HPdNd3N IK8sFesp2ZA9sOMZVl0VVEmwnh4++fmTyRhY1foiKHfrn8be1JEQHLzaWD6/lzLSUFVx H8qq0Za7JBHyyE4zxcPzk1jG9XldkNKl17ILnYNn2RWhAn5jC4OrdltTu6ydRIWi0ocI P7/PPfQGFZhVo5ScbsL1CAKl34AXARPk+glEUR04cT1PE4+uRwVlIiKe2j20lnOMtO+1 Wm9g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=uB21AbQM; 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 d17si2854000edv.443.2021.01.21.18.49.02; Thu, 21 Jan 2021 18:49:27 -0800 (PST) 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=uB21AbQM; 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 S1726354AbhAVCqJ (ORCPT + 99 others); Thu, 21 Jan 2021 21:46:09 -0500 Received: from Mailgw01.mediatek.com ([1.203.163.78]:38323 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726189AbhAVCqI (ORCPT ); Thu, 21 Jan 2021 21:46:08 -0500 X-UUID: 5da1692a6ec344309d23943903b1b2e7-20210122 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=X5v+utYffwyTYKqjma24lnBW4YqumRxZipWEo8CW1UA=; b=uB21AbQMY/Lzf0ceJ0Sx761xIJ+GFuEBdg3HWcpBKPm1dgux/GsjfQLu5zLrlsb3z/fkFGB6d8taTTA08lhISi8ejMyoFslIjRyXGsJMa2l6o+CHbjxxNoIC1tXM6Pkhxd6BOFmqJ/bejATI905JRQEpJ1gE9asm/Q4b8qrL6j0=; X-UUID: 5da1692a6ec344309d23943903b1b2e7-20210122 Received: from mtkcas34.mediatek.inc [(172.27.4.253)] by mailgw01.mediatek.com (envelope-from ) (mailgw01.mediatek.com ESMTP with TLSv1.2 ECDHE-RSA-AES256-SHA384 256/256) with ESMTP id 200082445; Fri, 22 Jan 2021 10:44:06 +0800 Received: from MTKCAS36.mediatek.inc (172.27.4.186) by MTKMBS31N1.mediatek.inc (172.27.4.69) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Fri, 22 Jan 2021 10:43:58 +0800 Received: from [10.17.3.153] (10.17.3.153) by MTKCAS36.mediatek.inc (172.27.4.170) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Fri, 22 Jan 2021 10:43:57 +0800 Message-ID: <1611283438.2493.23.camel@mhfsdcap03> Subject: Re: [PATCH RESEND] pinctrl: mediatek: Fix trigger type setting follow for unexpected interrupt From: mtk15103 To: Nicolas Boichat CC: Sean Wang , Linus Walleij , Matthias Brugger , "moderated list:ARM/Mediatek SoC support" , "open list:GPIO SUBSYSTEM" , linux-arm Mailing List , lkml , , srv_heupstream , Chen-Tsung Hsieh , , Hanks Chen , Yong Wu , Date: Fri, 22 Jan 2021 10:43:58 +0800 In-Reply-To: References: <20210121075149.1310-1-hailong.fan@mediatek.com> <1611230975.2493.17.camel@mhfsdcap03> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.10.4-0ubuntu2 MIME-Version: 1.0 X-TM-SNTS-SMTP: 228C2C3B488DEC2667858FCF6F39936DA79AEB4095B235C0ECF1B7731F7404092000:8 Content-Transfer-Encoding: base64 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org T24gVGh1LCAyMDIxLTAxLTIxIGF0IDIwOjEzICswODAwLCBOaWNvbGFzIEJ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lbHNlDQo+ID4gPiA+ICAgICAgICAg ICAgICAgICBlaW50LT5kdWFsX2VkZ2VbZC0+aHdpcnFdID0gMDsNCj4gPiA+ID4NCj4gPiA+ID4g KyAgICAgICBpZiAoIW10a19laW50X2dldF9tYXNrKGVpbnQsIGQtPmh3aXJxKSkgew0KPiA+ID4g PiArICAgICAgICAgICAgICAgbXRrX2VpbnRfbWFzayhkKTsNCj4gPiA+ID4gKyAgICAgICAgICAg ICAgIHVubWFzayA9IDE7DQo+ID4gPiA+ICsgICAgICAgfSBlbHNlIHsNCj4gPiA+ID4gKyAgICAg ICAgICAgICAgIHVubWFzayA9IDA7DQo+ID4gPiA+ICsgICAgICAgfQ0KPiA+ID4gPiArDQo+ID4g PiA+ICAgICAgICAgaWYgKHR5cGUgJiAoSVJRX1RZUEVfTEVWRUxfTE9XIHwgSVJRX1RZUEVfRURH RV9GQUxMSU5HKSkgew0KPiA+ID4gPiAgICAgICAgICAgICAgICAgcmVnID0gbXRrX2VpbnRfZ2V0 X29mZnNldChlaW50LCBkLT5od2lycSwgZWludC0+cmVncy0+cG9sX2Nscik7DQo+ID4gPiA+ICAg ICAgICAgICAgICAgICB3cml0ZWwobWFzaywgcmVnKTsNCj4gPiA+ID4gQEAgLTE4OSw4ICsxOTcs OSBAQCBzdGF0aWMgaW50IG10a19laW50X3NldF90eXBlKHN0cnVjdCBpcnFfZGF0YSAqZCwgdW5z aWduZWQgaW50IHR5cGUpDQo+ID4gPiA+ICAgICAgICAgICAgICAgICB3cml0ZWwobWFzaywgcmVn KTsNCj4gPiA+ID4gICAgICAgICB9DQo+ID4gPiA+DQo+ID4gPiA+IC0gICAgICAgaWYgKGVpbnQt PmR1YWxfZWRnZVtkLT5od2lycV0pDQo+ID4gPiA+IC0gICAgICAgICAgICAgICBtdGtfZWludF9m bGlwX2VkZ2UoZWludCwgZC0+aHdpcnEpOw0KPiA+ID4NCj4gPiA+IFdoeSBhcmUgeW91IGRyb3Bw aW5nIHRoaXM/IEFyZW4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