From patchwork Wed Jul 13 11:26:51 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 71917 Delivered-To: patch@linaro.org Received: by 10.140.29.52 with SMTP id a49csp952141qga; Wed, 13 Jul 2016 04:28:53 -0700 (PDT) X-Received: by 10.66.160.169 with SMTP id xl9mr12901410pab.159.1468409332403; Wed, 13 Jul 2016 04:28:52 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b188si3805526pfa.90.2016.07.13.04.28.50; Wed, 13 Jul 2016 04:28:52 -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; 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 dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751260AbcGML2P (ORCPT + 30 others); Wed, 13 Jul 2016 07:28:15 -0400 Received: from mail-wm0-f45.google.com ([74.125.82.45]:35176 "EHLO mail-wm0-f45.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751123AbcGML2J (ORCPT ); Wed, 13 Jul 2016 07:28:09 -0400 Received: by mail-wm0-f45.google.com with SMTP id f65so24605796wmi.0 for ; Wed, 13 Jul 2016 04:27:58 -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=sq+t8RTzPTqOqFPP9eM5VbuJ3XKcpuO/xRA/jzeg3jo=; b=I0L6ebpUMeKZD0BUeX9aHncjofl4KXrHOO+uUEfRSCYJIRmPorw1nppuHIhsCEJmp2 XCGzOB88nRbKu4oU2Ar6mFSeTdinDTJ9NQJPulffYy6iI26XeaEdJgVYuy6l7rdlX3rt 0pfzuAhExVA9AzsUlo6WEImaI2bmZNvup0Tno= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=sq+t8RTzPTqOqFPP9eM5VbuJ3XKcpuO/xRA/jzeg3jo=; b=Khr7RlbDpi9KdK3uxtqUmC9eOmmnfaXzZge91lHvPCiKO6RqCIDyrWr04axj7YJQxe oOQCqpOmddX6sXgdbU3od6msICshUPMXvT2ztnWGRWR/M5J7uQKpPMuEpEXFKfrTf7+3 fbudvkFsZroeucjl2EYqiQ8t+jWO6rckKuN4vVsgdElHoVW1D85BvGwlxl9tQp8jR2av u+xQzQF9/0nDda/MQfuZ7xrC+Z0N54C3Gs9hSD93Hcq45mM2s79kHBekckjQ+1A1289K hSilCn9elGxNjaw/2lvEd+EymU7xU2sQnXQL25P3j6SvvDdBA8/G/Ct+HH+qJldX4sYq o8Lg== X-Gm-Message-State: ALyK8tItpCRA7BeqjLgMR/bBY54XrLSkm78I/8y7UWggvWOcFDJ6pdhFNWm2Dx2erWAeUjlh X-Received: by 10.28.57.8 with SMTP id g8mr10295608wma.71.1468409271828; Wed, 13 Jul 2016 04:27:51 -0700 (PDT) Received: from localhost.localdomain (host81-129-170-195.range81-129.btcentralplus.com. [81.129.170.195]) by smtp.gmail.com with ESMTPSA id s4sm412797wjj.41.2016.07.13.04.27.51 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 13 Jul 2016 04:27:51 -0700 (PDT) From: Lee Jones To: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Cc: rklein@nvidia.com, ldewangan@nvidia.com, linus.walleij@linaro.org Subject: [PATCH 3/3] mfd: db8500-prcmu: Example using new OF_MFD_CELL/MFD_CELL_BASIC MACROs Date: Wed, 13 Jul 2016 12:26:51 +0100 Message-Id: <20160713112651.14539-4-lee.jones@linaro.org> X-Mailer: git-send-email 2.9.0 In-Reply-To: <20160713112651.14539-1-lee.jones@linaro.org> References: <20160713112651.14539-1-lee.jones@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org ... with and without 'resources'. Signed-off-by: Lee Jones --- drivers/mfd/db8500-prcmu.c | 33 ++++++++++----------------------- 1 file changed, 10 insertions(+), 23 deletions(-) -- 2.9.0 Acked-by: Linus Walleij diff --git a/drivers/mfd/db8500-prcmu.c b/drivers/mfd/db8500-prcmu.c index c0a86ae..4c9c951 100644 --- a/drivers/mfd/db8500-prcmu.c +++ b/drivers/mfd/db8500-prcmu.c @@ -3061,29 +3061,16 @@ static const struct mfd_cell common_prcmu_devs[] = { }; static const struct mfd_cell db8500_prcmu_devs[] = { - { - .name = "db8500-prcmu-regulators", - .of_compatible = "stericsson,db8500-prcmu-regulator", - .platform_data = &db8500_regulators, - .pdata_size = sizeof(db8500_regulators), - }, - { - .name = "cpufreq-ux500", - .of_compatible = "stericsson,cpufreq-ux500", - .platform_data = &db8500_cpufreq_table, - .pdata_size = sizeof(db8500_cpufreq_table), - }, - { - .name = "cpuidle-dbx500", - .of_compatible = "stericsson,cpuidle-dbx500", - }, - { - .name = "db8500-thermal", - .num_resources = ARRAY_SIZE(db8500_thsens_resources), - .resources = db8500_thsens_resources, - .platform_data = &db8500_thsens_data, - .pdata_size = sizeof(db8500_thsens_data), - }, + OF_MFD_CELL("db8500-prcmu-regulators", NULL, &db8500_regulators, + sizeof(db8500_regulators), 0, + "stericsson,db8500-prcmu-regulator"), + OF_MFD_CELL("cpufreq-ux500", NULL, &db8500_cpufreq_table, + sizeof(db8500_cpufreq_table), 0, + "stericsson,cpufreq-ux500"), + OF_MFD_CELL("cpuidle-dbx500", NULL, NULL, 0, 0, + "stericsson,cpuidle-dbx500"), + MFD_CELL_BASIC("db8500-thermal", db8500_thsens_resources, + &db8500_thsens_data, sizeof(db8500_thsens_data), 0), }; static void db8500_prcmu_update_cpufreq(void)