Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3438196imu; Fri, 18 Jan 2019 10:21:03 -0800 (PST) X-Google-Smtp-Source: ALg8bN5+uFeSNekJd2QJosIvr7DB9PRY6amQr4f+P1EjtqfpBFJAXwE/muG1wmvCbKT+X7Yj4x4J X-Received: by 2002:a62:e0d8:: with SMTP id d85mr20061283pfm.214.1547835663429; Fri, 18 Jan 2019 10:21:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547835663; cv=none; d=google.com; s=arc-20160816; b=saXEaKJeuE9sALV7+xMnuja70jBE7fjjiL3VpaPta0FR0TaQFoXcsn2R2CO8QBOkEl tNV6qtvOAJ2R5HeF2p+BQ55WKFQL7LiSDFVdLlenG/G1R56EqweQ12KVgEo1Nk7Czp49 RuE3WmOfafABmtead3+qU+4lWfccbKNv6AsTowbKn6j4+3OZ1gnT5UzZggXdkndVK2ax 0e7/R7Y0I1P92YZPluXtsNMezFrbJbcaXMl4NWhFwVfgX71kyGtdtGkUHg5Lm/jOFHu/ MWy38VnnfXs0a6tdfMhRBxuXPv1flSZDtUSO83kGZl7wFq7A0/zgjdpHxT8b7t6S200+ homw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=XTnq31kfAduQXnRBnjSow7bpYSdbOJof7kvnlR0myXk=; b=ZNyihdB5xzICXWjn5suzPP+58Cn9d5S8VR2ueMuTQKFIiKt3hIYsHQcfhoQNFOjxRY tNQojOlwcMhJHDekqNfNNLxUI6vh6QWd1p0BeD1q248xnA1vnKcEelpJ7/ee2pY28YIO ls/Ubjj+3jEm4GiF6eJTRaEPrWhw6Z1iCV6jAddO9zagseBPNknuGRxghkxC5yAAZcLS V70yz9XN/pER4sFUyKL+q2LMLPz2b8MlCv9D6Xv9UL0h9DxdSMo03kdx+GwO9ZhFL+6/ IPXNnEo8ri5NhaCw53+5AoEYUxAfZ2+vbKLcfyVTSNn2hV382UjPLO3OLhyM2VaY/ai9 wtXw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=RXJTTLb3; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id cc17si5470826plb.265.2019.01.18.10.20.39; Fri, 18 Jan 2019 10:21:03 -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=pass header.i=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=RXJTTLb3; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728952AbfARSSO (ORCPT + 99 others); Fri, 18 Jan 2019 13:18:14 -0500 Received: from mail-ot1-f65.google.com ([209.85.210.65]:46039 "EHLO mail-ot1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728773AbfARSSL (ORCPT ); Fri, 18 Jan 2019 13:18:11 -0500 Received: by mail-ot1-f65.google.com with SMTP id 32so15155399ota.12 for ; Fri, 18 Jan 2019 10:18:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=XTnq31kfAduQXnRBnjSow7bpYSdbOJof7kvnlR0myXk=; b=RXJTTLb3HQEvZ0C6uNFzv8777CP+IudDuWEnb8qSS6Xcp7bBoci5OFhHgU1/ckVl0k paUyF+mwS+LMfbl+zeDhKPg7L5eHBsGNQEyWTAuCxzy9VRUkL3usPLQ+gMgS5ljKvLgQ rmShT0vJgR6N/heYDK/a//ri3fG2uejl4noxU0SH6NTQzcyKpar4G1UcDvFyE3w3cDI+ o4omKTEWzq4tB/ZeCLA66KlRkKsDWE5WzLASdgzCMk384CCxSrAi7qfW9MDe6uvS9Nf3 PK37BCpiXRZ/f2E42XRiM7hjwJgWChAeRMLuBDPK+0hhd2pTw9+D3xSwcmSDyV8926DT VZww== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=XTnq31kfAduQXnRBnjSow7bpYSdbOJof7kvnlR0myXk=; b=JUMb6zViSOLlqv0FOJHBAcDJllCfjipH79l0DyVxjL1KxwZOjMOIr5nH3juptfG1Nl UCNZuPppuUGe0fk6JPQuZ85/MMg5OwfdquC6RohKnVo8xnlsQp06gTxJobwgnFOyHYFt u6qcmYC7WUh680ZUBzVS9mIP7yp7HoEtk6FzyGodHzQM3HoBQGkSWRRnoMh4DmOWlXqO nKplmuy/0+HxlIL360+OFh3dKe2FAY/WXT2Cl1mgGF/BKtL+94QvnURd++BY1/6jvinG 9/7SJhyA08o+7OZ7brf2Gyr37eoeQchAoRvqzxw+ShIjRfTRSJYRoeCBVAi1cD+7/C+p i/lw== X-Gm-Message-State: AJcUukcohoHbCjZcicwaMei6AUg0hd/9yKX/ONyNkX7qp2rE0m6jCihY gb9nLfK8N79cDWerKlqAjHlSMkAegTLcB8L48NvyyQ== X-Received: by 2002:a9d:4595:: with SMTP id x21mr11956468ote.234.1547835490877; Fri, 18 Jan 2019 10:18:10 -0800 (PST) MIME-Version: 1.0 References: <20190118134244.22253-1-brgl@bgdev.pl> <20190118134244.22253-9-brgl@bgdev.pl> <20190118180148.GD6260@sirena.org.uk> In-Reply-To: <20190118180148.GD6260@sirena.org.uk> From: Bartosz Golaszewski Date: Fri, 18 Jan 2019 19:18:00 +0100 Message-ID: Subject: Re: [PATCH 08/13] regulator: max77650: add regulator support To: Mark Brown Cc: Bartosz Golaszewski , Rob Herring , Mark Rutland , Linus Walleij , Dmitry Torokhov , Jacek Anaszewski , Pavel Machek , Lee Jones , Sebastian Reichel , Liam Girdwood , Greg Kroah-Hartman , LKML , linux-gpio , linux-devicetree , linux-input@vger.kernel.org, linux-leds@vger.kernel.org, linux-pm Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org pt., 18 sty 2019 o 19:01 Mark Brown napisa=C5=82(a): > > On Fri, Jan 18, 2019 at 02:42:39PM +0100, Bartosz Golaszewski wrote: > > > Add regulator support for max77650. We support all four variants of thi= s > > PMIC including non-linear voltage table for max77651 SBB1 rail. > Sorry for spamming, I missed it the last time. > 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. > I'm thinking about implementing that in the core for the next release cycle and then making this driver the first user. Bart > 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 =3D of_get_regulator_init_data(dev, chi= ld, > > + &rdesc->de= sc); > > + if (!init_data) > > + return -ENOMEM; > > + > > + config.of_node =3D child; > > + config.init_data =3D 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).