From patchwork Thu Oct 24 16:38:26 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 177548 Delivered-To: patch@linaro.org Received: by 2002:ac9:3c86:0:0:0:0:0 with SMTP id w6csp2400855ocf; Thu, 24 Oct 2019 09:39:27 -0700 (PDT) X-Google-Smtp-Source: APXvYqwHJUBqBEcA+YApFT319RUj4bznUtbxyJFfo0aPBKqOOKQX8HLYb8Uhxo0ueUW5himkWsW8 X-Received: by 2002:aa7:cd68:: with SMTP id ca8mr22209229edb.58.1571935167001; Thu, 24 Oct 2019 09:39:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571935166; cv=none; d=google.com; s=arc-20160816; b=jV0n2pmfKltpbv7BW2YCX3tOmDELg+rBcw+xM+cF9HQQBJFYSmyW/OBFMvPmjzAv6b Agodg47AL69/xbN1GkrVofl9rr2Xo9nt2+OtDQ3g1QsUqTwZgOF2gVqt8fs0i0kKSKbZ emrq+/kLeKXTy4VTbIkJz96DbtoqQirq71HvnMZpoqYJFqgtZQMfbCxOhYESEgS1Vnf8 9naq+4lK6AjtUPJVCisyCQ3I9w1frdsCTHcuReJG2xiz0O3ZyvceLmy0gmExi2DdfXGn Dh63X09W4QB089akGzW79+ItWURrIoTRu4WeUDmW06m8QrOUKVnBpWUHt2J6z35xK0yg Tbvg== 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=hp9auP1eDPhHh11Inl/NtM2csOEQVC7OB8vmkOBN3Yo=; b=P666JOX+sOsHK5MyM2GaKeE928iFodJd/IvmpYvTC9wvUCPQmjo0fj9DarssAot8tT QEXLxFu07el2wQxu2tbDyiNWYOaNrV62VEkBd7g3KvZHTuZbJfDU+3+B5EiAIM9Fi9b4 rAptZiT0Hagf2wxNlHJpI9JMlFYkmXAmY7dw6gdy4+L3nhpuLHtP6xZ//H6idiHmcrAG 1vu3PxmPVbo84907HqUqf8jNqi3iRLAGIGG71C3lZRGvEVY0PeV/ietdEIfRML8wF4/f ar5MwCBH92we+PTfkVC9+4npDM/xeydBxtbotzisZUgMaN0bbdD159JB2uKDPAE6s/AW jUWQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=dEYKAgP8; 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 p5si11155202eja.141.2019.10.24.09.39.26; Thu, 24 Oct 2019 09:39:26 -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=dEYKAgP8; 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 S2503554AbfJXQir (ORCPT + 26 others); Thu, 24 Oct 2019 12:38:47 -0400 Received: from mail-wr1-f67.google.com ([209.85.221.67]:43576 "EHLO mail-wr1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2503523AbfJXQio (ORCPT ); Thu, 24 Oct 2019 12:38:44 -0400 Received: by mail-wr1-f67.google.com with SMTP id c2so21606689wrr.10 for ; Thu, 24 Oct 2019 09:38:41 -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=hp9auP1eDPhHh11Inl/NtM2csOEQVC7OB8vmkOBN3Yo=; b=dEYKAgP8b62ELK3aQy8Sm5kXfcxSfxaAtjT6k+tEy2Fr1SkdaT8Z6Pmgbfx5CXzc14 jTsX9Jkng/DOgrAv0GelNisE3nHQ7yTupEmSIAw/5n4kSTtlYrgx/YLnF8DGyvAslB8P p0BbLyzg/LECSvrUWBrp0j7oW4JkIqArUMeHE28aaAMfMMnvRLn1MfFJ+8lVl8XlSmxk n/TCMCnjjEQPP1XiIBwM5a61rQX3N5AwYfykWqp0MbROF9g2ZoZQBdCr5CjtYKC5eVzL +Es6ogdDihTa1NzCLCbLUQ9BywpWX9XItmuPED0qWoroBUJsMwNdyk6pt70Y5qJYO4hx 31OA== 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=hp9auP1eDPhHh11Inl/NtM2csOEQVC7OB8vmkOBN3Yo=; b=HnT9HhS1+3TIKCbbm+ZZAONQ2wKyDOriG8NHJ+NA6yfYBmusY6Lsa9BmXBzCixT+wE peY2/BT/xmUrC+1om5PpA2jnGdGtvrXy2rIms7NyXcTWzeGc9hMJGsWiT35yJNbozIOE xwqWPEwZjuVRh4yXbrRVaXRD4qfajL3UX5/iBkhWndMUNSr58XLQ4ukX8QNZ9++QEo5p eDVjzOJOXxVI3CWquct+2wDxMeAYMOAWzDEgL3ZCLw3GahzgpxFT610oEg1y9I+VNUHO lJ4AXGlWSSGel6ijPwUrvg7uokuMOAfyClCvl2PQQrxNfxzNwFmpzaEdvT+4byA4yg2+ f1xQ== X-Gm-Message-State: APjAAAV4f/GlqAzy1os/dEKe5f7v2JJ+Ux3j1PwPjf3wHu0AOUWIvTGQ LUTeNtpuUz22RcO1IuesjXR5LQ== X-Received: by 2002:adf:f686:: with SMTP id v6mr5010878wrp.141.1571935120637; Thu, 24 Oct 2019 09:38:40 -0700 (PDT) Received: from localhost.localdomain ([95.149.164.99]) by smtp.gmail.com with ESMTPSA id 6sm3446175wmd.36.2019.10.24.09.38.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 24 Oct 2019 09:38:40 -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 v3 04/10] mfd: cs5535-mfd: Register clients using their own dedicated MFD cell entries Date: Thu, 24 Oct 2019 17:38:26 +0100 Message-Id: <20191024163832.31326-5-lee.jones@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191024163832.31326-1-lee.jones@linaro.org> References: <20191024163832.31326-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 | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) -- 2.17.1 Reviewed-by: Daniel Thompson 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; } }