Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp5815534ybp; Tue, 8 Oct 2019 08:42:54 -0700 (PDT) X-Google-Smtp-Source: APXvYqwICkoSzj5+MWpDysrG6jPXXq3DIhk8QwTEAtFshgHwlPg9P6pd8958sRv4RlxBkmB5/vyR X-Received: by 2002:aa7:d501:: with SMTP id y1mr33878475edq.226.1570549374096; Tue, 08 Oct 2019 08:42:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570549374; cv=none; d=google.com; s=arc-20160816; b=k+KJqmn5o8zeyrYeFCY7dsMkRBgXX1+0PV6l7uoK+L2PRsVnslJnaS78VRgbfom3xn Umi0abOiHetOPwP79RsVOEp2asPwIH92hh24qpdJ8iYshJTmgw53HCrMfnalouPZOLIU m6s3GlHh8YkrSEvOYstLmZQkvz7k5NHcwxirsS9WEeV0hEYhmYcso5v4bZi4+LsoLe36 10VuipHKy1L6R4zZhphmuQhdGVlFUkAydkmtW7he31gCJ66s6qVQpiMDeGj86NnjDhNe hKDZUvQ8XPkVQOyHTsBCcyYtDXNFG9C7rCCmGpMPa6vP/vtGo8HsXoHcQrGdL/wvTDb1 zupA== 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=GdhMck5n++7UmnbvU0bVk6Fsaf8pOkqwSgmDxPlXMQs=; b=W64c5qREsIr2Dwo7k6AgUCeaoCnXdVhyfmcNXU8WbBlpEMmcZzmvay2A6MOZu/oQCM bMUhwkSid75wpD7Ow+RRMt6qfoRBIUJoSGUeeCdkBEAd2ew8mwBfnqrMZ8aRg/V2yIsc IfykljCDYVf+iEVjyqODLs7HdeVUlfTRT7NpFDU9OQmo0VMjyxOnpnGuNrWyGvwen0bR ZBJT9XXdR9qrHkhrwaynk2YNJYgbe5ovfBde0O3pX1KlqkTMqXaeZsJaQfovVSys7XZn kkRSnhmFNAQayuO6G+ltFXY+glmPNi9g8QpM7ee4QVHNMaKlvGB7yEE1DW8Qoa5eL3KF PUDg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@sirena.org.uk header.s=20170815-heliosphere header.b=oEXrYv7c; 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 f21si11043789edb.379.2019.10.08.08.42.30; Tue, 08 Oct 2019 08:42:54 -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=oEXrYv7c; 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 S1726211AbfJHPmT (ORCPT + 99 others); Tue, 8 Oct 2019 11:42:19 -0400 Received: from heliosphere.sirena.org.uk ([172.104.155.198]:54364 "EHLO heliosphere.sirena.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725908AbfJHPmT (ORCPT ); Tue, 8 Oct 2019 11:42:19 -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=GdhMck5n++7UmnbvU0bVk6Fsaf8pOkqwSgmDxPlXMQs=; b=oEXrYv7ctkdv0gFXG0dCyuiN5 oCLQ0wNomM5hrvuMzjp/qceW2gWf2urPZCRrYUI0v+a0xX7x+D9Wl/AyM4NOsVqGJ4ZLWOXdQyJuA jJMZq/1EGG1fFsFhXg2mkE1OKsBGfKLUU+mQgPQP1md1SsamgkxvoClChKe0kToN2nkiU=; Received: from cpc102320-sgyl38-2-0-cust46.18-2.cable.virginm.net ([82.37.168.47] helo=ypsilon.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 1iHrcs-0000MS-QP; Tue, 08 Oct 2019 15:42:14 +0000 Received: by ypsilon.sirena.org.uk (Postfix, from userid 1000) id E14002740D4A; Tue, 8 Oct 2019 16:42:13 +0100 (BST) Date: Tue, 8 Oct 2019 16:42:13 +0100 From: Mark Brown To: Marco Felsch Cc: Doug Anderson , 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: <20191008154213.GL4382@sirena.co.uk> References: <20190924182758.GC2036@sirena.org.uk> <20190927084710.mt42454vsrjm3yh3@pengutronix.de> <20191007093429.qekysnxufvkbirit@pengutronix.de> <20191007182907.GB5614@sirena.co.uk> <20191008060311.3ukim22vv7ywmlhs@pengutronix.de> <20191008125140.GK4382@sirena.co.uk> <20191008145605.5yf4hura7qu4fuyg@pengutronix.de> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="hdW7zL/qDS6RXdAL" Content-Disposition: inline In-Reply-To: <20191008145605.5yf4hura7qu4fuyg@pengutronix.de> X-Cookie: Do not disturb. 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 --hdW7zL/qDS6RXdAL Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Oct 08, 2019 at 04:56:05PM +0200, Marco Felsch wrote: > On 19-10-08 13:51, Mark Brown wrote: > > No, we shouldn't do anything when the regulator probes - we'll only > > disable unused regulators when we get to the end of boot (currently we > > delay this by 30s to give userspace a chance to run, that's a hack but > > we're fresh out of better ideas). During boot the regulator state will > > only be changed if some consumer appears and changes the state. > Okay, so this won't disable the regualtor? > 8<---------------------------------------------------------------- > static int reg_fixed_voltage_probe(struct platform_device *pdev) > { > ... >=20 > if (config->enabled_at_boot) > gflags =3D GPIOD_OUT_HIGH; > else > gflags =3D GPIOD_OUT_LOW; >=20 > ... > } > 8<---------------------------------------------------------------- If this is a GPIO regulator then the Linux APIs mean you can't read the status back so it's one of the regulators for which this property was invented. This is a real limitation of the Linux APIs, with most hardware you can actually read the status back so we shouldn't need this. --hdW7zL/qDS6RXdAL Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAl2crlUACgkQJNaLcl1U h9DhNQf/c0tueEtIFOfwUOmWcYcHM+HAyOgQRLMkCr/JxjXvP4OyL7pvofT9Fmh4 yFFhq3w1gQ6KAatyLrrIRLc1Fu2KaGr3FtvhtzJ0vsjS5jIdpFXhalvuwxP+uQo3 MPi6g4FneYn/SHQnlV1/4JoWyYnNwgXpqmnnpyQHpXxIRQevnD7TSLSmmLbdNgq4 3W/DevfeX45f+kBLQf/xlHPHVjA7RMBaKt2zxTSP6rtFyjSigfyPN3qfJvLElInB yMGGrjUUUjcMyLH5uhhYIvVUZY232a98v9x1w7JRNOw5Oe3T+CUlahwfind9MDyf vKqEqsKGad/zg/S+VC0l4GIS0jogzA== =Vs6+ -----END PGP SIGNATURE----- --hdW7zL/qDS6RXdAL--