From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965350AbbBCLm0 (ORCPT ); Tue, 3 Feb 2015 06:42:26 -0500 Received: from mezzanine.sirena.org.uk ([106.187.55.193]:48698 "EHLO mezzanine.sirena.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965232AbbBCLmX (ORCPT ); Tue, 3 Feb 2015 06:42:23 -0500 Date: Tue, 3 Feb 2015 11:42:10 +0000 From: Mark Brown To: Guenter Roeck Cc: Lars-Peter Clausen , Robert Rosengren , linux-kernel@vger.kernel.org, Greg Kroah-Hartman , Jean Delvare Message-ID: <20150203114210.GG21293@sirena.org.uk> References: <1422834481-6936-1-git-send-email-linux@roeck-us.net> <54CF50CF.7040601@metafoo.de> <20150202115638.GK21293@sirena.org.uk> <54CF89EA.9040206@roeck-us.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="ZvxDZ8ZUU2TuJBrV" Content-Disposition: inline In-Reply-To: <54CF89EA.9040206@roeck-us.net> X-Cookie: My LESLIE GORE record is BROKEN ... 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] regmap: Fix i2c word access when using SMBus access functions 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 --ZvxDZ8ZUU2TuJBrV Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Mon, Feb 02, 2015 at 06:30:02AM -0800, Guenter Roeck wrote: > On 02/02/2015 03:56 AM, Mark Brown wrote: > >Yes, we really ought to handle _NATIVE too (though the chances of it > >being used with I2C are minimal, it's mostly for MMIO). This also feels > Well, we do; it is handled similar to the big endian case with the current > code. Do you think it should be handled differently ? If yes, how ? Perhaps it just needs to be more explicit about how it's handling native endian? I didn't spot it. > >like it's something that should be being handled further up the stack in > >the serialization code but given that there's direct functions for this > >in the smbus code perhaps it's better here. Or perhaps the smbus > >support ought to be transitioned to use the bus interface and set > >reg_write() and reg_read() operations now that we can do that, it seems > >like a better fit though it might break compatibility with wierd devices. > I thought about that, but since the smbus functions perform endianness > conversion it would mean that I would have to undo that conversion just > to have it done again. No, the whole point is that by doing this you avoid any endianness conversions or formatting in the framework at all so you can just use the smbus functions to handle the formatting. --ZvxDZ8ZUU2TuJBrV Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBCAAGBQJU0LQRAAoJECTWi3JdVIfQRusH/A/ydC1cvDiMNWmPXiWBCNfm 1qFKwCMp8qciIb80XyKzrZfVkL1pb53Jn5+4w8uhQ7RQp0ajEwr2VziHknTdHsd9 W10qZup+q3dc6skAukqc34xt65ad7DaarTqbChyihaLSS9d5tBKmmmoISBDmtO8f rW0HpeE0dTct5qd4ETelAZluFyLUA1rTuY1SpnCzy6MZ/Lk1IQCkVJpy95mbbluH v/YO/GSYaX8gNvP5h6QjS+x0rJ2NCg7v6PRleJpuWKe50WZSvtNdj/l0e9n9BjLS 9fFJgPZ7+uEEHvKbl21IaZPmvELK0zcw7m4xE8nyPTdCeiGI+0JGHnzgZQ0O2+E= =OtWs -----END PGP SIGNATURE----- --ZvxDZ8ZUU2TuJBrV--