Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp1025833ybt; Fri, 19 Jun 2020 22:03:30 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwtWYWa5/18URTp1LOV0/cq1rJRmkndixozAlZ7dBe/YvQYMiK17tKUScLvcW/r1vQMOJ6w X-Received: by 2002:a05:6402:b31:: with SMTP id bo17mr6852893edb.152.1592629410743; Fri, 19 Jun 2020 22:03:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592629410; cv=none; d=google.com; s=arc-20160816; b=dTlATZ+bJIVpS/FxgdCSXPI4wPjUExtpjit059jz9GIifXqfmMhHyEIjA7Z9SPpGYu hjkD2500dJ5QCm3LDW1WDlNGe5PM4JWuS8Bhqqm/sf8lAU8Xu8fswLd3x6ulzL4P3Nb0 LKZ6ObV98Pmyw//CELAVcrfj7j3WzXWJBEAwPhHz8o3oTre9P800/xV+92C4Zgqj8n6L gQYwZKm9VjNEmGQGOT4EiI0rNMhGEyrEeTeYWw0B5Ah9UEPNbazY5lIezdVvuHeAivyK jis5HOLJBwFZaAUJHCLMr6GpPb6SsjalvvMkeaUPGkr6N3ng+jDygnlYgculPhRnGFpx gtpw== 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=kAIt0Z+/hTe3smQtreW0Qb1ua6eXXNRNjDK8SIGfWDM=; b=cXKilOYuPWtw974kRmCUNGxCxOn2z4xWkJJ3GpplfK14QtT+8n4Oa/lePV0l/Anfke WNspdsP1nO+3YSnv/9fdrZyyVHLLk7I1QXWZ+Ccn2r/BhR+LgC9CRBmBReIMqvjoM+lJ GYt1MRk1WshpN4zVPrZoq6WdJJJgRCzoasJRjj3+6TPj07/m0zNJD5HCqGarcl1gaKoX 7QHge98oZ9tnJmrbHoC8BCCBTZhfeTZdC2Shzm62z6KZcIv1dRS98lokga23ZUl5e2q3 54Of7QjO9b4SITjz8FLp+P8vRcg+5lWjV+e4t6itXVeMc6zI3cLZwK/LhP4ju+IlsoUe c0Tg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=VGckMN+j; 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 a24si5258794ejr.16.2020.06.19.22.03.08; Fri, 19 Jun 2020 22:03:30 -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=VGckMN+j; 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 S1731577AbgFTB4B (ORCPT + 99 others); Fri, 19 Jun 2020 21:56:01 -0400 Received: from mailgw02.mediatek.com ([1.203.163.81]:37806 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1731502AbgFTB4A (ORCPT ); Fri, 19 Jun 2020 21:56:00 -0400 X-UUID: 2bc787466c3b412ba3838d3a1bf1cd50-20200620 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=kAIt0Z+/hTe3smQtreW0Qb1ua6eXXNRNjDK8SIGfWDM=; b=VGckMN+jdN3CeRRluUgomATFn0SnbT252Jn9hLGaJFtPBMM4mwWdoQEX6JaHHXcvasXeL0YE+lbgskQtE5eUb+PfAJJlP0wHTikRSjoPk7oQhlUD6+VTN63l753i7hgdLwAI5RksuFezaoNh8JB2wE6d1sj9GOn/JRxlO799bzw=; X-UUID: 2bc787466c3b412ba3838d3a1bf1cd50-20200620 Received: from mtkcas32.mediatek.inc [(172.27.4.253)] by mailgw02.mediatek.com (envelope-from ) (mailgw01.mediatek.com ESMTP with TLS) with ESMTP id 302378567; Sat, 20 Jun 2020 09:55:45 +0800 Received: from MTKCAS32.mediatek.inc (172.27.4.184) by MTKMBS32N1.mediatek.inc (172.27.4.71) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Sat, 20 Jun 2020 09:55:40 +0800 Received: from [10.17.3.153] (10.17.3.153) by MTKCAS32.mediatek.inc (172.27.4.170) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Sat, 20 Jun 2020 09:55:43 +0800 Message-ID: <1592617990.25512.76.camel@mhfsdcap03> Subject: Re: [PATCH] i2c: mediatek: Add to support continuous mode From: Qii Wang To: Qiangming Xia CC: , Wolfram Sang , , , , , , Date: Sat, 20 Jun 2020 09:53:10 +0800 In-Reply-To: <20200619080643.25269-1-qiangming.xia@mediatek.com> References: <20200619080643.25269-1-qiangming.xia@mediatek.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.10.4-0ubuntu2 MIME-Version: 1.0 X-TM-SNTS-SMTP: 4B7D04965D99C8E8AF5B5E03961F4F8A7670FB6F82AA58D6E2B40474FE35321E2000: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 T24gRnJpLCAyMDIwLTA2LTE5IGF0IDE2OjA2ICswODAwLCBRaWFuZ21pbmcgWGlhIHdyb3RlOg0K PiBGcm9tOiAicWlhbmdtaW5nLnhpYSIgPHFpYW5nbWluZy54aWFAbWVkaWF0ZWsuY29tPg0KP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