Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp2148063imm; Thu, 2 Aug 2018 07:02:46 -0700 (PDT) X-Google-Smtp-Source: AAOMgpcS1Aw4qdz6jUZ1HQCFUcMfcOUKF7GRt1r90ivIyVUikW6Cu2sNsmKlffZeKZWYU3Zv+Suh X-Received: by 2002:a62:225d:: with SMTP id i90-v6mr3118027pfi.246.1533218566904; Thu, 02 Aug 2018 07:02:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533218566; cv=none; d=google.com; s=arc-20160816; b=0rxAGskYcRY+HOLVAimSnTi/4s+sx3E/IirpHBncQlpxpM021ugmGRiqLLgY6v5uPs 2mNpdP2+JJh7Icqbz0IgcLSRGoSPJTB/MMc+sj7dnvC9n5yySemVjzagJsCmkMtv7qbl uJbxourQSwL75flPIKBiK+JzALn3bqb84fjqwyjFfbMZBTGdSeg/nRsU2vzy8YZgb8hm 8IaOenKTHTZ7LBg3BxWD/AV7HRemOe5TDdPtQdaygL7tfROvDtlzgkd0S675SwTPwZZX 0paLJw7U92XKxBY9DCypfhC0W7S/NXBvS7fBRRyAxmj0oR7qCGLuXQ0KUprVEyynLvuU z1RA== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:arc-authentication-results; bh=R3HhQfuc2RMAHhWeOcF21QU+7KmfssjmFfYgEeW6VvM=; b=zj8Vb2q4Pw5kE1d2jIug3GcGmUCUj/KDB2EB3sLaBy7ammBTGSW9DfsOEg1cIL38CX o3IyngtBNBiVl61kyJzlBVCwqlSDnL2QlbY+7MsWHknh5moAF39QcAltYJPm/wKIjlHO D3UzgERgCA+3Hm2e9f8+X0115Tm9ztunF3m27bzqLQqMU/NS6foSC3H37MJJowLdaHvj sD2ARt7kdbEFWYTsD8cdTJkYVNuu5ieBLKu4Zb7eTOOp6YceJ79TxpygipzxV7J1rnkv qNycKLYy3ASDypQMk8vbBWn27tIHlPak6jKhxJFzv+rX+CW90GLcxaw6YjU9/NlyQpCk z4ng== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u186-v6si1852232pgd.578.2018.08.02.07.02.32; Thu, 02 Aug 2018 07:02:46 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732477AbeHBPwX (ORCPT + 99 others); Thu, 2 Aug 2018 11:52:23 -0400 Received: from mga11.intel.com ([192.55.52.93]:9561 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732141AbeHBPwX (ORCPT ); Thu, 2 Aug 2018 11:52:23 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 02 Aug 2018 07:01:02 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.51,436,1526367600"; d="scan'208";a="61507134" Received: from mylly.fi.intel.com (HELO [10.237.72.153]) ([10.237.72.153]) by orsmga007.jf.intel.com with ESMTP; 02 Aug 2018 07:00:59 -0700 Subject: Re: [PATCH 02/12] i2c: designware-master: use core to detect 'no zero length' quirk To: Wolfram Sang , linux-i2c@vger.kernel.org Cc: linux-renesas-soc@vger.kernel.org, Andy Shevchenko , Mika Westerberg , linux-kernel@vger.kernel.org References: <20180723202617.15230-1-wsa+renesas@sang-engineering.com> <20180723202617.15230-3-wsa+renesas@sang-engineering.com> From: Jarkko Nikula Message-ID: Date: Thu, 2 Aug 2018 17:00:59 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <20180723202617.15230-3-wsa+renesas@sang-engineering.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 07/23/2018 11:26 PM, Wolfram Sang wrote: > And don't reimplement in the driver. > > Signed-off-by: Wolfram Sang > --- > > Only build tested. > > drivers/i2c/busses/i2c-designware-master.c | 12 +++++------- > 1 file changed, 5 insertions(+), 7 deletions(-) > I tested this with patch 1 and I like it since with these patches the test is done before firing up the HW, waiting for an interrupt and then see the length is invalid for us. i2ctransfer -f 8 r0@0x10 Before (with i2c_designware debugging on): [ 15.607283] i2c_designware i2c_designware.1: i2c_dw_xfer: msgs: 1 [ 15.711988] i2c_designware i2c_designware.1: enabled=0x1 stat=0x10 [ 15.712002] i2c_designware i2c_designware.1: i2c_dw_xfer_msg: invalid message length Error: Sending messages failed: Invalid argument After: [ 25.838661] i2c i2c-8: adapter quirk: no zero length (addr 0x0010, size 0, read) Error: Sending messages failed: Operation not supported Tested-by: Jarkko Nikula Acked-by: Jarkko Nikula