Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp3951866ybg; Fri, 25 Oct 2019 11:11:30 -0700 (PDT) X-Google-Smtp-Source: APXvYqy4apq7r1wu9q1JtzOk4gHdROBX7SFyY0oj7+wycJ0UgB67+YcioD6jUKZZOyUAboJjo2Th X-Received: by 2002:a17:907:4451:: with SMTP id mw1mr4895998ejb.209.1572027090310; Fri, 25 Oct 2019 11:11:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1572027090; cv=none; d=google.com; s=arc-20160816; b=Eq07sSs/PrR8p+x5HsIcXRxJAxN2fToTF6EzOmumdg4LoW1EN4y9WxMnOqD5Np+wBg mBVuP9oGobWoRPTlDJdbJmDT9520MMNiRNOEhlIyuICEegFO8GZvHmIWkhCaTBSnuESQ MpvRG2vJ/ZI+kOn9P4EKjN9yjp1DwFAPK4CCMtsTLL+RijR2/sgAyzz/KpnBlo5wwNO6 S1kHRIPQpNDKGeOGRPetw78gqQ5pdAlv7Iti7FJzfRl858Y+mbAoqz+5Yo0KnDN/acre 6gObBCOEsTD4T89jN993b48rKocg9hhRpONm9FR3t2iLcc3pZp2dLkxWS12aSYg+8KCo qnhg== 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 f29si1759822ejj.110.2019.10.25.11.11.02; Fri, 25 Oct 2019 11:11:30 -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 S2503549AbfJXQir (ORCPT + 99 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(-) 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