Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp2581210imm; Thu, 11 Oct 2018 12:35:48 -0700 (PDT) X-Google-Smtp-Source: ACcGV6168yd1u/nZiIM3pT8dN9KOES0ljNupQ5+T4g1g1MSGa54hhM4G+Ns1VRDX1KhZ9OW86dPB X-Received: by 2002:a62:c2c1:: with SMTP id w62-v6mr2829179pfk.35.1539286548836; Thu, 11 Oct 2018 12:35:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539286548; cv=none; d=google.com; s=arc-20160816; b=wskqhySzZlZeXLI5mwp1yQM2Fuvyx8AURrNMp3rO3uyzrGiCB+5Bpc8zeyADBtIbNW mKzO4nJ38S+EuGGwhUqUmSZfDym1+YxnWJ3MjWubIAMmQhMII0PwYvPCyBvqcJFXPnFu X4V2IYtcLW54Zy/hj7syF7OLm3HmONEAgb0aOCa59sPDk86Nk7k+5CjApIBcgUHvRvHF 1bhn1ZhCCRmpgeKCfwNMmCd9xNWLhs8GZKwWK7uLf3PyW4nA9YPS7xVGzg5GzGLeAWGR KlK7u6lmWAoyLMPTfAXrYzBX9UeUUr4lQ9cccz4Rz5apsgMNdp4Ply7aW90WGLiaO2cd MCyA== 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=/ocA6D1i1+XRcxPD1Dxu6BwC1ucs9CTJ+9L81tTz3tU=; b=MrXOLMLE3Yjo4NowBGZdV5L/1RjAB9htcDA0tilue81Z8PVb9FcKFSw6ZdsjReR6os IbI1FZMUUL02d4W/lgLNCYU0dsPgcQKLFPBxUhCM7CBFix2ka2wsbs7Vgif+uZMr95c2 Aua8h+TOH7XBCJR58vw6nOHRBiPAoJPbJ/J0TAqmonQmxwcw2ZcS8hV/FTHQpG6KYdMi N9MAgTw757S7zTAD3ULvabZWP8MwvqYjFdSqyFAaJTPf6gTN66NNSXFAlTPXmlmWZiS+ 8qplHdPO10MDBMcmDFkkEq0zMBHUt1m2yw5/WNYdSu5XDyxSyukzj+D8VNJ40fKkM+Kv 5ngQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@sirena.org.uk header.s=20170815-heliosphere header.b=XCTeT+TW; 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 d9-v6si4279437pln.51.2018.10.11.12.35.33; Thu, 11 Oct 2018 12:35:48 -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=XCTeT+TW; 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 S1728894AbeJLBW2 (ORCPT + 99 others); Thu, 11 Oct 2018 21:22:28 -0400 Received: from heliosphere.sirena.org.uk ([172.104.155.198]:34752 "EHLO heliosphere.sirena.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727510AbeJLBW1 (ORCPT ); Thu, 11 Oct 2018 21:22:27 -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=/ocA6D1i1+XRcxPD1Dxu6BwC1ucs9CTJ+9L81tTz3tU=; b=XCTeT+TWIRH3kFXihEDNFSSiC lk/3yj2MmH/qzhoeyfaM/5B3PrCM8x6AkWz/wVMp6hq6RAX97ViceYZuTG9oBqQ3ZwnO3BIy/Hhxl lB7Jno9sevbeMkNQKAuG33z2HaSTFNg8xGXSmCRjgBHisptjSmHSY3XKqQO13B6tPebT4=; Received: from cpc102320-sgyl38-2-0-cust46.18-2.cable.virginm.net ([82.37.168.47] helo=debutante.sirena.org.uk) by heliosphere.sirena.org.uk with esmtpa (Exim 4.89) (envelope-from ) id 1gAf9z-00029A-G8; Thu, 11 Oct 2018 17:54:07 +0000 Received: by debutante.sirena.org.uk (Postfix, from userid 1000) id E9AFD11223ED; Thu, 11 Oct 2018 18:54:06 +0100 (BST) Date: Thu, 11 Oct 2018 18:54:06 +0100 From: Mark Brown To: Linus Walleij Cc: Liam Girdwood , "linux-kernel@vger.kernel.org" , Marek Szyprowski Subject: Re: [PATCH] gpio/regulator: Allow nonexclusive GPIO access Message-ID: <20181011175406.GH25351@sirena.org.uk> References: <20181011143531.7195-1-linus.walleij@linaro.org> <20181011144330.GF25351@sirena.org.uk> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="fd5uyaI9j6xoeUBo" Content-Disposition: inline In-Reply-To: X-Cookie: Use at own risk. 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 --fd5uyaI9j6xoeUBo Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Thu, Oct 11, 2018 at 07:01:13PM +0200, Linus Walleij wrote: > On Thu, Oct 11, 2018 at 4:43 PM Mark Brown wrote: > > On Thu, Oct 11, 2018 at 04:35:31PM +0200, Linus Walleij wrote: > > enable line so you don't need to use the bus to do the enables. That > > should just be a case of adding this flag to all the drivers that have > > already been converted to gpiod (including the core code that's in > > regulator_ena_gpio_request() which I thought was coping with this > > already) unless I'm missing something? > Sorry if I don't get it... we already have code in the core to > check if the same gpiod is used by two regulators. > regulator_ena_gpio_request() does this: > if (config->ena_gpiod) > gpiod = config->ena_gpiod; > else > gpiod = gpio_to_desc(config->ena_gpio); > So after the change I made to fixed.c this comes in through > config->ena_gpiod. Other regulators that have GPIO control for their enables do their own requests (as does the core) so don't they all need to set the flag GPIOD_FLAGS_BIT_NONEXCLUSIVE when they request otherwise it'll only work in systems where the regulators after the first that request the GPIO are fixed regulators? --fd5uyaI9j6xoeUBo Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAlu/jj4ACgkQJNaLcl1U h9BhsQgAhqcaxL3AJRBNhk8J1gpoIf8ReGJaLmFdBgzg/TIWH1yMWH2S1f2JkKyP 022ZSDRhwPujqi3c4BYYyLAoRb0rCh7aTnqcx5bkwpUxlBqF5kRFVMvZL3iymW0G r0dmnzCF79gli8w1ru6OUzkqdN8/iYX/+u9L8ji+xSQsMq8zB+Ele9nz8BNRJMH0 toQ4GcnX3GsO4sUYuyJB3zS5bLwenmSzz1V6NIzdu5bpS1MOV5c1om0DMKxcrlUX 8SLCdrRxrrjdgm/xBEOhKGyrAE2IXSsbX2Jq3MwOpt7/UryRJSiZgYwSqeRy6sOS 9iWTH/qfAR8+a9wjIAKFOEL4pPT/nA== =moG1 -----END PGP SIGNATURE----- --fd5uyaI9j6xoeUBo--