Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp2415007imj; Mon, 11 Feb 2019 02:26:16 -0800 (PST) X-Google-Smtp-Source: AHgI3IaZJDfKgg0IZfbOFz+hBVmWFA/oFe84bml5/b2qicu0JZ0dOsisX1wB/Z5k5iaFOs5dy2Vo X-Received: by 2002:a63:2643:: with SMTP id m64mr32035758pgm.35.1549880775856; Mon, 11 Feb 2019 02:26:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549880775; cv=none; d=google.com; s=arc-20160816; b=sKzTXtySAZBkH+4qjYqSVAdnckw6r5yUwvw8YML5xHd7GGRhCuPtvJzXLY3av3d9Yo QkEoRsNmxLGPmemz9CtYcakiKv+sMadE+VKSfIO37Lehxpf2FzTnakgkpOVry1pgCPp7 Fmk6UZ8/fF/D96PcldrAIM0XzM558DC0tpPYwck3ccpgsljgxsXIJA6uE0OWWK3GgyOB gX0WYRjqAhf4t90ds2MVd/oGt6VLZZdVjiqMnn56jfeTMHC24uKZ+qYywzi3/GCw4tUe te77u3i13P1EjfwzSOVR4gjI9lAPPSp3PbLgB2ELT1FFzfWGEjnmbMEWP/tN67yV5NiJ XvKQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=sE4QD/rZ32T39eseORhij7qwI51If5lydLdHozwFVlk=; b=SZqYbY+rRM0U9SZjCcxSCk6Uy3aV3+H/mR5sUNGsNydHFT3mJqvaLQoBL8nAvNkwwG IFgHzHqya64xb0yVgARoRLQ63dANAi396CWczR0jzIMt26/6YjpUVQhmtjI1qnlslPKE x8xadMxOCqNLHuW7o8hDg1GzZWUKioB3zgMVjjnvWruONXVz/IdqyXM06JKmy4QfW2VL VhqHD4EKu/kFXTSRqp1CfgGzUWY+FJo3CTAeHuefAsRhSMPkEw+gUYEhdsUk9S6vOdU3 SVmZmBOndo3wKEklQnPypi9secPawDehcHIWsI/2BEsZBKcaWgCqLK9PwLoVyd1i0bPX fxwg== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k12si8913032pgg.382.2019.02.11.02.25.58; Mon, 11 Feb 2019 02:26:15 -0800 (PST) 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726866AbfBKKZ3 (ORCPT + 99 others); Mon, 11 Feb 2019 05:25:29 -0500 Received: from sauhun.de ([88.99.104.3]:52940 "EHLO pokefinder.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726041AbfBKKZ2 (ORCPT ); Mon, 11 Feb 2019 05:25:28 -0500 Received: from localhost (p54B333B4.dip0.t-ipconnect.de [84.179.51.180]) by pokefinder.org (Postfix) with ESMTPSA id D6D122E3542; Mon, 11 Feb 2019 11:25:26 +0100 (CET) Date: Mon, 11 Feb 2019 11:25:26 +0100 From: Wolfram Sang To: Federico Vaga Cc: Peter Korsgaard , Andrew Lunn , linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v4 3/5] i2c:ocores: add polling interface Message-ID: <20190211102526.3y46r43usznu4jgp@ninjato> References: <20190211083122.32485-1-federico.vaga@cern.ch> <20190211083122.32485-4-federico.vaga@cern.ch> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="xzumx76qidkqnvai" Content-Disposition: inline In-Reply-To: <20190211083122.32485-4-federico.vaga@cern.ch> User-Agent: NeoMutt/20170113 (1.7.2) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --xzumx76qidkqnvai Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Feb 11, 2019 at 09:31:20AM +0100, Federico Vaga wrote: > This driver assumes that an interrupt line is always available for > the I2C master. This is not always the case and this patch adds support > for a polling version. >=20 > Report from Andrew Lunn: >=20 > I did some timing tests for this. On my box, we request a udelay of > 80uS. The kernel actually delays for about 79uS. We then spin in > ocores_wait() for an additional 10-11uS, which is 3 to 4 iterations. >=20 > There are actually 9 bits on the wire, not 8, since there is an > ACK/NACK bit after the actual data transfer. So i changed the delay to > (9 * 1000) / i2c->bus_clock_khz. That resulted in ocores_wait() mostly > not looping at all. But for reading an 4K AT24 EEPROM, it increased > the read time by 10ms, from 424ms to 434ms. So we should probably keep > with 8. >=20 > Signed-off-by: Federico Vaga > Tested-by: Andrew Lunn >=20 Fixed these checkpatch warnings: WARNING: 'transfered' may be misspelled - perhaps 'transferred'? #111: FILE: drivers/i2c/busses/i2c-ocores.c:306: + * We wait for the data to be transfered (8bit), CHECK: Please don't use multiple blank lines #129: FILE: drivers/i2c/busses/i2c-ocores.c:324: + + WARNING: 'transfered' may be misspelled - perhaps 'transferred'? #154: FILE: drivers/i2c/busses/i2c-ocores.c:349: + break; /* all messages have been transfered */ and applied to for-next, thanks! --xzumx76qidkqnvai Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEOZGx6rniZ1Gk92RdFA3kzBSgKbYFAlxhTZYACgkQFA3kzBSg KbaeVRAAqZ4SeQ2Nh40ZbPVb5JQ3jPP5Oif5G2yTY/ivF//ajMSFBUlN7K/fLsAv 9W/u7mZKIeukpQgoJ7iAWxfY3Cs6FC0hXAEwicYGAyiZW+rUYgvRREpNg5r0hmdz NfqIQ18H0qIX1Z7AuHAU38LrZMNSTfnUv3HjfYiN4ydvHcrY/U/BycwuO2RdH1mx 3GQ+rmtCi/f5jdxWX2M9V79iKb1H01jhVRr7xepnkg8omydSuyCkeeBgLtYEVc92 qLN3G0YLArZws1rcbmMJL2axUsjaItPtov4xh/+US4CGTGru5hE8P15YzT5vAnMS FWBrcKcI5EpZ4Zm9zKlGLKG8C2vuK3PCRcA8u0xXB9ym4lAsqPxWYZPLUPIP6MM6 ZKPQYE0EJMCBM6wWM3pNkUUXinjmn/n9xVuFnpEDwWUPpced20JjZRpTPxTYoz63 NK2lkODo02ZnUcjqNAR+9jhBinyNnGqEE0GZo0DpgBOw2Opu85PDf9LfT8gyV8iF sX6YiMjbJ07A54EFCHJpkpVj47Qg8cfDJfQANcn+xKiyV6WlBIdzQx2MPqi1B/vl da0edU33kvYVf16bmlppDN6TTy30cRcjsktnVz3ZvQwPR5dZbqMhbCmx74NNb2Kb bBBZYjEuYHIfdeOqnuhxj8k+k5iug9Rqh6mUkhE1UIGZ7OlQJNU= =E7yU -----END PGP SIGNATURE----- --xzumx76qidkqnvai--