Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751468AbbEZTCn (ORCPT ); Tue, 26 May 2015 15:02:43 -0400 Received: from devils.ext.ti.com ([198.47.26.153]:37542 "EHLO devils.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750908AbbEZTCm (ORCPT ); Tue, 26 May 2015 15:02:42 -0400 Date: Tue, 26 May 2015 14:00:39 -0500 From: Felipe Balbi To: Andreas Werner CC: Subject: Re: regmap different register size Message-ID: <20150526190039.GX26599@saruman.tx.rr.com> Reply-To: References: <20150526185425.GA26217@wernerandy.de> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="9Hhx61DPNOHVwUu9" Content-Disposition: inline In-Reply-To: <20150526185425.GA26217@wernerandy.de> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1913 Lines: 50 --9Hhx61DPNOHVwUu9 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi, On Tue, May 26, 2015 at 08:54:25PM +0200, Andreas Werner wrote: > i have a question regarding regmap usage. >=20 > I have a i2c multifunction device which does have a register and value > width of 8bits except the revision register. The revision can only be > read by a i2c block transfer. read revision during probe using i2c block transfer, cache the value in your own driver structure and all subsequent reads just return the cached value. Everything else should be ok via regmap. This is first thing that came to mind, maybe there's a better way. --=20 balbi --9Hhx61DPNOHVwUu9 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBAgAGBQJVZMLXAAoJEIaOsuA1yqRE4IwP/0cn3Kf6emgAW0ZqU1CVAhFk mlEeQtSupRPrztYHhMRV23UrCjZ5PBT4kwgqZpli/pIIwvyj29IKN0kdmFcudC2+ 1+losZYFdHc0NIWup2W0OZmK4uqDWZuQo5NBK9/hvsN77H64kH64WvmkvjZCHwHZ e7IjAsiUtGdjqIU6ymVy0PXSvOASQXLBQzv5MVBTRCOm6Xnoqdpv39N1m2ohTVwj NHl7t4lHmSf8fsg0IaXAOO6PAWwi7bNiPs6DjWjhpTAGMIMTFw5qo1YpkXa9HsEy 18RSy9LT2Ltg2XL5FvL5XP96wYvP1WoH2JTuRBfLO2nMXnuGNUO+bk2v8DGUOcVc NDg+wEi2VjsZkGJYT1xqEyrV2yPDbwTVBmVYczGZYue4qrhZF9LBBf837/cVWuDk rCPLCXzM0YR6mbJTiyJ/bVwdy3GLfZYmCxWGpeqgZGKEiAYo9mgktuNh7bF4WDuX xWq05Y+89b/nRoNzpXLaAoJ/1wB4uC1HxTOA+EDzI0YYMCB8WF8TXdwkk0SDpXKH hFBwLfwx5/DYeE9JYR4ZW2y7hm1vJtLeq6ToUKbqdMXrCeGJ2XpTkTauWzkEo51m lxGMYnwJ9XvsIHpq12wC0vNcSIIELSw+U7y7QjsGprIMVbZGOe/KrmzVFNZOvw/n nCl3ejIwRO1Dq/pTo1tJ =sEYQ -----END PGP SIGNATURE----- --9Hhx61DPNOHVwUu9-- -- 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/