Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751981AbbHLLtk (ORCPT ); Wed, 12 Aug 2015 07:49:40 -0400 Received: from mezzanine.sirena.org.uk ([106.187.55.193]:40340 "EHLO mezzanine.sirena.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750949AbbHLLti (ORCPT ); Wed, 12 Aug 2015 07:49:38 -0400 Date: Wed, 12 Aug 2015 12:49:31 +0100 From: Mark Brown To: Markus Pargmann Cc: Jonathan Cameron , Srinivas Pandruvada , linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kernel@pengutronix.de Message-ID: <20150812114931.GZ10748@sirena.org.uk> References: <1439374365-20623-1-git-send-email-mpa@pengutronix.de> <1439374365-20623-13-git-send-email-mpa@pengutronix.de> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="b/1sb/HZzV9blKCG" Content-Disposition: inline In-Reply-To: <1439374365-20623-13-git-send-email-mpa@pengutronix.de> X-Cookie: if it GLISTENS, gobble it!! User-Agent: Mutt/1.5.23 (2014-03-12) X-SA-Exim-Connect-IP: 94.175.94.161 X-SA-Exim-Mail-From: broonie@sirena.org.uk Subject: Re: [PATCH 12/20] regmap: Introduce max_raw_io for regmap_bulk_read/write X-SA-Exim-Version: 4.2.1 (built Mon, 26 Dec 2011 16:24:06 +0000) X-SA-Exim-Scanned: Yes (on mezzanine.sirena.org.uk) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1625 Lines: 50 --b/1sb/HZzV9blKCG Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Wed, Aug 12, 2015 at 12:12:37PM +0200, Markus Pargmann wrote: > + /* if set, raw reads/writes are limited to this size */ > + size_t max_raw_io; > + Do this separately for read and write, there's doubtless going to be something that has asymmetry. > + if (!map->use_single_rw) { > + write_count = total_bytes / map->max_raw_io; > + write_bytes = map->max_raw_io; We may not be able to fit a whole number of values into whatever the constraint that the bus has is and partial values don't seem like a good idea. > + reg_stride *= write_bytes / val_bytes; > + } This is very confusing, regmap already has a concept of stride and this isn't the same thing. --b/1sb/HZzV9blKCG Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBCAAGBQJVyzLKAAoJECTWi3JdVIfQkV4H/iiOg0r1+bH7xQZK/1gBJbOh ms3OshP5JIO1Se0dg19HklVcBIaeTpzm0HtIREWP15oKHvUiqHSWs3uzSoNXUKk4 st1xKWMhOMI9/ZOVB9tDn5bCDRIu2uS4ABkDmmR+kcodHVKqn1bYCdbcwjLExOLJ PpVGB+wVoliEx6fhy3IQHScA2sl8BPySUqEeesz+uBqvcsTb9dQ6yFUGVexN4s3M rRCCqg18oMLsgk1WAtZHbVv4XtirXORFth7y1nTlwUMz/mWpKVOoBkeaMWguIVgP 5s/RscAupdc91+6hA3N3KRGB2mg6+JaMToW+NPHY0vIf7oZ5GTxGzBoqqIUy2FI= =XPwt -----END PGP SIGNATURE----- --b/1sb/HZzV9blKCG-- -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/