From patchwork Mon Apr 16 12:56:25 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 133462 Delivered-To: patch@linaro.org Received: by 10.46.84.18 with SMTP id i18csp3536873ljb; Mon, 16 Apr 2018 05:57:37 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/cyps9RqbHyXNY7fBqMHpbpFaamzz02n8XZ0WDHqh7iMp8nXZCyGKBHxSW7SIaLspFLU+P X-Received: by 2002:a17:902:284b:: with SMTP id e69-v6mr3680492plb.240.1523883457620; Mon, 16 Apr 2018 05:57:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523883457; cv=none; d=google.com; s=arc-20160816; b=NxWvg8Rt7bbo9yigOKqX57KxQk8E1w786KmRAWV4y/tqrXqNJ46US3fdkRrUHwGnEo 7DpulmPIQ2kP/PwhS+iYEDvM+TsrooEUNXjAI+AdGYR/LYp3L63UJIGHmeakkBboZZ9I woxKTMnCAlhIgaBd5aR2oF2RZ6MsTCl1FisyxUc0mNc3gZJ0t+2gciE64PAHrguVGpXc h9gYnwy04lTsBg/O+qQ4A3dLJVfyp92syW9czvqGkgIU29ISRmDvsrhwM1bKTrRPpNph 4Z3IHqNyXTLiBtutzLdi/ZF9LThyS6QITo/HRNPsT0U0jCZ7V/yVayt/i40HwHh2iPzF IFPA== 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=ke3GUk3zI9jw6rHKQNY6Y9Wzchlxcnmna8V/J1FTI3E=; b=0mPSvZnx9aI2QtoSYDRgYWvRZtLRBMt5dCCOo7py62tG7CBRZMJJUyxS6MxzNzim2O MmOPa1kjqxu/8I+8qC0GW8Q8ywx9TS4yyGB27SFCkmqYoC7Afb93RgpX2MoCZE6EcRZ1 eNByAM2RvI06FAtrdAZgW4REsxZ2vm/4MocqVAdH58qzhdUJId6G7jBUgVX9vdbG8JQ9 yCDMkJHnYHxuTofA15hOPpL633XtN9E4LBeU9nMjgExWj99QJ0w1AylDL5DyoIYFpH9w AUWxDimVOOLOd5DQHA/aGUKta2fOubNNOMH0kPE0pjZPpMjlYGSSk3ffkJIITFzPkKNb /8BQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Z+t2oM0P; 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.37; Mon, 16 Apr 2018 05:57:37 -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=Z+t2oM0P; 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 S1754758AbeDPM5f (ORCPT + 29 others); Mon, 16 Apr 2018 08:57:35 -0400 Received: from mail-wr0-f196.google.com ([209.85.128.196]:38640 "EHLO mail-wr0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753149AbeDPM5B (ORCPT ); Mon, 16 Apr 2018 08:57:01 -0400 Received: by mail-wr0-f196.google.com with SMTP id h3so13103812wrh.5 for ; Mon, 16 Apr 2018 05:57:01 -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=ke3GUk3zI9jw6rHKQNY6Y9Wzchlxcnmna8V/J1FTI3E=; b=Z+t2oM0PLEB/3xQ2DfEygXH/dKb4dI3m/J4ePwXeSPTUKnBn3O9U7PoaAzHOpMjWDJ nxzeIAUrHGgnJ9ArJvZrwQHyGE3pnsFtVgv4LxvT8WA8OYWteuH6hZMEsNRmQmXbzzZR 13I4gzr4dOZ/jYtLnW6qyVqoycyvWyRimZdwI= 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=ke3GUk3zI9jw6rHKQNY6Y9Wzchlxcnmna8V/J1FTI3E=; b=mjzmmTk4at7Z28Yl/aiUE2+6NOHyy8ZS0TCRw6pdSik8c/C6EPo+bCxHCQX+YVMMWQ DbDSWRtPz8lKeA4R3nTCTmFF5ly/dtmFxRiRZlz+I1Pxcu/+BRaB7vSbkdcC5KpXxa21 fMa8ey3rtEhC3+b3Ok/fB491fE4FBXcnP5otbph3Who0HULSfNXoiYW2qebTfzsPkGPR D1koj/J4p9+sdiX9Vr57X7Hxqo0ecQNxRhOAR355tKEnr8eLus98lq9rv+OmRvWfmPK6 XF+rugYkF2nJD95feRuOhH6fx50+OShT1XzI4funrQkmWjEvcde2Ihe55U0UX+ixwfcB n46A== X-Gm-Message-State: ALQs6tAJtGN/Vu1n9T/J1t1iITznK4JZwUL/RvN52nxO5uxo3P5h4FYK pW4bZhVrF6QVagM4vErfDqhV6g== X-Received: by 10.28.19.13 with SMTP id 13mr11065891wmt.89.1523883420699; Mon, 16 Apr 2018 05:57:00 -0700 (PDT) Received: from localhost.localdomain ([2.27.167.70]) by smtp.gmail.com with ESMTPSA id m35sm15615174wrm.59.2018.04.16.05.56.59 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 16 Apr 2018 05:57:00 -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 1/3] mfd: Provide MACRO to declare commonly defined MFD cell attributes Date: Mon, 16 Apr 2018 13:56:25 +0100 Message-Id: <20180416125627.22156-2-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 Signed-off-by: Lee Jones Acked-by: Laxman Dewangan Tested-by: Laxman Dewangan --- include/linux/mfd/core.h | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) -- 2.14.1 diff --git a/include/linux/mfd/core.h b/include/linux/mfd/core.h index 99c0395fe1f9..2bdae891fd24 100644 --- a/include/linux/mfd/core.h +++ b/include/linux/mfd/core.h @@ -16,6 +16,35 @@ #include +#define MFD_RES_SIZE(arr) (sizeof(arr) / sizeof(struct resource)) + +#define MFD_CELL_ALL(_name, _res, _pdata, _pdsize, _id, _compat, _match)\ + { \ + .name = (_name), \ + .resources = (_res), \ + .num_resources = MFD_RES_SIZE((_res)), \ + .platform_data = (_pdata), \ + .pdata_size = (_pdsize), \ + .of_compatible = (_compat), \ + .acpi_match = (_match), \ + .id = (_id), \ + } + +#define OF_MFD_CELL(_name, _res, _pdata, _pdsize,_id, _compat) \ + MFD_CELL_ALL(_name, _res, _pdata, _pdsize, _id, _compat, NULL) \ + +#define ACPI_MFD_CELL(_name, _res, _pdata, _pdsize, _id, _match) \ + MFD_CELL_ALL(_name, _res, _pdata, _pdsize, _id, NULL, _match) \ + +#define MFD_CELL_BASIC(_name, _res, _pdata, _pdsize, _id) \ + MFD_CELL_ALL(_name, _res, _pdata, _pdsize, _id, NULL, NULL) \ + +#define MFD_CELL_RES(_name, _res) \ + MFD_CELL_ALL(_name, _res, NULL, 0, 0, NULL, NULL) \ + +#define MFD_CELL_NAME(_name) \ + MFD_CELL_ALL(_name, NULL, NULL, 0, 0, NULL, NULL) \ + struct irq_domain; struct property_entry; From patchwork Mon Apr 16 12:56:26 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 133460 Delivered-To: patch@linaro.org Received: by 10.46.84.18 with SMTP id i18csp3536446ljb; Mon, 16 Apr 2018 05:57:08 -0700 (PDT) X-Google-Smtp-Source: AIpwx49JWvBQQ6QkMN8pg4N5Yz2+6jGt5wMag8MSlVggXISz1ne6lqgAr0w+T7p2d8k25qTFFMQV X-Received: by 10.99.126.88 with SMTP id o24mr4790572pgn.325.1523883428800; Mon, 16 Apr 2018 05:57:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523883428; cv=none; d=google.com; s=arc-20160816; b=wm+DxbpqGKzjItnnawFk5hqj89EJMTMhzYIRALWcaGoDbc8zeMuqQcAdoAwHCZJY07 uYMWFy4PaT1xn8yy+fVjdtNFtlgmNRaarAO+DBcO8yZSXv74MLPwQqneO6YKbXwRUDnY W/1jepr4s4JkU6wrL0vydtKJ93M4baxjveKUIwR6DUCMwl4Ej7oTDidUcFR8m1/jKlcC vDIlQeYA2wseWxS+W8OwrOAIx8KEQ1y2ifniIVoxLaj16/kt6KvNBuyorSCG9TRtW+bC ew1LFHluTVQBWUAOTfccHz05PXOo+4SLrgjm5OEiOUEeKiqbATjnxPQf6fiXpFDqcU4X RgfQ== 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=8wzB/SJbeKZNhcUltb5VO29BnHaUk/3azIrkC7wvBiE=; b=aVKf84Tv04qNaPV5ZQyjs9gJTzYNG7iX2puxUqSuWuIyV+YlYIuA3gSZ+Mh0nGkCV6 VOEKA97ZiBw8sbIy9AdA6k38esuudQtMVR0NzAiqBuMP1GhAlWTiTVBmkw83kRKJvWAc aG98RvEJPdmLknxjti0OBVAVVksPQKcUKO2u61VZphYNcWImnaaNtsrZ1DPyNx+ri0QR j+Qnbf3wzT+6K5iyCtL5ZbnSVSBM36NHFkdHZUgmf2HpIIZEygZCF/HXHJCFrCZ8ed0Y e1DzfbK3GTWeJ0bpNax2bHc879KkXu/rlf84ihzEKSayhsjur5U1252kBHwMIoCOisso eDzg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=gp8WnNFo; 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 b4si9471195pgu.79.2018.04.16.05.57.08; Mon, 16 Apr 2018 05:57:08 -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=gp8WnNFo; 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 S1754698AbeDPM5G (ORCPT + 29 others); Mon, 16 Apr 2018 08:57:06 -0400 Received: from mail-wr0-f193.google.com ([209.85.128.193]:43740 "EHLO mail-wr0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752578AbeDPM5D (ORCPT ); Mon, 16 Apr 2018 08:57:03 -0400 Received: by mail-wr0-f193.google.com with SMTP id y7so25713270wrh.10 for ; Mon, 16 Apr 2018 05:57:02 -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=8wzB/SJbeKZNhcUltb5VO29BnHaUk/3azIrkC7wvBiE=; b=gp8WnNFo56HSNaXZiJjgKQfluIQgNNn5ywK9SexBWlzxXafqqczoLDGj8/oVoGKWRf wPHVc3AWlMdxtZp4+t6NT7qVUlOKhGumbK16qXgdf27gZnZ6AWcTkD+bJJeJVpO+kd19 PYr3pKB5U0nJGn1wrmMxweVc5tRtzJJvX01AU= 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=8wzB/SJbeKZNhcUltb5VO29BnHaUk/3azIrkC7wvBiE=; b=P0C2/9AgJJiABvQv9paz5p1GFlGTguFkynN+m5WOSankskOmG5KSs7TOJX9KV+9w+R Sl7+WqUAT7h+qyKJznbip7ecwMvE5g+rZaf8+/5xELDQN3Cf/QDcnjykn76ExnDiYalh 8hC2N/Lp6sBIq4AfXiB0ZIBnXfuo1Xs/ssE2XXUdtNyGXsX3xqESrJrT6xG3E92Rt5iO WUQytvwBmG2LVgtIXJDEUUgps6pPyqfaI71+elil0rZszTMKsvuefm+Bkszq5L+9Ww9Q hKze/GgO84oSSfzrgIgMY2xHAPSHKWIpawzH+v6Xxu3H2w9uClAYBrs4YPLhwo8ASP5+ puFw== X-Gm-Message-State: ALQs6tDtOibpESYzUcS21+nqv3IQkDobX2AqHC6NUhM2XCqu0r6lCu3P CVcWXPPgmScph/mHrAgR8Io/VA== X-Received: by 10.223.136.34 with SMTP id d31mr4802150wrd.18.1523883421937; Mon, 16 Apr 2018 05:57:01 -0700 (PDT) Received: from localhost.localdomain ([2.27.167.70]) by smtp.gmail.com with ESMTPSA id m35sm15615174wrm.59.2018.04.16.05.57.00 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 16 Apr 2018 05:57:01 -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 2/3] mfd: ab8500: Example using new OF_MFD_CELL MACRO Date: Mon, 16 Apr 2018 13:56:26 +0100 Message-Id: <20180416125627.22156-3-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 platform ID. Signed-off-by: Lee Jones Acked-by: Linus Walleij --- drivers/mfd/ab8500-core.c | 138 ++++++++++++++-------------------------------- 1 file changed, 42 insertions(+), 96 deletions(-) -- 2.14.1 diff --git a/drivers/mfd/ab8500-core.c b/drivers/mfd/ab8500-core.c index 30d09d177171..38b6b34165d1 100644 --- a/drivers/mfd/ab8500-core.c +++ b/drivers/mfd/ab8500-core.c @@ -610,107 +610,53 @@ int ab8500_suspend(struct ab8500 *ab8500) } static const struct mfd_cell ab8500_bm_devs[] = { - { - .name = "ab8500-charger", - .of_compatible = "stericsson,ab8500-charger", - .platform_data = &ab8500_bm_data, - .pdata_size = sizeof(ab8500_bm_data), - }, - { - .name = "ab8500-btemp", - .of_compatible = "stericsson,ab8500-btemp", - .platform_data = &ab8500_bm_data, - .pdata_size = sizeof(ab8500_bm_data), - }, - { - .name = "ab8500-fg", - .of_compatible = "stericsson,ab8500-fg", - .platform_data = &ab8500_bm_data, - .pdata_size = sizeof(ab8500_bm_data), - }, - { - .name = "ab8500-chargalg", - .of_compatible = "stericsson,ab8500-chargalg", - .platform_data = &ab8500_bm_data, - .pdata_size = sizeof(ab8500_bm_data), - }, + OF_MFD_CELL("ab8500-charger", NULL, &ab8500_bm_data, + sizeof(ab8500_bm_data), 0, "stericsson,ab8500-charger"), + OF_MFD_CELL("ab8500-btemp", NULL, &ab8500_bm_data, + sizeof(ab8500_bm_data), 0, "stericsson,ab8500-btemp"), + OF_MFD_CELL("ab8500-fg", NULL, &ab8500_bm_data, + sizeof(ab8500_bm_data), 0, "stericsson,ab8500-fg"), + OF_MFD_CELL("ab8500-chargalg", NULL, &ab8500_bm_data, + sizeof(ab8500_bm_data), 0, "stericsson,ab8500-chargalg"), }; static const struct mfd_cell ab8500_devs[] = { #ifdef CONFIG_DEBUG_FS - { - .name = "ab8500-debug", - .of_compatible = "stericsson,ab8500-debug", - }, + OF_MFD_CELL("ab8500-debug", + NULL, NULL, 0, 0, "stericsson,ab8500-debug"), #endif - { - .name = "ab8500-sysctrl", - .of_compatible = "stericsson,ab8500-sysctrl", - }, - { - .name = "ab8500-ext-regulator", - .of_compatible = "stericsson,ab8500-ext-regulator", - }, - { - .name = "ab8500-regulator", - .of_compatible = "stericsson,ab8500-regulator", - }, - { - .name = "ab8500-clk", - .of_compatible = "stericsson,ab8500-clk", - }, - { - .name = "ab8500-gpadc", - .of_compatible = "stericsson,ab8500-gpadc", - }, - { - .name = "ab8500-rtc", - .of_compatible = "stericsson,ab8500-rtc", - }, - { - .name = "ab8500-acc-det", - .of_compatible = "stericsson,ab8500-acc-det", - }, - { - - .name = "ab8500-poweron-key", - .of_compatible = "stericsson,ab8500-poweron-key", - }, - { - .name = "ab8500-pwm", - .of_compatible = "stericsson,ab8500-pwm", - .id = 1, - }, - { - .name = "ab8500-pwm", - .of_compatible = "stericsson,ab8500-pwm", - .id = 2, - }, - { - .name = "ab8500-pwm", - .of_compatible = "stericsson,ab8500-pwm", - .id = 3, - }, - { - .name = "ab8500-denc", - .of_compatible = "stericsson,ab8500-denc", - }, - { - .name = "pinctrl-ab8500", - .of_compatible = "stericsson,ab8500-gpio", - }, - { - .name = "abx500-temp", - .of_compatible = "stericsson,abx500-temp", - }, - { - .name = "ab8500-usb", - .of_compatible = "stericsson,ab8500-usb", - }, - { - .name = "ab8500-codec", - .of_compatible = "stericsson,ab8500-codec", - }, + OF_MFD_CELL("ab8500-sysctrl", + NULL, NULL, 0, 0, "stericsson,ab8500-sysctrl"), + OF_MFD_CELL("ab8500-ext-regulator", + NULL, NULL, 0, 0, "stericsson,ab8500-ext-regulator"), + OF_MFD_CELL("ab8500-regulator", + NULL, NULL, 0, 0, "stericsson,ab8500-regulator"), + OF_MFD_CELL("abx500-clk", + NULL, NULL, 0, 0, "stericsson,abx500-clk"), + OF_MFD_CELL("ab8500-gpadc", + NULL, NULL, 0, 0, "stericsson,ab8500-gpadc"), + OF_MFD_CELL("ab8500-rtc", + NULL, NULL, 0, 0, "stericsson,ab8500-rtc"), + OF_MFD_CELL("ab8500-acc-det", + NULL, NULL, 0, 0, "stericsson,ab8500-acc-det"), + OF_MFD_CELL("ab8500-poweron-key", + NULL, NULL, 0, 0, "stericsson,ab8500-poweron-key"), + OF_MFD_CELL("ab8500-pwm", + NULL, NULL, 0, 1, "stericsson,ab8500-pwm"), + OF_MFD_CELL("ab8500-pwm", + NULL, NULL, 0, 2, "stericsson,ab8500-pwm"), + OF_MFD_CELL("ab8500-pwm", + NULL, NULL, 0, 3, "stericsson,ab8500-pwm"), + OF_MFD_CELL("ab8500-denc", + NULL, NULL, 0, 0, "stericsson,ab8500-denc"), + OF_MFD_CELL("pinctrl-ab8500", + NULL, NULL, 0, 0, "stericsson,ab8500-gpio"), + OF_MFD_CELL("abx500-temp", + NULL, NULL, 0, 0, "stericsson,abx500-temp"), + OF_MFD_CELL("ab8500-usb", + NULL, NULL, 0, 0, "stericsson,ab8500-usb"), + OF_MFD_CELL("ab8500-codec", + NULL, NULL, 0, 0, "stericsson,ab8500-codec"), }; static const struct mfd_cell ab9540_devs[] = { 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)