Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp4219941ybg; Fri, 25 Oct 2019 15:18:48 -0700 (PDT) X-Google-Smtp-Source: APXvYqyeVmvghq0b7DPYQig2ERj8pmbFFk2/a9TjTQpvhnwlR19HxOMsfqKUBxJn6QXp1aBxuIF9 X-Received: by 2002:a50:cd53:: with SMTP id d19mr6520318edj.197.1572041928870; Fri, 25 Oct 2019 15:18:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1572041928; cv=none; d=google.com; s=arc-20160816; b=TLYn3IuK0z2FWvJdjman2b2wzQucMoD0TuDL8wLXju52/MeU+2UaTEODKaX2KEV7zt 6L0bmTIdKXfqjVo0IwqMVrLQ+ldc2YqaO60aIodQ1vkrjfTLR9AVWYg+Ns7mUF5cV65g JGN/Xmn6kko37OfRa3lMfJm959Rrqr8JBqWfiq3FbupUxVLp/7ML8n3Ef3r5SJEChWm2 6GibpUZ5+44cnOjQvHusL1LPuJDDCIh9YU7AGdIAXSNoeDxU+p4lQCcLLtF8mLVwsUNr Pg35Ao8W4Fz+Xeq5B1qLMiqnVk4WwQK5m5QZ/pEqbNqbv6ukoDWVJ4qfcpsPEFCYJ6CM H/kw== 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=mU3F3IzQsPzzpNMBmUrZ0k4gyWNr/xsuP+XBZgHlZiI=; b=PbEyINqRd7wKPQxZYa5KkX1EyKQx1ANAMfKhppWLqpnf7uzpF/l0REzRRqDPdnugMA zBkrGfUWgrMy9IoL6J/JFw/CMnN9NtP0axWX0LZCJQRHiIpsuVwVp+jG9VVQzsUvTen8 ZOCYL2xff2FMoUcbO0tFMzOUC0W8R6+yGre8MSNC8NyTBuqD3f9mfCEGWRZ2Cu0MujNc R7Gclzzx8q+mCz9Evki4P8EecK5elV7iDDfeOF3o7ppg4/6gSjPETRgX4mnaCZcICSTW oJarNYNAxGeVRmKm+cdb8cpN6fWIW1ENRd3TzWOG+EmehoPGKj1Eo+zcNH81VX89sCRv S8Jg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=p9ySKPlS; 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 x4si2160868eju.197.2019.10.25.15.18.22; Fri, 25 Oct 2019 15:18:48 -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=p9ySKPlS; 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 S2393206AbfJYIuz (ORCPT + 99 others); Fri, 25 Oct 2019 04:50:55 -0400 Received: from mail-wr1-f68.google.com ([209.85.221.68]:34743 "EHLO mail-wr1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726986AbfJYIuz (ORCPT ); Fri, 25 Oct 2019 04:50:55 -0400 Received: by mail-wr1-f68.google.com with SMTP id t16so1363434wrr.1 for ; Fri, 25 Oct 2019 01:50:53 -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:in-reply-to:user-agent; bh=mU3F3IzQsPzzpNMBmUrZ0k4gyWNr/xsuP+XBZgHlZiI=; b=p9ySKPlS9CNE3I642lywwJwYWHSeWJ9DGHcyQdi7nLgOCastK730EcWtbWLXygr+fm 9eQHwbWqdxVvm2DOqrL7oMHN51DUgMFxM+cRVifrC01I0s7k58M3dGxNkJ0+lGYD56zj frJ0Dgtwniy4hA1wY07UrYK2VcTBbRpzatr1t/3VvRbb0MqBCZ/YqqtJg1H7boP7oagn Bj199e/JrmyTrpSL0oYa29LqOM+Csdk+KjptXRXjCORcNGHFDvTWZ5RUHpmSy/TAqkaj F/1oHtQdEYq6ZhmDArWWdh5yGn8khR/6P/HBErqDYUfCYFSN7IL7XX0eBoVlbMVo+X/T gnEw== 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:in-reply-to:user-agent; bh=mU3F3IzQsPzzpNMBmUrZ0k4gyWNr/xsuP+XBZgHlZiI=; b=qIb72svIHPlj6lZf+OpwX1hLBPmLxZx38KSrac9QrE+eycrctswhqB3ZhGixrkUWvM C+8nkC9//GVuqGfAtTsIpttrZxMWHDYWIg1sin2mRSA3ffi5J+k5Swl0O9RTHD574Kw+ XHj/ZlOS15YlvkyvdpJK2/B2RM7P54AkF1rBjWIgHx0Ot6ZxbTN6j7KY8giJxuLGaOjB RpkZTe7z/zr3lGVJ7sBIFaOOLlp8SlRqXEkperTTbUHDXlDh6NFBiZ4GAGibg2v+X88h f98geEIGGmoIl0JwIXTgJwMgK12hh8MJAXZdD+pGgx1/fIUN5JSoZ5RnQmgMpKqMRaSg DW0Q== X-Gm-Message-State: APjAAAVjColo3PFMxkJ/eG585Ex7rYMdEuMpvXyb6SAyeOujs8HKqUKM LKUi39s8Ci6f7i6ELrh9LEcrMj+qkOFKCQ== X-Received: by 2002:a5d:4341:: with SMTP id u1mr1880473wrr.306.1571993453132; Fri, 25 Oct 2019 01:50:53 -0700 (PDT) Received: from holly.lan (cpc141214-aztw34-2-0-cust773.18-1.cable.virginm.net. [86.9.19.6]) by smtp.gmail.com with ESMTPSA id p5sm1924303wmi.4.2019.10.25.01.50.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 25 Oct 2019 01:50:52 -0700 (PDT) Date: Fri, 25 Oct 2019 09:50:50 +0100 From: Daniel Thompson To: Lee Jones 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 v3 04/10] mfd: cs5535-mfd: Register clients using their own dedicated MFD cell entries Message-ID: <20191025085050.lwrhdwccof5vleie@holly.lan> References: <20191024163832.31326-1-lee.jones@linaro.org> <20191024163832.31326-5-lee.jones@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20191024163832.31326-5-lee.jones@linaro.org> User-Agent: NeoMutt/20180716 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Oct 24, 2019 at 05:38:26PM +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 Reviewed-by: Daniel Thompson > --- > drivers/mfd/cs5535-mfd.c | 25 ++++++++++++++++--------- > 1 file changed, 16 insertions(+), 9 deletions(-) > > diff --git a/drivers/mfd/cs5535-mfd.c b/drivers/mfd/cs5535-mfd.c > index 27fa8fa1ec9b..4c034c9f2303 100644 > --- a/drivers/mfd/cs5535-mfd.c > +++ b/drivers/mfd/cs5535-mfd.c > @@ -50,16 +50,19 @@ static struct mfd_cell cs5535_mfd_cells[] = { > .num_resources = 1, > .resources = &cs5535_mfd_resources[PMS_BAR], > }, > +}; > + > +static struct mfd_cell cs5535_olpc_mfd_cells[] = { > { > - .name = "cs5535-acpi", > + .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], > }, > -}; > - > -static const char *olpc_acpi_clones[] = { > - "olpc-xo1-pm-acpi", > - "olpc-xo1-sci-acpi" > }; > > static int cs5535_mfd_probe(struct pci_dev *pdev, > @@ -101,10 +104,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 CS5535 OLPC sub-devices: %d\n", > + err); > goto err_release_acpi; > } > } > -- > 2.17.1 >