From patchwork Wed Feb 10 15:39:38 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 61678 Delivered-To: patch@linaro.org Received: by 10.112.43.199 with SMTP id y7csp2716014lbl; Wed, 10 Feb 2016 07:39:47 -0800 (PST) X-Received: by 10.98.17.92 with SMTP id z89mr59850173pfi.16.1455118786793; Wed, 10 Feb 2016 07:39:46 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 29si5803054pft.41.2016.02.10.07.39.46; Wed, 10 Feb 2016 07:39:46 -0800 (PST) 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; 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; dkim=pass header.i=@linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752290AbcBJPjo (ORCPT + 30 others); Wed, 10 Feb 2016 10:39:44 -0500 Received: from mail-wm0-f41.google.com ([74.125.82.41]:36288 "EHLO mail-wm0-f41.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752165AbcBJPjn (ORCPT ); Wed, 10 Feb 2016 10:39:43 -0500 Received: by mail-wm0-f41.google.com with SMTP id p63so34381715wmp.1 for ; Wed, 10 Feb 2016 07:39:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=0U3jkbt5n7cJKg5DOq1ENO6cBBzPeoInkAGPwA0JMtc=; b=K15hp+/7dVbw6LkA7Xel3W8HeRgEpcELctWshX0kTLXJRqpLmMEp1z+tGriDMgKjfr TDhjPaFLn99T0IMMRcYq6tYJzZUOW07uCpV98p1Le2RDqr3gkQdkW8Df+5rN58vI7bMX L/oPufV4vEIVTw3/52qwRwLT4hpM8GGHXCnzY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-type:content-disposition:in-reply-to :user-agent; bh=0U3jkbt5n7cJKg5DOq1ENO6cBBzPeoInkAGPwA0JMtc=; b=GrdSnPIFRcv/5buh6Zb1/KwON93k4J1uD/QzCi/v5yEMVcLwj1xxCaEYQYk+V3W5DJ wRemXvi9YVz3br0tDQnxDVgQYfnhqTYTSM5aArIh9zHrJg2UPhBMPlyROBTTbQUJaHi2 mlZ1mJBzUssxlUgLmoJMIh2WO7HxJkGBxrQbJkIWLYrsDQqEgVj0mZDs5Ul54IH4Q6lI p4+BWJMrhP2aYXE/wazYDD5FWM2tU+95oV72t0J3b7ECJTv/bAudEvaPp3FPQOhK4S33 fm6N2qWPQEEFJ82oyrHx3tQF89a+rfr2ZWA6viCsV9szNkAADju37IFr1CZN400vOGRK hs8g== X-Gm-Message-State: AG10YOTP20CZ7RKY1sq6OYSYm5UWoJVEA/F4mQAJMM+8B1CQkSooRfx5kF3NVLaDpj2UPIhW X-Received: by 10.28.144.196 with SMTP id s187mr12332839wmd.9.1455118781835; Wed, 10 Feb 2016 07:39:41 -0800 (PST) Received: from x1 (host81-129-170-149.range81-129.btcentralplus.com. [81.129.170.149]) by smtp.gmail.com with ESMTPSA id x186sm22783330wmg.19.2016.02.10.07.39.41 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 10 Feb 2016 07:39:41 -0800 (PST) Date: Wed, 10 Feb 2016 15:39:38 +0000 From: Lee Jones To: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Cc: ldewangan@nvidia.com, Linus Walleij Subject: [PATCH v2] mfd: ab8500: Provide a small example using new MFD cell MACROs Message-ID: <20160210153938.GC26950@x1> References: <1455028027-1527-1-git-send-email-lee.jones@linaro.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <1455028027-1527-1-git-send-email-lee.jones@linaro.org> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org mfd: ab8500: Provide a small example using new MFD cell MACROs Signed-off-by: Lee Jones --- drivers/mfd/ab8500-core.c | 106 +++++++++++++++------------------------------- 1 file changed, 34 insertions(+), 72 deletions(-) Acked-by: Linus Walleij diff --git a/drivers/mfd/ab8500-core.c b/drivers/mfd/ab8500-core.c index f3d6891..c03a86e 100644 --- a/drivers/mfd/ab8500-core.c +++ b/drivers/mfd/ab8500-core.c @@ -634,79 +634,41 @@ static const struct mfd_cell ab8500_bm_devs[] = { 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, "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 = "abx500-clk", - .of_compatible = "stericsson,abx500-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, "stericsson,ab8500-sysctrl"), + OF_MFD_CELL("ab8500-ext-regulator", + NULL, NULL, 0, "stericsson,ab8500-ext-regulator"), + OF_MFD_CELL("ab8500-regulator", + NULL, NULL, 0, "stericsson,ab8500-regulator"), + OF_MFD_CELL("abx500-clk", + NULL, NULL, 0, "stericsson,abx500-clk"), + OF_MFD_CELL("ab8500-gpadc", + NULL, NULL, 0, "stericsson,ab8500-gpadc"), + OF_MFD_CELL("ab8500-rtc", + NULL, NULL, 0, "stericsson,ab8500-rtc"), + OF_MFD_CELL("ab8500-acc-det", + NULL, NULL, 0, "stericsson,ab8500-acc-det"), + OF_MFD_CELL("ab8500-poweron-key", + NULL, NULL, 0, "stericsson,ab8500-poweron-key"), + OF_MFD_CELL("ab8500-pwm", + NULL, NULL, 1, "stericsson,ab8500-pwm"), + OF_MFD_CELL("ab8500-pwm", + NULL, NULL, 2, "stericsson,ab8500-pwm"), + OF_MFD_CELL("ab8500-pwm", + NULL, NULL, 3, "stericsson,ab8500-pwm"), + OF_MFD_CELL("ab8500-denc", + NULL, NULL, 0, "stericsson,ab8500-denc"), + OF_MFD_CELL("pinctrl-ab8500", + NULL, NULL, 0, "stericsson,ab8500-gpio"), + OF_MFD_CELL("abx500-temp", + NULL, NULL, 0, "stericsson,abx500-temp"), + OF_MFD_CELL("ab8500-usb", + NULL, NULL, 0, "stericsson,ab8500-usb"), + OF_MFD_CELL("ab8500-codec", + NULL, NULL, 0, "stericsson,ab8500-codec"), }; static const struct mfd_cell ab9540_devs[] = {