Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp4261162ybg; Mon, 21 Oct 2019 06:22:13 -0700 (PDT) X-Google-Smtp-Source: APXvYqwSfe+C8gUh7pZ/8496i0N5Yfg878k2uLqxEm14KwNk/eFtarPRkqjzzzs1Q79rWVkVSU9s X-Received: by 2002:a50:b6f8:: with SMTP id f53mr11353755ede.29.1571664133746; Mon, 21 Oct 2019 06:22:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571664133; cv=none; d=google.com; s=arc-20160816; b=aPwJ1W6gYLO9Pzu60eWxhunAPOl4P3e2vv9jB54CDjOAhkPxSl9qwWVVI8JI2QVZma r2+S8OKnz8CKLVQqIuRYDIZIg4a5bPuEukaOxSOvmKzyWxZjwF6cmjTNvZuxvfIYL6Td 6keu7OAjvzNFGCzqvkMPbAg82bX3gUpQrEkyljlAfdu+xTbze7hirKQdxbB+c14CBjrC 2N/M7/1/65og0t+HC1BZNOx9uYpFQnECOnRXJMndjUPcgDnXjEg7Z+58Lo+aUpgwTIrt ++0EH6/KCpaA8/RYBCmS22yp51C4ypMnYZg6pBREm7OI+wi0BMg3GeY+lroZnLVpYFbp wI4g== 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-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=GWUlVpoqUQXWKWTK3K8LLo2ls8MnItL75dW5lr6yLXg=; b=Qkad7goIb4n7yTiSGrXfZyef8x4IR1hzA3X2gvD8uZ8aQ28MfWt6zk3JrG9+C6HTiV KaLa+cssDbuf6BeLXV+Jzzi4kI+a7fAHVQap/txjo0VyhD5uWZm/U5tf2XxMAaIVAxaX JgrI70abNWBodCY1MmwVbBlW7tas8LvSmlvpITGeCCLeXzId2sINPfXBDb1escEX/tJC RlfMYe8gkR23fn91U772TFm+n9Z2CQaYLavRV0yDgnWgx+xXUzUGWB5av3SI04OJWjbV ZYH2sELQec+/zlsKtB6+4Lrqm3iBJeVv5PeRUFCEXNYhWcbQBaI1Yu1ZUv03bgl9FhB0 px3Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=vL0xgiFa; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n8si8685176ejh.169.2019.10.21.06.21.48; Mon, 21 Oct 2019 06:22:13 -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=pass header.i=@linaro.org header.s=google header.b=vL0xgiFa; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728945AbfJUNVN (ORCPT + 99 others); Mon, 21 Oct 2019 09:21:13 -0400 Received: from mail-wr1-f67.google.com ([209.85.221.67]:41866 "EHLO mail-wr1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728753AbfJUNVN (ORCPT ); Mon, 21 Oct 2019 09:21:13 -0400 Received: by mail-wr1-f67.google.com with SMTP id p4so13967922wrm.8 for ; Mon, 21 Oct 2019 06:21:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=GWUlVpoqUQXWKWTK3K8LLo2ls8MnItL75dW5lr6yLXg=; b=vL0xgiFa4qmexqBA8NPWnkoSkwm7i3GEjYXLhFkLT1gANwzLZsO3RLW8C3VKYsYPKa cloQVpoz8FMnhTpHgu7IPmmcfApJYcI+Z3NojtberRYgYg/Ck9OBB6lx2OxEWARU/iVC yTBgVe/ONo50K6kDSROkcKN6fERS1DRT4o6D+UpSOKb5tnJEebMpqbuvQtLmPN8jsz7r JuA5lZzi+3rt19mA/4/5fxfpDiG49My6QC05M9ZbdT7dOYy74l/dzUTkaIT7dF0/duy2 iAWN+XBKyNmLzBWvSgwd23RfbVJPGqEx9Ruk76LGVbaucXlsKPgq5fOEPQL9bHIoPHxQ Ks/g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=GWUlVpoqUQXWKWTK3K8LLo2ls8MnItL75dW5lr6yLXg=; b=gwKPf9zV/sKpQdbU4xxtu7sbPcJsVak+c0lWahUdayXqvDPqM7vq1cCUVCbUXTFjiL VEhnSRjqm+oGnchoIBw32zp5ffu6RMA5Jbn7ftgZCnKibG48bjCR+TnXmb/XvIEQgz2H yzQwEdCSMNLX0JVQBKhR5gJztoRTETzgXVKh0gzLCWhyKi4kwNlJYs0KfDp4r0z2hkH1 8FF1hLV/eFVlPN3BEm4c/Pf8A51MiAlUyin6cka/BWJlKi4kSMr+/CrPXef//x27zPLE AA5sz9ytdpq+a/KYgqy744xvc/bkgCgPnUKbLPyBdofPIVt9iauEytbOqddX496DnU5W 4/fg== X-Gm-Message-State: APjAAAXLAiC7vuslneWTfCmS9Haf4wPsSmBY9YPiBz4d+kJjqh97tLZB H0vi+8BBNGaGO392M37ryeK/hw== X-Received: by 2002:a5d:6a52:: with SMTP id t18mr20819925wrw.318.1571664070419; Mon, 21 Oct 2019 06:21:10 -0700 (PDT) Received: from dell ([95.149.164.99]) by smtp.gmail.com with ESMTPSA id c16sm1263643wrw.32.2019.10.21.06.21.09 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 21 Oct 2019 06:21:09 -0700 (PDT) Date: Mon, 21 Oct 2019 14:21:08 +0100 From: Lee Jones To: Daniel Thompson Cc: arnd@arndb.de, broonie@kernel.org, linus.walleij@linaro.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, baohua@kernel.org, stephan@gerhold.net Subject: Re: [PATCH v2 4/9] mfd: cs5535-mfd: Register clients using their own dedicated MFD cell entries Message-ID: <20191021132108.GK4365@dell> References: <20191021105822.20271-1-lee.jones@linaro.org> <20191021105822.20271-5-lee.jones@linaro.org> <20191021122924.qmaio5oe5j66tfdj@holly.lan> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20191021122924.qmaio5oe5j66tfdj@holly.lan> User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 21 Oct 2019, Daniel Thompson wrote: > On Mon, Oct 21, 2019 at 11:58:17AM +0100, Lee Jones wrote: > > CS5535 is the only user of mfd_clone_cell(). It makes more sense to > > register child devices in the traditional way and remove the quite > > bespoke mfd_clone_cell() call from the MFD API. > > > > Signed-off-by: Lee Jones > > --- > > drivers/mfd/cs5535-mfd.c | 24 ++++++++++++++++++------ > > 1 file changed, 18 insertions(+), 6 deletions(-) > > > > diff --git a/drivers/mfd/cs5535-mfd.c b/drivers/mfd/cs5535-mfd.c > > index 053e33447808..96a99ac13384 100644 > > --- a/drivers/mfd/cs5535-mfd.c > > +++ b/drivers/mfd/cs5535-mfd.c > > @@ -57,9 +57,17 @@ static struct mfd_cell cs5535_mfd_cells[] = { > > }, > > }; > > > > -static const char *olpc_acpi_clones[] = { > > - "olpc-xo1-pm-acpi", > > - "olpc-xo1-sci-acpi" > > +static struct mfd_cell cs5535_olpc_mfd_cells[] = { > > + { > > + .name = "olpc-xo1-pm-acpi", > > + .num_resources = 1, > > + .resources = &cs5535_mfd_resources[ACPI_BAR], > > + }, > > + { > > + .name = "olpc-xo1-sci-acpi", > > + .num_resources = 1, > > + .resources = &cs5535_mfd_resources[ACPI_BAR], > > + }, > > Is the cs5535-acpi cell actually used by anything? I think it was only > ever used as a template and can be removed; I didn't spot any driver that > uses it. I did think about this, but I assumed removing it at this stage would make the resource matching below more convoluted. I'll take another look at see what I can do. > PS If the cell were removed then my review comment on the previous patch > becomes moot ;-) > > > > }; > > > > static int cs5535_mfd_probe(struct pci_dev *pdev, > > @@ -105,10 +113,14 @@ static int cs5535_mfd_probe(struct pci_dev *pdev, > > goto err_remove_devices; > > } > > > > - err = mfd_clone_cell("cs5535-acpi", olpc_acpi_clones, > > - ARRAY_SIZE(olpc_acpi_clones)); > > + err = mfd_add_devices(&pdev->dev, PLATFORM_DEVID_NONE, > > + cs5535_olpc_mfd_cells, > > + ARRAY_SIZE(cs5535_olpc_mfd_cells), > > + NULL, 0, NULL); > > if (err) { > > - dev_err(&pdev->dev, "Failed to clone MFD cell\n"); > > + dev_err(&pdev->dev, > > + "Failed to add CS5532 OLPC sub-devices: %d\n", > > + err); > > goto err_release_acpi; > > } > > } -- Lee Jones [李琼斯] Linaro Services Technical Lead Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog