Received: by 2002:a05:6a10:d5a5:0:0:0:0 with SMTP id gn37csp5210063pxb; Tue, 5 Oct 2021 21:01:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxpZ7c14mVOXwMQ64mDrreFlnyCZXG5w2122ztp6VsZ8J0zzFwolPnhCLk4TINwoJnMjAr9 X-Received: by 2002:a05:6a00:1891:b0:446:c141:7d2a with SMTP id x17-20020a056a00189100b00446c1417d2amr35708541pfh.36.1633492916148; Tue, 05 Oct 2021 21:01:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633492916; cv=none; d=google.com; s=arc-20160816; b=fm2Q/4y/XxAm4bBWOlv2eL0mZOhPZQXqc2YxGqs++ueYLvF+S4exiYAMTOFtQg3fuF AvdtF2X2rKxxFYbDn/fnVKMWB+miuoHPA4zvWkU+3rt2+y85SST1iqvqmS/vmP7588dH 32qdQYTUB5EtfcM0V1U7gb175Ncfvs3HDvOLYniqFoiS33wZbX3OU+pOYmiQOC96uha+ zwiAnhPbro+d08SSB3JN0bpmWljbtOgISpC6TR0SrfWsFTuPTC5Qo8g6UcrePZWjTL7u clq9H/Lmz2bE4lfb2OLewyI8rae9EGjwkhZqa9hG0AZ2J6of3t1ook/b3vNYizUonv3j VUbw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:to:mime-version:content-transfer-encoding :content-language:accept-language:in-reply-to:references:message-id :date:thread-index:thread-topic:subject:cc:from:ironport-sdr; bh=WQIwHJZgBWfb4Xj/D/2vfAuvBNmN87bKj3kG0O8YZ7M=; b=pTJ++cvKLaESYVdTANSiYspS5v6YI6tjMBoZT1A4vcF129VIc35riIikptqCI6Vyg6 0Yim3eqDjLbaG9QfMI7/8D1/BXg4s4Jm7tVHZZBl0sVOAkgy10f2gpmO7B1I9FXROcFK /4EjYJYBeJS4wt/EBv5bx0w04ML+1c8O66XUTf07n/aquEsBaehIb2Fv0Dl6+EHB+oDA uxGjIKH2rl2+suWcNgSoSIB1prBMT3ee7pZz8QG4MYVhLKKpHMbRYE54OAstUyTD2zEN SJF7XRqbz7ozkf+CHyzztViPK7dj52rUownAbtjCqu51SQORk4JNQSgyADMFFMKibABm 5w+g== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id k10si27274716plt.217.2021.10.05.21.01.41; Tue, 05 Oct 2021 21:01:56 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229793AbhJFECR (ORCPT + 99 others); Wed, 6 Oct 2021 00:02:17 -0400 Received: from 60-251-196-230.hinet-ip.hinet.net ([60.251.196.230]:63001 "EHLO ironport.ite.com.tw" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229554AbhJFECQ (ORCPT ); Wed, 6 Oct 2021 00:02:16 -0400 X-Greylist: delayed 429 seconds by postgrey-1.27 at vger.kernel.org; Wed, 06 Oct 2021 00:02:15 EDT IronPort-SDR: HosUzv1IP9inQQn0uFDeVB9e8joJq+0GbAGuYPImpDZyuRgctJk5o3a+SrEfO50asUPpTQoJwl HUwefnZeIxEg== Received: from unknown (HELO mse.ite.com.tw) ([192.168.35.30]) by ironport.ite.com.tw with ESMTP; 06 Oct 2021 11:53:14 +0800 Received: from CSBMAIL1.internal.ite.com.tw (csbmail1.internal.ite.com.tw [192.168.65.58]) by mse.ite.com.tw with ESMTP id 1963r9A2041190; Wed, 6 Oct 2021 11:53:09 +0800 (GMT-8) (envelope-from allen.chen@ite.com.tw) Received: from CSBMAIL1.internal.ite.com.tw (192.168.65.58) by CSBMAIL1.internal.ite.com.tw (192.168.65.58) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2176.14; Wed, 6 Oct 2021 11:53:09 +0800 Received: from CSBMAIL1.internal.ite.com.tw ([fe80::dd22:b444:859b:61c7]) by CSBMAIL1.internal.ite.com.tw ([fe80::dd22:b444:859b:61c7%18]) with mapi id 15.01.2176.014; Wed, 6 Oct 2021 11:53:09 +0800 From: CC: , , , , , , , , , , , , , , , , , , Subject: RE: [PATCH v8] drm/bridge: add it6505 driver Thread-Topic: [PATCH v8] drm/bridge: add it6505 driver Thread-Index: AQHXjds2dUIA16sisEKuygPI0MN7NavFrweg Date: Wed, 6 Oct 2021 03:53:09 +0000 Message-ID: <49cd8222b18749f282b5dff0b1f36daa@ite.com.tw> References: <20210810111124.247838-1-allen.chen@ite.com.tw> In-Reply-To: <20210810111124.247838-1-allen.chen@ite.com.tw> Accept-Language: en-US Content-Language: zh-TW X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [192.168.70.16] x-tm-snts-smtp: E79F6F577DFF53B08AF11B0DD2CBA0E5094BBBDABBA0A53335427E6F06A98F572002:8 Content-Type: text/plain; charset="big5" Content-Transfer-Encoding: base64 MIME-Version: 1.0 X-MAIL: mse.ite.com.tw 1963r9A2041190 To: unlisted-recipients:; (no To-header on input) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org SGkNCg0KSXQgaGFzIGJlZW4gYWJvdXQgdHdvIG1vbnRocyBzaW5jZSBJIHBvc3RlZCB2OA0KQ29u c2lkZXIgdGhpcyBhIGdlbnRsZSBwaW5nLg0KDQpKdXN0IHdvbmRlcmluZyBpZiB0aGUgc2V0IG5l ZWRzIGFkZGl0aW9uYWwgd29yayBhbmQgSSB3aWxsIGZpeCBhbmQgdXBzdHJlYW0gYWdhaW4uDQo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