Received: by 2002:a25:824b:0:0:0:0:0 with SMTP id d11csp1759995ybn; Thu, 26 Sep 2019 01:38:29 -0700 (PDT) X-Google-Smtp-Source: APXvYqxh5WKcHR2qz/gpHgHKkvVFvOsfYlYYeUYyxHyrUkLfQAa6yIY2GfbUBFnrqwM0n3PFX35/ X-Received: by 2002:a17:906:c738:: with SMTP id fj24mr2002551ejb.255.1569487109368; Thu, 26 Sep 2019 01:38:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569487109; cv=none; d=google.com; s=arc-20160816; b=nBlHDlXDrp/s0vrsdHVew5IjFU+DAJqiYzRC01PI4ANWtil+A2zq01X8PWLruGrkTS OY46+oeqtLxi/KpQPJ478hb9vOSjkLHOzu0EHFsH+McwsvoGO2y1pDJifb6ufzanRkg6 cqhQkBYFrIDoLRlEQhBvzURV7acYcNr+rCaY953cZgkA7jANfYMaK3/z6eBYXZJSzhxJ R2JLKuxySwT2ELLdsJrL9nzP8vejOEZXoVTf0tdQZd9syMFf02uAOoR9u6tg+oVgPHaE JGJxxVHeEa0046pUDLG8Uan7BJpHj3eyShF6b0Ge9puWEw8xpb4QX4x9UV8E+rvKXGFJ KKrA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=Ru9mal8KOKGk0u5+JjM3snNEFIiw/GH6sWJmew5Mbmo=; b=0r9DNFiUNvjhjmExXczm7mTjVAT80CLhoIMT/uiQqIC/6vzUpbd9AM7Mpa6iDNZ7pF V+BwW8rZATAipZmaXRZjW4D1KC/V4BeTDUwPHz5nieiOY/MoZLT8qfBzH6YraLJ1h5sm acue1fSbDtLkHOBe90CYcKKSzvS2B5G2CUf+PliOIbW4Ky+6QvajyI9N5dvVUraafqn0 07QvhX3oNPtZ3faWGkT+Qh9Vk7iTPwiRFyfdukGiTwAGYWcKVmk+qpfRXncN1D+EYHQT siVYNO8YZHKimpZNPgHyAAwaNP+v/sUKAEjzN7NgZ2yIDdI/KdPeKwBJZ5xl1A0LotKn rKoQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@sirena.org.uk header.s=20170815-heliosphere header.b=iMLalSqv; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 91si989781edy.188.2019.09.26.01.38.06; Thu, 26 Sep 2019 01:38:29 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@sirena.org.uk header.s=20170815-heliosphere header.b=iMLalSqv; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2404185AbfIXS2H (ORCPT + 99 others); Tue, 24 Sep 2019 14:28:07 -0400 Received: from heliosphere.sirena.org.uk ([172.104.155.198]:43210 "EHLO heliosphere.sirena.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2392088AbfIXS2G (ORCPT ); Tue, 24 Sep 2019 14:28:06 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sirena.org.uk; s=20170815-heliosphere; h=In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=Ru9mal8KOKGk0u5+JjM3snNEFIiw/GH6sWJmew5Mbmo=; b=iMLalSqvX4V4f2ZB9579UTxiC lFacjFxCpjbg3bcmuHXinoLVyEIgzJZj57QM/ilpgiSTFqIn7z8RiWKSzAOmbW6MzPWbLkM1j5IJN NnqGQjGRpWpPDN0uZUcqASVioB13zC8zrjvXhgDNRlc7ftnKk6u+KQRb8YsTKhRTcjCIc=; Received: from [12.157.10.118] (helo=fitzroy.sirena.org.uk) by heliosphere.sirena.org.uk with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1iCpXb-0002nG-W2; Tue, 24 Sep 2019 18:28:00 +0000 Received: by fitzroy.sirena.org.uk (Postfix, from userid 1000) id 65E56D02FC7; Tue, 24 Sep 2019 19:27:58 +0100 (BST) Date: Tue, 24 Sep 2019 11:27:58 -0700 From: Mark Brown To: Doug Anderson Cc: Marco Felsch , Chunyan Zhang , Liam Girdwood , ckeepax@opensource.cirrus.com, LKML , Sascha Hauer Subject: Re: [PATCH 1/3] regulator: core: fix boot-on regulators use_count usage Message-ID: <20190924182758.GC2036@sirena.org.uk> References: <20190917154021.14693-1-m.felsch@pengutronix.de> <20190917154021.14693-2-m.felsch@pengutronix.de> <20190923181431.GU2036@sirena.org.uk> <20190923184907.GY2036@sirena.org.uk> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="uMD30mxrM/iO8yI3" Content-Disposition: inline In-Reply-To: X-Cookie: Be careful! UGLY strikes 9 out of 10! User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --uMD30mxrM/iO8yI3 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Mon, Sep 23, 2019 at 03:40:09PM -0700, Doug Anderson wrote: > On Mon, Sep 23, 2019 at 11:49 AM Mark Brown wrote: > > On Mon, Sep 23, 2019 at 11:36:11AM -0700, Doug Anderson wrote: > > > 1. Would it be valid to say that it's always incorrect to set this > > > property if there is a way to read the status back from the regulator? > > As originally intended, yes. I'm now not 100% sure that it won't > > break any existing systems though :/ > Should I change the bindings doc to say that? Sure. > > It should be possible to do a regulator_disable() though I'm not > > sure anyone actually uses that. The pattern for a regular > > consumer should be the normal enable/disable pair to handle > > shared usage, only an exclusive consumer should be able to use > > just a straight disable. > Ah, I see, I wasn't aware of the "exclusive" special case! Marco: is > this working for you? I wonder if we need to match > "regulator->enable_count" to "rdev->use_count" at the end of > _regulator_get() in the exclusive case... Yes, I think that case has been missed when adding the enable counts - I've never actually had a system myself that made any use of this stuff. It probably needs an audit of the users to make sure nobody's relying on the current behaviour though I can't think how they would. --uMD30mxrM/iO8yI3 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAl2KYC0ACgkQJNaLcl1U h9Bi9Qf/eBRr9wwlGQ2FMJOED0zECVIPit6Vf3FVdmFrjp3PyY6Fh+LlwcHs3/3j c12CzWN8RhLBFHLGS3pBoQ1+5Ye0bYjv+ryTtNzYUAv7npXMYJTV4ae3rsgY4Hd5 Sfs+lz3d2Co5TJ7aF+CBP1qFSjVQb28v5lsx3IBV6i5+2lm2Vtq9JOMXgno6aMcU ojHBTKKLYK7vft/65lltxopiRJ5XyE0GBppaNWvS1cewc+cpdcJsw5p1SYOidkQh zADgVSyfUps8fdr2EemHJu5WsfT0A/iFoEEsQCMB4IyMRF5tAtT2YffhoNl6PZkP LXLXO6fRmz4Ow8SuRTX0X9FdFojJJQ== =wK9+ -----END PGP SIGNATURE----- --uMD30mxrM/iO8yI3--