Received: by 2002:a05:7412:b995:b0:f9:9502:5bb8 with SMTP id it21csp2650842rdb; Mon, 25 Dec 2023 23:37:14 -0800 (PST) X-Google-Smtp-Source: AGHT+IFCNFyvXrnAZA+eEk3ZMSJ4/RS/Xilj801maJp+gNXrI2iSJ69jWxlGkxmIdGfahdDD4pPi X-Received: by 2002:a05:6214:ca4:b0:67f:5db:f4f2 with SMTP id s4-20020a0562140ca400b0067f05dbf4f2mr11708024qvs.52.1703576234410; Mon, 25 Dec 2023 23:37:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703576234; cv=none; d=google.com; s=arc-20160816; b=qfJSwBGsYOTAK5vVmHKaNfFdK0U67eqBjtNsrdvP3Ovo65I19ajz2nm69Ze+V3yXHa um7MxOfZNNtcdCvbuS7qN4mVqui8Hrj1K/SrKz/5tCIBqcU8L8XzSGi1PbXg8YKy2Utg YJ+owPSXFGPXh11h0IPTb968Wd5ncPU24vk2yhK3a2QHVeZTbWBOIkt3HlxkrxPeVfUn +WPQGD+bA5ehn6AsFHjBMUdu/6z3w1TkqD6NU83vW1ORFhs3+euOUMac3xNXfjE7gkBd u3gYA9y3W27WnOGRtyU7uAcUK9HjJeYEUKYROOIXy5UZ7W1VjHqYOPGl/uEoaAjqoyNO 1T0Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :content-transfer-encoding:content-language:accept-language :in-reply-to:references:message-id:date:thread-index:thread-topic :subject:cc:to:from; bh=ghMovFy3NPzhE0IQQqL0s92i7wiMtvSVv+uk5MCxJmI=; fh=BxyC0e7bhAnIUnQdJbwbePGkL66JAGmqk45UhfipMxs=; b=ceKaoUqUM/alQPF8sn0zFFG9EbEFltV4vsVW8fH84joLwcKsPHF5F2fp8GjYgP7x80 x9g56dB0kML8eIP/3YJdmk05HVDU/HDOaKWem09ECFyYCJ+hHL73swmBYOMwtKG3RDM9 TW8UHUSwQJ8BQcyvNKvcdQU0g89Y2UHB7IMO2RSKewh0vI1lMBghUdb6c9aWzmDlBx6V 9eSjVF2HsuDstYTKdXkQAzsM/qczJTDoFs5aIfR/z6LCuF7UQy1lQiSzTsTXK4I1ogCk P53w7cC9EdCWBoSrwsh4ZYPZVtQ/2+lPzMsoukUpRrqskjBRfn+kzg6F62Tve1JzixqW fZbQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-11401-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-11401-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id t19-20020a0cde13000000b0067f0cb35d16si11483589qvk.411.2023.12.25.23.37.14 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Dec 2023 23:37:14 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-11401-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-11401-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-11401-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 20A0B1C21D28 for ; Tue, 26 Dec 2023 07:37:14 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4E14F4C637; Tue, 26 Dec 2023 07:37:06 +0000 (UTC) X-Original-To: linux-kernel@vger.kernel.org Received: from rtits2.realtek.com.tw (rtits2.realtek.com [211.75.126.72]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2013A4C60C; Tue, 26 Dec 2023 07:37:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=realtek.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=realtek.com X-SpamFilter-By: ArmorX SpamTrap 5.78 with qID 3BQ7ar433332919, This message is accepted by code: ctloc85258 Received: from mail.realtek.com (rtexh36505.realtek.com.tw[172.21.6.25]) by rtits2.realtek.com.tw (8.15.2/2.95/5.92) with ESMTPS id 3BQ7ar433332919 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 26 Dec 2023 15:36:53 +0800 Received: from RTEXDAG02.realtek.com.tw (172.21.6.101) by RTEXH36505.realtek.com.tw (172.21.6.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.32; Tue, 26 Dec 2023 15:34:38 +0800 Received: from RTEXDAG02.realtek.com.tw (172.21.6.101) by RTEXDAG02.realtek.com.tw (172.21.6.101) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.7; Tue, 26 Dec 2023 15:34:38 +0800 Received: from RTEXDAG02.realtek.com.tw ([fe80::5d58:7838:d352:d6b8]) by RTEXDAG02.realtek.com.tw ([fe80::5d58:7838:d352:d6b8%5]) with mapi id 15.01.2375.007; Tue, 26 Dec 2023 15:34:38 +0800 From: =?big5?B?VFlfQ2hhbmdbsWmkbLZoXQ==?= To: Andy Shevchenko CC: Linus Walleij , Bartosz Golaszewski , Rob Herring , Krzysztof Kozlowski , Conor Dooley , "linux-gpio@vger.kernel.org" , "devicetree@vger.kernel.org" , "linux-kernel@vger.kernel.org" Subject: RE: [PATCH v4 2/2] Add GPIO support for Realtek DHC(Digital Home Center) RTD SoCs. Thread-Topic: [PATCH v4 2/2] Add GPIO support for Realtek DHC(Digital Home Center) RTD SoCs. Thread-Index: AQHaNKykAxQglRQ65UeKSWnkfMw4BLC0wdMAgAYrmgA= Date: Tue, 26 Dec 2023 07:34:37 +0000 Message-ID: <63983de33ce2415abb8b5b745db58911@realtek.com> References: <20231222075812.6540-1-tychang@realtek.com> <20231222075812.6540-3-tychang@realtek.com> In-Reply-To: Accept-Language: zh-TW, en-US Content-Language: zh-TW x-kse-serverinfo: RTEXDAG02.realtek.com.tw, 9 x-kse-antispam-interceptor-info: fallback x-kse-antivirus-interceptor-info: fallback Content-Type: text/plain; charset="big5" Content-Transfer-Encoding: base64 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-KSE-AntiSpam-Interceptor-Info: fallback X-KSE-ServerInfo: RTEXH36505.realtek.com.tw, 9 X-KSE-AntiSpam-Interceptor-Info: fallback X-KSE-Antivirus-Interceptor-Info: fallback X-KSE-AntiSpam-Interceptor-Info: fallback SGkgQW5keSwNCg0KVGhhbmsgeW91IGZvciB0aGUgcmV2aWV3Lg0KDQo+T24gRnJpLCBEZWMgMjIs IDIwMjMgYXQgMDM6NTg6MTJQTSArMDgwMCwgVHp1eWkgQ2hhbmcgd3JvdGU6DQo+PiBUaGlzIGRy aXZlciBlbmFibGVzIGNvbmZpZ3VyYXRpb24gb2YgR1BJTyBkaXJlY3Rpb24sIEdQSU8gdmFsdWVz LCBHUElPDQo+PiBkZWJvdW5jZSBzZXR0aW5ncyBhbmQgaGFuZGxlcyBHUElPIGludGVycnVwdHMu DQo+DQo+Li4uDQo+DQo+PiArICAgICBoZWxwDQo+PiArICAgICAgIFNheSB5ZXMgaGVyZSB0byBz dXBwb3J0IEdQSU8gb24gUmVhbHRlayBESEMoRGlnaXRhbCBIb21lIENlbnRlcikNCj4+ICsgIC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gICAgICAgICAgICAgICAgICpkYXRpX29mZnNldDsNCj4+ICsgICAgIHU4ICAg ICAgICAgICAgICAgICAgICAgICppZV9vZmZzZXQ7DQo+PiArICAgICB1OCAgICAgICAgICAgICAg ICAgICAgICAqZHBfb2Zmc2V0Ow0KPj4gKyAgICAgdTggICAgICAgICAgICAgICAgICAgICAgKmdw YV9vZmZzZXQ7DQo+PiArICAgICB1OCAgICAgICAgICAgICAgICAgICAgICAqZ3BkYV9vZmZzZXQ7 DQo+PiArICAgICB1OCAgICAgICAgICAgICAgICAgICAgICAqZGViX29mZnNldDsNCj4+ICsgICAg IHU4ICAgICAgICAgICAgICAgICAgICAgICpkZWJfdmFsOw0KPj4gKyAgICAgdTggICAgICAgICAg ICAgICAgICAgICAgKCpnZXRfZGViX3NldHZhbCkoY29uc3Qgc3RydWN0DQo+cnRkX2dwaW9faW5m byAqaW5mbywNCj4+ICsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICB1bnNpZ25lZCBpbnQNCj5vZmZzZXQsIHU4ICpyZWdfb2Zmc2V0LA0KPj4gKyAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHU4ICpzaGlmdCwgdTgNCj4+ ICtkZWJfaW5kZXgpOw0KPg0KPkJhc2ljYWxseSB5b3Ugc2hvdWxkIGdyb3VwIGlucHV0IHBhcmFt ZXRlcnMgYW5kIG91dHB1dCBmb3IgYmV0dGVyDQo+dW5kZXJzdGFuZGluZy4NCj4NCg0KSSB3aWxs IGRlZmluZSBhIHN0cnVjdHVyZSB0byBob2xkIHRoZSBuZWNlc3NhcnkgaW5mb3JtYXRpb24gZm9y IHRoZSBvdXRwdXQuDQoNCj4gICAgICAgIHU4ICAgICAgICAgICAgICAoKmdldF9kZWJfc2V0dmFs KShjb25zdCBzdHJ1Y3QgcnRkX2dwaW9faW5mbw0KPippbmZvLA0KPiAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAg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AgICAgaW50IGdpcnEgPSBpcnFfZmluZF9tYXBwaW5nKGRvbWFpbiwNCj5od2lycSk7 DQo+PiArICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1MzIgaXJxX3R5cGUgPQ0KPj4gKyBp cnFfZ2V0X3RyaWdnZXJfdHlwZShnaXJxKTsNCj4+ICsNCj4+ICsgICAgICAgICAgICAgICAgICAg ICAgICAgICAgIGlmICgoaXJxID09IGRhdGEtPmlycXNbMV0pICYmICgoaXJxX3R5cGUgJg0KPklS UV9UWVBFX1NFTlNFX01BU0spICE9DQo+PiArICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgIElSUV9UWVBFX0VER0VfQk9USCkpDQo+DQo+RG8geW91IG5lZWQgbWFzaz8gSXNuJ3Qg aXJxX3R5cGUgYWxyZWFkeSBwcm9wZXJseSBtYXNrZWQgaGVyZT8NCj4NCj4+ICsgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7DQo+PiArICAgICAgICAgICAgICAgICAg ICAgICAgICAgICBnZW5lcmljX2hhbmRsZV9kb21haW5faXJxKGRvbWFpbiwNCj5od2lycSk7DQo+ PiArICAgICAgICAgICAgICAgICAgICAgfQ0KPj4gKyAgICAgICAgICAgICB9DQo+PiArICAgICB9 DQo+DQoNCkl0IGhhcyBhbHJlYWR5IGJlZW4gbWFza2VkIGluIHRoZSBpcnFfZ2V0X3RyaWdnZXJf dHlwZS4gSSB3aWxsIHJldmlzZSBpdC4NCg0KPi4uLg0KPg0KPj4gKyAgICAgdTMyIGNscl9tYXNr ID0gQklUKGh3aXJxICUgMzEpIDw8IDE7DQo+PiArICAgICB1MzIgaWVfbWFzayA9IEJJVChod2ly cSAlIDMyKTsNCj4NCj5UaGlzIGJsb3dzIHRoZSBtaW5kLiBOZWVkcyBhIGNvbW1lbnQuDQo+DQoN ClRoZSBjbHJfbWFzayBpcyB1c2VkIHRvIGNsZWFyIHRoZSBncGEvZ3BkYSByZWdpc3RlcnM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