Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp161095ybe; Thu, 5 Sep 2019 19:37:58 -0700 (PDT) X-Google-Smtp-Source: APXvYqwxSy50I40r3P+V8lZOfuHysn3Hhd8qAOS9DLwb8bEwiEBFko6I2g8tm1s/ijJaY/3/ofHY X-Received: by 2002:a63:ee08:: with SMTP id e8mr6119318pgi.70.1567737477829; Thu, 05 Sep 2019 19:37:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567737477; cv=none; d=google.com; s=arc-20160816; b=MLSvO2i1thcJfd8kd1sfRgH/d63Ec1r9Ojm2M9qkucdzTWy2Q39oA4HEzIK4YmwCH8 sw6n4wAbM6f5C26CAvf1gQQQYQDRh+WHfXkGXnyaaOJfey3aCxakOfC7T4FNRGR2ABdI xVi/ZciHVD67mikiBicHqvp9qFtEVYWvsOZ65kzSnbstTytrVtiZIRMdjL4pQ+5TMbUW TCU4UEe/fbgNcN3zY5HdN/SkeWHOalygkyCwLg2HrVuaWRfjb5OfD+X2nIhhW4wMnnta O5Ie5xWo6acSY9PfTmJkeHpH8PJlQYPnkmlztz+feNKJ/KPOQzf2jvV8o+2Z5OKiDioe zQ+w== 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=bjhBgn/hu4sBX3UF8vmjwc0zdzuNyTJ7pUGOwliYdOc=; b=GNvJyB0K76GZARucb7WK/HDMh9HrfKhOZzE0Xj0wDR3+Y5uZQDjBMfEYhYRUHDO1mx jv3nqVsulrx6dXu0dMa4tikLGXLMkboLqlF0u1t69uIQJ1CmuF7CB57Rf8ZRhqoKSp74 U+wTxBD3vdGvTGPZfMVW2zRHHUvARA3qZ8AMA165saCwqpVm3qHODOAzfzMrDIEb0XDD 1u2CHcG+hyFhhKC8sh6JKHeGUHp5Eb+22MbFISlafeqCQ3smYdhOxpgr//ZSoH2Ddwxn sbrqc4w1ek1dI3q6A1sBASsiu4aI7A4Bb7vIepNahat4TsMiS1kFgMTmMFPB5jO08oJq u9/w== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@sirena.org.uk header.s=20170815-heliosphere header.b=p7jUDGlX; 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 l8si3333823pgi.347.2019.09.05.19.37.25; Thu, 05 Sep 2019 19:37:57 -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=p7jUDGlX; 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 S2403828AbfIESGX (ORCPT + 99 others); Thu, 5 Sep 2019 14:06:23 -0400 Received: from heliosphere.sirena.org.uk ([172.104.155.198]:47228 "EHLO heliosphere.sirena.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388822AbfIESGW (ORCPT ); Thu, 5 Sep 2019 14:06:22 -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=bjhBgn/hu4sBX3UF8vmjwc0zdzuNyTJ7pUGOwliYdOc=; b=p7jUDGlXDe3A/y79FGALT/xcU iN849LCtT7DwcUsiVXQT7PP9H7NoBfRhvNSCN5UbGsGNM4XCvgMMOU41EwbYBOsGZRUdXGW7Bbryh Tapwa2dMrSWw1IR+Pt5MVCXzZGfOp3/TQb5S6/d7p+jiMBN76391ukY6EV/uh8jDQQ0Ck=; Received: from ypsilon.sirena.org.uk ([2001:470:1f1d:6b5::7]) by heliosphere.sirena.org.uk with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1i5w9A-0005Tm-H8; Thu, 05 Sep 2019 18:06:16 +0000 Received: by ypsilon.sirena.org.uk (Postfix, from userid 1000) id 90F1D2742D07; Thu, 5 Sep 2019 19:06:15 +0100 (BST) Date: Thu, 5 Sep 2019 19:06:15 +0100 From: Mark Brown To: Philippe Schenker Cc: "linux-kernel@vger.kernel.org" , Shawn Guo , Sascha Hauer , Liam Girdwood , "devicetree@vger.kernel.org" , Max Krummenacher , Rob Herring , Stefan Agner , Marcel Ziswiler , Mark Rutland , Luka Pivk Subject: Re: [PATCH 1/3] regulator: fixed: add possibility to enable by clock Message-ID: <20190905180615.GG4053@sirena.co.uk> References: <20190903080336.32288-1-philippe.schenker@toradex.com> <20190903080336.32288-2-philippe.schenker@toradex.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="MiFvc8Vo6wRSORdP" Content-Disposition: inline In-Reply-To: <20190903080336.32288-2-philippe.schenker@toradex.com> X-Cookie: You humans are all alike. 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 --MiFvc8Vo6wRSORdP Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Sep 03, 2019 at 08:03:46AM +0000, Philippe Schenker wrote: > This commit adds the possibility to choose the compatible > "regulator-fixed-clock" in devicetree. >=20 > This is a special regulator-fixed that has to have a clock, from which > the regulator gets switched on and off. This seems conceptually fine. Minor issues though: > +static int reg_clock_is_enabled(struct regulator_dev *rdev) > +{ > + struct fixed_voltage_data *priv =3D rdev_get_drvdata(rdev); > + > + if (priv->clk_enable_counter > 0) > + return 1; > + > + return 0; > +} This could just be return priv->clk_enable_counter > 0 - ideally the clock API would let us query if the clock is enabled but that might be a bit confused anyway given that it's possibly shared. --MiFvc8Vo6wRSORdP Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAl1xTpYACgkQJNaLcl1U h9AsqAf/caqc82p8eTjLhI9qV1ov43qSU0Lx+x0l1/34fodrmhwX+985ieiCqPdK YcQ+SBMd4NxLjLcIW7g6JNEhl7jK9Rf/JCdFqzTfLwH5PtuU9N7/NSkDVnHJT+Il 7vZxg1enEl9P7kopxqGJeWD9TIdwrLbLTrHeT+k65BfrXkYZqdCFwgRySuA2bJv1 ReQyGwWgKs9dHDKvFOcMUuFN8NII62VgdZ3v5nhNVtzsBqDjDpId9rk/2HhTUB6O Cxandr5b4mTQ2E2XZ4zNY++IFnMACM+Jk82jFpbaBX6faVMdJnb2TobZt2C+pGOp xTpfGM2727C2Yx2TU0BTn9qgDEHuNg== =FHl0 -----END PGP SIGNATURE----- --MiFvc8Vo6wRSORdP--