From patchwork Mon Apr 16 12:56:27 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 133461 Delivered-To: patch@linaro.org Received: by 10.46.84.18 with SMTP id i18csp3536641ljb; Mon, 16 Apr 2018 05:57:22 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+QG8RaHOsvXeHg9h9b38DQWxX8iHrN4dNrZyJ7bXFEIiRmVckuMCpkWyQMpGLqEM9kPz7S X-Received: by 10.98.53.198 with SMTP id c189mr2555598pfa.243.1523883442294; Mon, 16 Apr 2018 05:57:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523883442; cv=none; d=google.com; s=arc-20160816; b=ej28l7ttb5DVm3MtKZQngcZm0KqdYahTpehPI2IaIurcUE85XYi49WDLL4pOevbfGj IacicCMzpFNMMtFdnKBZa5kPb3Zmg8deo3BOoUcrav1KkpSTwhuI/5vGHzwpu2aS2SlD 6U2hDZvrPDfNOgJWvH92VNA/4G4C34h4o/nmI1H5OgXmsSu96t8DDm28FOlkZjkV6DCS oZTpKS4ToGmowYEmuYjSoLpHRCzfVWvj+mWdVjvmkZLeK4eV/aIffycFhhG2CamOpzBj Qmsfq76/4n4YF4wPdrI9EgEBwgTQUiL22Dzn4Ma3+V3zzNmHHKLkTGqThs+D5ips3su7 oslw== 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:arc-authentication-results; bh=M751twpme8rcfT6btoPVwHKCTQ1LtTgztllz8TN3ZSA=; b=CXfKP30A+IjtEmdid+Q3/BCPrfzRa7+pd3df4cmy8DkdF+4l3xupLjbfFWbGzcKDXn D7vuVcZXKzOX976EcdxGvlq7jQiejeJMDCtRzi3r+DPMc3khz9axedSfZ3BNbQz3M8VB 70iYYqBM9MFiy52+FBRJDVqE9GOFM/LcJ5XIUwS0I+LmzZuq57UwN5I+HwzhlE2ktHbQ aMb2bmWOkYcrImymNjgvZAaTWrwXwuoqAyhsLNoJKU8FtxKteWWciaPCkMw3H9/qkE7P 2A0KuXo6K81aP8q7jlPVHbrFqsLYnWl6/kCbGh7pUkhSR1wG9CW+aMSyTcItdCP5e1B0 ECCg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=FCGv/SjN; 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 i1-v6si5110252plt.178.2018.04.16.05.57.22; Mon, 16 Apr 2018 05:57:22 -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=FCGv/SjN; 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 S1754716AbeDPM5T (ORCPT + 29 others); Mon, 16 Apr 2018 08:57:19 -0400 Received: from mail-wr0-f195.google.com ([209.85.128.195]:33771 "EHLO mail-wr0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754660AbeDPM5E (ORCPT ); Mon, 16 Apr 2018 08:57:04 -0400 Received: by mail-wr0-f195.google.com with SMTP id z73so25733477wrb.0 for ; Mon, 16 Apr 2018 05:57:03 -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=M751twpme8rcfT6btoPVwHKCTQ1LtTgztllz8TN3ZSA=; b=FCGv/SjNaqJ8SNVpeT6BY3pQ0qZNTfTicio5xFSDcZn0M/kB83/NHbCG8GGv0XxblX vV3HcI+yN/iDoIKgGyj4Ndvk3MTw6R4LXxRS7aboFmpglhOQAsknzauKMshUpcs2RVJs J2CcJ5oIFziXaVto/r0H4fsSHRXptzKnQbPBU= 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=M751twpme8rcfT6btoPVwHKCTQ1LtTgztllz8TN3ZSA=; b=nxKyIWjvW1bRFTB0UFaEbwBOXG378oQAk15JY63lHHsJvIqVfsFQxMC2JzS9HLEdzv 6D+zKEK3NRznpqWhT7iVTmEHd8ijxj9yq6fzsjQ0sL+Knd9Vbgpy/5zHY8uL0djbLfPh WQg7BJe2wFZNfeOZewoHxsYaL0KkweknXpieAdpDh0f91HaDpi/caeRX2o+lR2lqjzdQ 92/LAaLI/0aefXd9Mo/MPKQ10tjZ6tkLO6szZmlL90Itp/VO6On/alqUKaeNav3/INWR wbi566Q8bg6kgP0K2P773oUsgBabhlPbbRN1ZUaVvVS2hJIgA0k4llct2h9rfZRguyho nRCg== X-Gm-Message-State: ALQs6tDe+60mnrrtZ4MiIuvZhoonP4HrdnijqO90gaxN7AJdVQ9QgMLP 0CK1Yv2XycBuuEsMQ+WtNwKWMQ== X-Received: by 10.223.166.144 with SMTP id t16mr472801wrc.1.1523883423235; Mon, 16 Apr 2018 05:57:03 -0700 (PDT) Received: from localhost.localdomain ([2.27.167.70]) by smtp.gmail.com with ESMTPSA id m35sm15615174wrm.59.2018.04.16.05.57.02 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 16 Apr 2018 05:57:02 -0700 (PDT) From: Lee Jones To: linus.walleij@linaro.org, ldewangan@nvidia.com Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Lee Jones Subject: [PATCH v2 3/3] mfd: db8500-prcmu: Example using new OF_MFD_CELL/MFD_CELL_BASIC MACROs Date: Mon, 16 Apr 2018 13:56:27 +0100 Message-Id: <20180416125627.22156-4-lee.jones@linaro.org> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20180416125627.22156-1-lee.jones@linaro.org> References: <20180416125627.22156-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 Acked-by: Linus Walleij --- drivers/mfd/db8500-prcmu.c | 24 +++++++----------------- 1 file changed, 7 insertions(+), 17 deletions(-) -- 2.14.1 diff --git a/drivers/mfd/db8500-prcmu.c b/drivers/mfd/db8500-prcmu.c index 5970b8def548..91259addab54 100644 --- a/drivers/mfd/db8500-prcmu.c +++ b/drivers/mfd/db8500-prcmu.c @@ -3038,23 +3038,13 @@ 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 = "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("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 int db8500_prcmu_register_ab8500(struct device *parent)