Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp1915215imm; Thu, 2 Aug 2018 03:16:34 -0700 (PDT) X-Google-Smtp-Source: AAOMgpepUKvXU6Kef7Pf5oMWcIvzUMyJwE+95T7wgYmGG7cGDAdrxXfAxTPytUhhNqZRdIEasjap X-Received: by 2002:aa7:850b:: with SMTP id v11-v6mr2234680pfn.165.1533204994516; Thu, 02 Aug 2018 03:16:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533204994; cv=none; d=google.com; s=arc-20160816; b=qJpBBP8ik7iApw7w5drRijVIAaRD7tFI1HOZ7W2De7MKVZabbklgzUY/Kzol/qodnC vng2c8/qKQQlJsa53+PEbdYqCJmPRf7PYXIwU1AKmQT4ywaPvBUkXW0KUgrTZYq4ERbP eAFwG6z4JuplaGUwGMd+oQOu8Cfz6y/RO+R41PAPegX1dTVb2wOtAA94H++Qrw007RVB yA3hmAD9GO0Y0JQc7P+jKfotIV3rfR17VoLVrEErZPes5aY5JsArdlezG1bruqkQupP2 tEfBgNawgbCOk6vrXuTFQri+GXeZSYcFmDqWFdNWw98uWmQmdnglFh2HhOm/aYhbhfLm khOA== 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:dkim-signature:arc-authentication-results; bh=XCXc/o0DnUitj8iLzZx16kr1uTbxMt/m+cByi9Sfnzo=; b=X8HpwvnB/G2CGu5ldbYyRzGCDsvpqjkurTKXWExM1e7DsgR2hDkdFn7h5dAKtSr+6i Y/UPRmn/32WD+sasfSnzE9KzgjWhvlsux055CS8I0p2sJJgixNABiOa76AebK6TipqPr 6Fz4twCZ2aBK/nEPE0mhaRwtMrTlrrPyhUpwTJ760Dr5HP7qBZlYrjl77WR/lEQLfs0O /JCLypK9mPRSUp5J9/CeFaD9c/D8b8l8YIzvEZXWernJ+mRwzA3fbpVkLXcRk5FFZfRc HUuhIwM17Qw47tS1rumQWwpyj6LnwmDunCDiJ26RvX0uI7KTHITzN5PA1wfj8vcaBeSD 7WfQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@sirena.org.uk header.s=20170815-heliosphere header.b=trQinmp4; 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p77-v6si1662187pfj.294.2018.08.02.03.16.19; Thu, 02 Aug 2018 03:16:34 -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; dkim=fail header.i=@sirena.org.uk header.s=20170815-heliosphere header.b=trQinmp4; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731447AbeHBMFT (ORCPT + 99 others); Thu, 2 Aug 2018 08:05:19 -0400 Received: from heliosphere.sirena.org.uk ([172.104.155.198]:46540 "EHLO heliosphere.sirena.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726702AbeHBMFT (ORCPT ); Thu, 2 Aug 2018 08:05:19 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sirena.org.uk; s=20170815-heliosphere; h=In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=XCXc/o0DnUitj8iLzZx16kr1uTbxMt/m+cByi9Sfnzo=; b=trQinmp4zYttpTTUiSPB+EHSQ N0OphjdaRudThHZ3s4UZFethjJNKhysvrj0wwS1Pf9kDYj5UX52yFOX4kf3gjZ/7gH5H5+E/iqS+h a4lgAvbf56RN0DpC+IYHOnzQs3Xig8q/gjeVehJz6fBqxMx1EGaFcvdMsLL9RfzmzEILs=; Received: from cpc102320-sgyl38-2-0-cust46.18-2.cable.virginm.net ([82.37.168.47] helo=debutante.sirena.org.uk) by heliosphere.sirena.org.uk with esmtpa (Exim 4.89) (envelope-from ) id 1flAcv-0001sX-RO; Thu, 02 Aug 2018 10:14:37 +0000 Received: by debutante.sirena.org.uk (Postfix, from userid 1000) id 774EB11242E7; Thu, 2 Aug 2018 11:14:37 +0100 (BST) Date: Thu, 2 Aug 2018 11:14:37 +0100 From: Mark Brown To: Stefan Popa Cc: jic23@kernel.org, gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org, linux-iio@vger.kernel.org, Crestez Dan Leonard Subject: Re: [PATCH v2 3/6] regmap: Add regmap_pipe_read API Message-ID: <20180802101437.GE9117@sirena.org.uk> References: <1533136667-31828-1-git-send-email-stefan.popa@analog.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="xJK8B5Wah2CMJs8h" Content-Disposition: inline In-Reply-To: <1533136667-31828-1-git-send-email-stefan.popa@analog.com> X-Cookie: BARBARA STANWYCK makes me nervous!! User-Agent: Mutt/1.10.0 (2018-05-17) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --xJK8B5Wah2CMJs8h Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Aug 01, 2018 at 06:17:47PM +0300, Stefan Popa wrote: > From: Crestez Dan Leonard >=20 > The regmap API usually assumes that bulk read operations will read a > range of registers but some I2C/SPI devices have certain registers for > which a such a read operation will return data from an internal FIFO > instead. Add an explicit API to support bulk read with pipe rather than > range semantics. If we're going to do this it's probably best to explicitly mark the registers where it will work otherwise we'll end up confusing ourselves and corrupting data at some point, provide another op like readable and so on. =20 I'd also suggest calling it something like _noinc (for non-incrementing) instead of _pipe as I was a bit confused about what a pipe read was. We could also have a software implementation for things like ADC outputs where the register doesn't have the convenient nonincrementing behaviour but we want to do repeated reads. --xJK8B5Wah2CMJs8h Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAlti2YwACgkQJNaLcl1U h9AviQf/U61lFuMPKacSSxRzqCrcwQ/U8WiIbPEeHuDyeCcg5sG4CH5Srh7ibDNU o325C83BXWWHmt77KuiDZp+vnooX7SOauLlVjS6YgZ8CoQ/jeeDJuI8a+LGMW8Y2 Hary1PbC4Br4ETuRxBUbVg0ZL4gZ0FYzmephHSdE+KTBYnawl7vexSenN+NPc+iz Fn3bRc9oMHm6vYTjDiUG0o1z6ymxaaWdAdOOpEuXp6LpBrPtPWPIs3Dijy2yLUDk /RO/JgrNhcha8pqWhmO1wT50Z67ofhKyNA3cZminOlnEmq8Tpuv2YufB/mI0C6WC 7HuGQebfxWQRxJkjB/5pXRl8WmyuVA== =mnD0 -----END PGP SIGNATURE----- --xJK8B5Wah2CMJs8h--