Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759722AbdLSJV4 (ORCPT ); Tue, 19 Dec 2017 04:21:56 -0500 Received: from heliosphere.sirena.org.uk ([172.104.155.198]:37246 "EHLO heliosphere.sirena.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752830AbdLSJVx (ORCPT ); Tue, 19 Dec 2017 04:21:53 -0500 Date: Tue, 19 Dec 2017 09:21:49 +0000 From: Mark Brown To: Baolin Wang Cc: Arnd Bergmann , Lee Jones , Rob Herring , Mark Rutland , Linux Kernel Mailing List , DTML Subject: Re: [PATCH v6] mfd: syscon: Add hardware spinlock support Message-ID: <20171219092149.GB8563@sirena.org.uk> References: <87ec50c846bbc7afc09ba0855aba1cdea6473308.1512048582.git.baolin.wang@linaro.org> <20171215104204.p7i27sen77ohbmzi@dell> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="WhfpMioaduB5tiZL" Content-Disposition: inline In-Reply-To: X-Cookie: Someone is speaking well of you. User-Agent: Mutt/1.9.1 (2017-09-22) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1457 Lines: 38 --WhfpMioaduB5tiZL Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Tue, Dec 19, 2017 at 02:55:47PM +0800, Baolin Wang wrote: > Um, why regmap doesn't accept a zero lock-id, that because regmap will > reguest hwlock depending on the 'regmap_config->hwlock_id' is not > zero, if regmap regard a zero lock-id as valid which will affect other > 'struct regmap_config' definition. So users should not assign the zero > lock-id to regmap. > Now of_hwspin_lock_get_id() can return 0 as valid, which depend on > what is the base id registered by hwspinlock driver. So you think we > should not regard 0 as valid from of_hwspin_lock_get_id(), I can try > to send another patch to fix. If 0 is a valid hwspinlock ID you need to add a flag to the regmap config to say if a hwspinlock should be used. That way we're not rejecting valid values. --WhfpMioaduB5tiZL Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAlo42iwACgkQJNaLcl1U h9BpAAf/dFv/Ci6l/rscWDGO6yC6976ewMYs2oN5NifvuaGRFXiPh8aza2CLsVr6 PF+Vus2gtsNCg7r7JfyXYN+pTX0qLReUanxQ5FVSw9S2Q/is4vObsilmPzEs6Quq XApB6xiYn5IJHQdBWalpUeKhCJTGlqouAPXto/a2mKSbnFiSBUvTevpE502CVOTP yvWb5ZpXyx7lIw+n5P/AZDsGguxj5ECgtAQD86HDCUGn93XIJu9EEk+ZjbGV429Z /r0m18QgyJBldAiAEwap1ax2IEvkXwsqjYR4+JwcDo/SPLWrM0Pf3HsEa+99fqcN bWr08MCDnPcCotdNE3r+XR0TsJG5dQ== =kBko -----END PGP SIGNATURE----- --WhfpMioaduB5tiZL--