Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3420369imu; Fri, 18 Jan 2019 10:03:49 -0800 (PST) X-Google-Smtp-Source: ALg8bN6wACovxnDafmXZ7NWVLbKfONtXN2eZb+NTwaT/1/MIVD4agT0XcSR5iSYUhxOSAGgAU1MH X-Received: by 2002:a63:b81a:: with SMTP id p26mr18931912pge.433.1547834629918; Fri, 18 Jan 2019 10:03:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547834629; cv=none; d=google.com; s=arc-20160816; b=GhSuL4xHQZrxPDJWcwdBgefgzo9rUmttFHpVGzO5JEw3zZiLsa+uuRHxL3m1fLV+a7 GOtu3fsDNyp5ZiMJ7SM2rVyWctujX8lJyQeE9StzadUY8dG1PfYvwPOXcCkxaKKZPpQi nS10YIfs8WrFxgxr3o3YliZq60fdNkopMaGuBhWJn165t4rVvioabkfp45F6//U1UXe9 F883DY1e1jxwUE7sQR+JmEet1uL7rehKOrIaaNukhf8Eyv0HHHo4HqIfs+Lotemi64AS YAhDqxGBN8+lEvmhS7WwJJQqoT8uLUkpSJgs/eaR2+P9ZYizYUMPLpwUBOr2uBPLCCVs USvA== 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=cCPxtpPH/GNx+3hiECt6H8tSf8ODyN7ZvSBEXXuV5q4=; b=cJkmF2B+EvZSv2L15tyOB7LbRcf0F/tgtjlG5AvAiitd7lOeqnoD1ueT0K6YsadZQR hyEwVeYOX7zv1/4Zwh8RBLqIbyLOQRT7DfswwMMhuY0Y4X1oGC8+U+KWkbT852oZplDm uWMiaB/ohhF6s+a1wirucx5Y+JwPY7n2hRnWX2GD2E9pgIJsPb+FvQmz7QWEeehhQKX+ c+WxEk32OIfg+TpiQVi5+zP8fNI1qdll9HD7XMlJBJq3ALPgWwcfBov0kz4EuTjGFmX5 Wo5SSdGlcN829h/YXqbkXMEYKeXxNY1xBBbYKcZcgKVWCCkEZho0eKbANiNnxoeftPnY Y9tw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@sirena.org.uk header.s=20170815-heliosphere header.b=f5XIqw8D; 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 z14si5335437pga.349.2019.01.18.10.03.19; Fri, 18 Jan 2019 10:03:49 -0800 (PST) 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=f5XIqw8D; 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 S1728848AbfARSCB (ORCPT + 99 others); Fri, 18 Jan 2019 13:02:01 -0500 Received: from heliosphere.sirena.org.uk ([172.104.155.198]:52400 "EHLO heliosphere.sirena.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728667AbfARSCB (ORCPT ); Fri, 18 Jan 2019 13:02:01 -0500 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=cCPxtpPH/GNx+3hiECt6H8tSf8ODyN7ZvSBEXXuV5q4=; b=f5XIqw8D9eKwZjy2dItVoNSu6 ENuPQWyyodC3KLIXNPfzc168s+7eXv7ytSkRiG/LCdTFC0qJGsG8pAOnkomosQCrG/uPW4GgH5miA uu71KbgaaVuiFO/3Ciwc/aVT1nitshVCpu63986vsLmbE/X8LvfvW/6r5YRoFUvAamMiQ=; 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 1gkYSj-0005Ik-4W; Fri, 18 Jan 2019 18:01:49 +0000 Received: by debutante.sirena.org.uk (Postfix, from userid 1000) id 36D1B11276E7; Fri, 18 Jan 2019 18:01:48 +0000 (GMT) Date: Fri, 18 Jan 2019 18:01:48 +0000 From: Mark Brown To: Bartosz Golaszewski Cc: Rob Herring , Mark Rutland , Linus Walleij , Dmitry Torokhov , Jacek Anaszewski , Pavel Machek , Lee Jones , Sebastian Reichel , Liam Girdwood , Greg Kroah-Hartman , linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org, devicetree@vger.kernel.org, linux-input@vger.kernel.org, linux-leds@vger.kernel.org, linux-pm@vger.kernel.org, Bartosz Golaszewski Subject: Re: [PATCH 08/13] regulator: max77650: add regulator support Message-ID: <20190118180148.GD6260@sirena.org.uk> References: <20190118134244.22253-1-brgl@bgdev.pl> <20190118134244.22253-9-brgl@bgdev.pl> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="EP0wieDxd4TSJjHq" Content-Disposition: inline In-Reply-To: <20190118134244.22253-9-brgl@bgdev.pl> X-Cookie: You can't get there from here. 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 --EP0wieDxd4TSJjHq Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Fri, Jan 18, 2019 at 02:42:39PM +0100, Bartosz Golaszewski wrote: > Add regulator support for max77650. We support all four variants of this > PMIC including non-linear voltage table for max77651 SBB1 rail. Looks good, the ramping stuff might be a candidate for core (TBH I was sure we'd got that implemented already but we don't seem to) but that can be done later and the more complex one with non-linear steps does feel like it might have to stay in the driver anyway. A couple of small nits: > +++ b/drivers/regulator/max77650-regulator.c > @@ -0,0 +1,537 @@ > +// SPDX-License-Identifier: GPL-2.0 > +/* > + * Copyright (C) 2018 BayLibre SAS > + * Author: Bartosz Golaszewski Please make the entire header C++ style so it looks more intentional. > + for_each_child_of_node(dev->of_node, child) { > + if (!of_node_name_eq(child, rdesc->desc.name)) > + continue; > + > + init_data = of_get_regulator_init_data(dev, child, > + &rdesc->desc); > + if (!init_data) > + return -ENOMEM; > + > + config.of_node = child; > + config.init_data = init_data; > + } You don't need to do this, the core will do it for you (it will actually still do it even with the above, it'll only fall back to using config->init_data if it's own lookup fails). --EP0wieDxd4TSJjHq Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAlxCFIsACgkQJNaLcl1U h9DaJQf9Ee2yWoCC92HHYenJAWkagKDlUOWo5MUoKpYE2BrcBcgKQAw3XMUz45Y9 eb1/I4MoT9vqo5JKBSHlTUKCH+HE4gTo433lFQW2y46e8qf6I6vt1abn/pScmrlI 7IudxGE9c4BJsIbAfvLI9rtLvfdOSxBUdjYMs3hMDnn0U4Oh4qc4q0lHkiYR/wSU Mp+PnFpDxVAMzWNnao55zS1vkkELoMy++tO50+aGuFxLRIXHvCBf8LZ5LkAOZo9Q gm3SDThdid8VaNnA/YlHiFRCdLsNrWDH9qfYoyVZ2XCNUW3cnXFmH8shroh0fBYy nuJZQHDLj3lAl8LsLmRwwzG2KdQlFw== =f48Z -----END PGP SIGNATURE----- --EP0wieDxd4TSJjHq--