From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754826AbbBBL4y (ORCPT ); Mon, 2 Feb 2015 06:56:54 -0500 Received: from mezzanine.sirena.org.uk ([106.187.55.193]:44912 "EHLO mezzanine.sirena.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752231AbbBBL4w (ORCPT ); Mon, 2 Feb 2015 06:56:52 -0500 Date: Mon, 2 Feb 2015 11:56:38 +0000 From: Mark Brown To: Lars-Peter Clausen Cc: Guenter Roeck , Robert Rosengren , linux-kernel@vger.kernel.org, Greg Kroah-Hartman , Jean Delvare Message-ID: <20150202115638.GK21293@sirena.org.uk> References: <1422834481-6936-1-git-send-email-linux@roeck-us.net> <54CF50CF.7040601@metafoo.de> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="9r+6lkZfxTlLzZoF" Content-Disposition: inline In-Reply-To: <54CF50CF.7040601@metafoo.de> 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 --9r+6lkZfxTlLzZoF Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Mon, Feb 02, 2015 at 11:26:23AM +0100, Lars-Peter Clausen wrote: > On 02/02/2015 12:48 AM, Guenter Roeck wrote: > >- return ®map_smbus_word; > >+ if (config->val_format_endian == REGMAP_ENDIAN_LITTLE) > This should probably use regmap_get_val_endian() and maybe also handle > REGMAP_ENDIAN_NATIVE. 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 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. --9r+6lkZfxTlLzZoF Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBCAAGBQJUz2X1AAoJECTWi3JdVIfQUJ4H/2sgItyxt+mSEo8H2Bmnr/3I NGrPyWF6Qi7s6FrZ6EYJyWXJXFzbZ0jYgwccMrK73xidQkaqnVfaTJhxRJlTF9hL r9EmJHMS8Rvsb94JumX7mV18PDsOtxDhiDFFFKkQeL7GecoWgSbFkokMeEZtlObE GDXAblp5Oxd86EKPB2xdGZ98wnoHUgP+Ia2EaDhyHXdt/dr+G+2OU6KOOetuwb+F hc0we8nlxNZ87whQWs8TOeaumMGMmXOor4wwGE4touuwM1hgOWOoFNX61SD8r8WJ QuLyEDU2AQRFd39k7y6aRmoF4qMJcx1Q7BW8S+Buk8A5W5ylA1ozXaRURuu9hiQ= =lo6l -----END PGP SIGNATURE----- --9r+6lkZfxTlLzZoF--