Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp4105609ybg; Mon, 21 Oct 2019 03:59:13 -0700 (PDT) X-Google-Smtp-Source: APXvYqzDs0143PhxwfVuQr0iSs+Qmx9Ev/RrR5lCjHvsoz2TJRxg8GOuxpCZ9F0Py2ee1d7rE49D X-Received: by 2002:a17:906:448e:: with SMTP id y14mr21788253ejo.136.1571655552544; Mon, 21 Oct 2019 03:59:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571655552; cv=none; d=google.com; s=arc-20160816; b=c6bjrpCb/pcJSmSyKYVbAlvIwP8bBPnaTzrXaP++OqgXO1Nu/8evF49VrIkSvszh+F xTLqBD5VZSqRUJLauzQPwilcteS1ep4zn7jp4ZMnD3EgK9OWaW6oBcPZ2pZkyhESzR8A Hz+zlDLwwiJduhRyy91CsQqeM5I3xBhgockSkfMFWISdQENKvCih8JrWgINPUjM8ZP+Q VFH4Wx3G/C4cF1P6ggbMH4aNxjnofd4anMJ3vjs991qptgvJT9JB/D6NTSig1Pdife+/ l9r+xlYUz6GNG/otuidc26huaLweU6lTVL7ux+2ptmcquuMgUlr4/DSQD5sDuo4F1yGA x+7g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=skmII0RjDFD6SFbyT8IGszhWT77ReZDZIQ2EcDM2hGg=; b=u/luk9WMisIrlTVFXHHinV9tNpLyFVaYzjQr/Nutldasw2SU+GdHy3eiQT0DL+hVml Bt6JRasB14AyhGCp4jFbiIU+leiac/UWx4C4+Bto/8+2yMNDwSmG85Thim2h01zpajfj rVzYJNbxgercTHmPXMgvYaovPLLQIMFgucEu+arT2LmnkD/67ozmMvHq4Al4h86S7ZbV 86nA5jJz7gX3VeUXacMz+gMcE84OWfjRUpQGzfeNXcCU99AS1bcWkbN8sQsB04l2ZvDF qOavHJFSnxGzZK93q18xVhvukX1fEvAG2IY/AO9dMR7YhO253YvYqIRVI+jGd743JZ3o dHQw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=O2gJBDIt; 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 i16si8407312ejc.140.2019.10.21.03.58.49; Mon, 21 Oct 2019 03:59:12 -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=O2gJBDIt; 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 S1728342AbfJUK6e (ORCPT + 99 others); Mon, 21 Oct 2019 06:58:34 -0400 Received: from mail-wm1-f66.google.com ([209.85.128.66]:51177 "EHLO mail-wm1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728250AbfJUK6d (ORCPT ); Mon, 21 Oct 2019 06:58:33 -0400 Received: by mail-wm1-f66.google.com with SMTP id q13so2740389wmj.0 for ; Mon, 21 Oct 2019 03:58:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=skmII0RjDFD6SFbyT8IGszhWT77ReZDZIQ2EcDM2hGg=; b=O2gJBDIt/uu3D3HrGWT7bdvLhDBGsgkK+oKb1wgbr874atEZbtzgTb8tFMtu8f/0R6 DqH9iU2QQIsK7OyqVEb3An+lKaclKzQvZwQ/cjdA3GiRoKszuxJb5p9srbdXf89RCJmo qpwCM28UgKws0pbdkgaxpwhS8W9n+q0Yn0uGsj+fB5S2t2AA9m8Mx8LifNoureM40/ss CQPAx86Vv5QabLz+CB7Y/c4SgIwxO1/6zKvo5bnGXcSYEYTp6iLO+gK4sWphMt/NfFor NR/+JYtiap6aqa7V0py2HEeSMWxcnmxz//1mXU17TOnqGHkOvcjvGRD5mVzQfPt6aqlY ufEQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=skmII0RjDFD6SFbyT8IGszhWT77ReZDZIQ2EcDM2hGg=; b=rljpBIIkBrKGt1SNShNEqTI5gfrQVLiBLGopdyY6/jwwNwtfLlqo3vuA0OR0dK0q7m lZWLq7nR/8usRlNjXAEHU0+fG0uNMExl0ACH5P0ubfo6zCrmoMvyezSJANplJ82DabDt HKAPP3BpofJJGsL+NW+xx25GdQDS+Rra+enGvIL9lBq3O5UiGhYLMcJWjfH6lJpd7tEg lReKIRDLU4jbmiMeyQr8H6jQyDEgN6wEkyH6tlngkFyXorNyfVa8LpwkqiMOsfByxsBw iuCTRO+PA2WMamrppQ3DTvnjasrMgi5XpZxWAedcs+PyxTBMOe7JFDZmaw9VDQ6RZ9ON iGQw== X-Gm-Message-State: APjAAAXzDXKDawsyI6hyfHEFE6cCqc9SLRi8bBMPS3XD+f+Be+mClRYF Jm9jElP1QOxWNobwuR3i4k4y0Q== X-Received: by 2002:a1c:a9cb:: with SMTP id s194mr2818850wme.92.1571655509326; Mon, 21 Oct 2019 03:58:29 -0700 (PDT) Received: from localhost.localdomain ([95.149.164.99]) by smtp.gmail.com with ESMTPSA id q22sm12544289wmj.31.2019.10.21.03.58.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Oct 2019 03:58:28 -0700 (PDT) From: Lee Jones To: daniel.thompson@linaro.org, arnd@arndb.de, broonie@kernel.org, linus.walleij@linaro.org Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, baohua@kernel.org, stephan@gerhold.net, Lee Jones Subject: [PATCH v2 4/9] mfd: cs5535-mfd: Register clients using their own dedicated MFD cell entries Date: Mon, 21 Oct 2019 11:58:17 +0100 Message-Id: <20191021105822.20271-5-lee.jones@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191021105822.20271-1-lee.jones@linaro.org> References: <20191021105822.20271-1-lee.jones@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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], + }, }; 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; } } -- 2.17.1