From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753946AbcLNRl3 (ORCPT ); Wed, 14 Dec 2016 12:41:29 -0500 Received: from mezzanine.sirena.org.uk ([106.187.55.193]:51484 "EHLO mezzanine.sirena.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753167AbcLNRl2 (ORCPT ); Wed, 14 Dec 2016 12:41:28 -0500 Date: Wed, 14 Dec 2016 17:40:53 +0000 From: Mark Brown To: Chen-Yu Tsai Cc: Lee Jones , linux-kernel , linux-arm-kernel , linux-sunxi Message-ID: <20161214174053.qsm6umlgtdivevwt@sirena.org.uk> References: <20161123031616.10114-1-wens@csie.org> <20161123031616.10114-3-wens@csie.org> <20161209112018.GL3625@dell.home> <20161213164742.4ztisstxifatlm5a@sirena.org.uk> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="e3e6kddoftihfodi" Content-Disposition: inline In-Reply-To: X-Cookie: I represent a sardine!! User-Agent: NeoMutt/20161126 (1.7.1) X-SA-Exim-Connect-IP: 2001:470:1f1d:6b5::3 X-SA-Exim-Mail-From: broonie@sirena.org.uk Subject: Re: [PATCH v2 2/2] mfd: axp20x: Fix AXP806 access errors on cold boot X-SA-Exim-Version: 4.2.1 (built Mon, 26 Dec 2011 16:24:06 +0000) X-SA-Exim-Scanned: No (on mezzanine.sirena.org.uk); Unknown failure Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --e3e6kddoftihfodi Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Wed, Dec 14, 2016 at 09:52:31PM +0800, Chen-Yu Tsai wrote: > What this patch does is make sure the registers match, to guarantee > access, and then reinitialize the regmap cache to get rid of any > stale data. So what you're saying is that previous writes may have been ignored? > > If the chip has been reset then you'd want to reset the cache too. I've > > no idea if that's needed here or not though, it depends what happens to > > the global state of the chip when this reconfiguration happens. > It is not a reset in the general sense. I suppose a better way would > be to do an explicit write to the register first, then initialize > the regmap. I'd have to export the write function from the RSB bus > driver first though. Surely just doing a write immediately after initializing the regmap would have the same effect? That'd ensure that the hardware has the desired value before there are any other writes. But I might be missing something here. --e3e6kddoftihfodi Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCAAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAlhRhCQACgkQJNaLcl1U h9AqhQf+PfVK23ftNeRJKhzjmvCF1QKGjTa2U+lsO1+K19q6kVZCJWTz6F/Gc9uP yyGCLJYn8OEfcaEYOO8g2SuI0eCcX90Qb4ESSxEVtaAEwADOC2GBCiYzzjSnPLoU Fe1UyMfrwNUnoa18iA3meuWaeh9s+Q7PD5hWlDLLA1ntuO1+kzOrXw6T8SF6cFhj 1QoVuhITPBHdZn5PCJwuOb1rVcEDT/bCuX5f1KHnFwZ/sNnoFDRpMxEewhddIerA /Nk4puSL8EKaFtuREnWgbR0wzN1sjSwIwks9ZlWC1nOQ5d1BmoOf5rlmzTvzc/Kr KVJSasRAA8sSt2gB2IgHgAZAZtm3vQ== =icPr -----END PGP SIGNATURE----- --e3e6kddoftihfodi-- From mboxrd@z Thu Jan 1 00:00:00 1970 From: broonie@kernel.org (Mark Brown) Date: Wed, 14 Dec 2016 17:40:53 +0000 Subject: [PATCH v2 2/2] mfd: axp20x: Fix AXP806 access errors on cold boot In-Reply-To: References: <20161123031616.10114-1-wens@csie.org> <20161123031616.10114-3-wens@csie.org> <20161209112018.GL3625@dell.home> <20161213164742.4ztisstxifatlm5a@sirena.org.uk> Message-ID: <20161214174053.qsm6umlgtdivevwt@sirena.org.uk> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On Wed, Dec 14, 2016 at 09:52:31PM +0800, Chen-Yu Tsai wrote: > What this patch does is make sure the registers match, to guarantee > access, and then reinitialize the regmap cache to get rid of any > stale data. So what you're saying is that previous writes may have been ignored? > > If the chip has been reset then you'd want to reset the cache too. I've > > no idea if that's needed here or not though, it depends what happens to > > the global state of the chip when this reconfiguration happens. > It is not a reset in the general sense. I suppose a better way would > be to do an explicit write to the register first, then initialize > the regmap. I'd have to export the write function from the RSB bus > driver first though. Surely just doing a write immediately after initializing the regmap would have the same effect? That'd ensure that the hardware has the desired value before there are any other writes. But I might be missing something here. -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 488 bytes Desc: not available URL: