Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp3077192imm; Fri, 19 Oct 2018 04:52:18 -0700 (PDT) X-Google-Smtp-Source: ACcGV60EB6f9ApNCmt2rVV5s6JCYs303AuhERPoF5ypX4xuCOZfdtKRtTTAbKGs2fPtvAaj3HxWO X-Received: by 2002:a65:5103:: with SMTP id f3-v6mr32151282pgq.54.1539949938389; Fri, 19 Oct 2018 04:52:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539949938; cv=none; d=google.com; s=arc-20160816; b=CpBjTeNlFCjNQpxeNG8rhPm6S8D1zWXoJEeMCERqSenUvVBWs5k6T1oRAonrvaHs3C 25A4QW0+GWnXu6d8OqBYj405dZNMdMqhxZmgIoGGac5yI/fF7f9TCHdGU82rJCV7q2IZ kBYi/dDMSvqBkuXFPXBOuEAaR1z1ywh6yrzECr4LRlgOvw5yDNscc32OsjD6lBtzTYaT fcv/AF+wNFomARD8aMecQioRLSTBskdcniEt+yUXFnXzuS4SVOa/VdLmfEZL0479Xzt+ 3DAFC2hEbW7lnMVqAnjiQ0ktEWyCJUSh3vrr3FysGfj4EW6CakUci0UB9Z5wxKUc/ST0 ngUg== 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=T6p3ScLAe1S4fQqF1dBZ9aBFTF76lhkFkRc+OI9lmaU=; b=pCm0hnLw9Ip6dt9IA9Km6pXHEP3MYQ3t4wnNDUfeHL12F7Xi9W5nUnzBaeWhN74npy XDgZyOGpZNWUHB/2G3R702eRFuOJw750aV3mysWZwu0+QZ8CpHuuSpKQuEH06+oztvJk DhycscoNprPVGun5OqWbep1VPTvde09XBBi3UxzQXwCP1Cpz4WICVDMWT7hDANoZuRrA H3wf2jgwRLavIcqytt4SE5gbCbpFJz4aMZvbBM0neBwsG2uqKcjaYJMopQbIK6ClMQ19 wHI+g4wKp3crsRvM72Cc4c2Ec5nFcPs1nAs6ggqZF9ogg85joE86obKLR3rohzXbE1SO cWsQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@sirena.org.uk header.s=20170815-heliosphere header.b=jxQzSS+t; 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 h185-v6si1020390pge.308.2018.10.19.04.52.02; Fri, 19 Oct 2018 04:52:18 -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=jxQzSS+t; 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 S1727473AbeJST4I (ORCPT + 99 others); Fri, 19 Oct 2018 15:56:08 -0400 Received: from heliosphere.sirena.org.uk ([172.104.155.198]:34314 "EHLO heliosphere.sirena.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726784AbeJST4H (ORCPT ); Fri, 19 Oct 2018 15:56:07 -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=T6p3ScLAe1S4fQqF1dBZ9aBFTF76lhkFkRc+OI9lmaU=; b=jxQzSS+tSS5a0LxulXkHxVrnS 9MvG5fgjXOGmIaaJYQ3pRm7lUPlJ67fy/SAdREqZz9hGC1YCZdG+DGG/dEsxkcq+8k9lSlesyKNHT oBpDOSnlFPRcbbmM1MJ+POnqTI0C+uzPBW3gv80q/IJf4ffHAw7+E7klKdQKeHFmslFc4=; 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 1gDTIG-0008Qo-0q; Fri, 19 Oct 2018 11:50:16 +0000 Received: by debutante.sirena.org.uk (Postfix, from userid 1000) id A0F5F1122548; Fri, 19 Oct 2018 12:50:15 +0100 (BST) Date: Fri, 19 Oct 2018 12:50:15 +0100 From: Mark Brown To: Pascal PAILLET-LME Cc: "dmitry.torokhov@gmail.com" , "robh+dt@kernel.org" , "mark.rutland@arm.com" , "lee.jones@linaro.org" , "lgirdwood@gmail.com" , "wim@linux-watchdog.org" , "linux@roeck-us.net" , "linux-input@vger.kernel.org" , "devicetree@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "linux-watchdog@vger.kernel.org" , "benjamin.gaignard@linaro.org" , "eballetbo@gmail.com" Subject: Re: [PATCH v4 4/8] regulator: stpmic1: add stpmic1 regulator driver Message-ID: <20181019115015.GC5895@sirena.org.uk> References: <1539853324-29051-1-git-send-email-p.paillet@st.com> <1539853324-29051-5-git-send-email-p.paillet@st.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="TYecfFk8j8mZq+dy" Content-Disposition: inline In-Reply-To: <1539853324-29051-5-git-send-email-p.paillet@st.com> X-Cookie: Obey all traffic laws. 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 --TYecfFk8j8mZq+dy Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Thu, Oct 18, 2018 at 09:02:12AM +0000, Pascal PAILLET-LME wrote: > + for (i = 0; i < ARRAY_SIZE(stpmic1_regulator_cfgs); i++) { > + /* Parse DT & find regulators to register */ > + init_data = stpmic1_regulators_matches[i].init_data; > + if (init_data) > + init_data->regulator_init = &stpmic1_regulator_parse_dt; > + > + rdev = stpmic1_regulator_register(pdev, i, init_data, regul); > + if (IS_ERR(rdev)) > + return PTR_ERR(rdev); This looks mostly good, the only big thing is this - the default is to just unconditionally register all the regulators that exist rather than only those that are configured on that particular platform. This is a bit simpler and means that all the readback of the configuration for the unconfigured regulators is available for diagnostics. Is there a reason not to do that? --TYecfFk8j8mZq+dy Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAlvJxPYACgkQJNaLcl1U h9AVFwf9HuCK1nKd89bM5cuVWMEtrJN5wwS0dwfV9NJNvZ8H5h6NdUcTYb8JASZo c2MckaIg5ZWdFkVtQseoT85lrBAtbROJWGrSks44FXy+fmQM6SBosll+LKRavA2b 1VPuCiyqBHPTUz6+dVUeAQRidxERF+dZdfK2FrJGaw7G96WKeHfg7zQXy4cRNJJ0 kcfl9qNCYjF7I4FKDqugM0gKnEARpRPThYY0agxvSnJvjsR9HAcEKDNh2BBIrDQG acGQE+u8/nDkD6a0Wo8NgQ+V2GsJeSjMgBVUgl+gUFaoEcogr8t0wuAlnG+kvxtX /pYld58dINQUYBa8+hAqgvDZK9V+iQ== =W0oL -----END PGP SIGNATURE----- --TYecfFk8j8mZq+dy--