linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: lee.jones@linaro.org (Lee Jones)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] mfd: Provide MACRO to declare commonly defined MFD cell attributes
Date: Tue,  9 Feb 2016 14:27:07 +0000	[thread overview]
Message-ID: <1455028027-1527-1-git-send-email-lee.jones@linaro.org> (raw)

Cc: Laxman Dewangan <ldewangan@nvidia.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 include/linux/mfd/core.h | 32 ++++++++++++++++++++++++++++++++
 1 file changed, 32 insertions(+)

diff --git a/include/linux/mfd/core.h b/include/linux/mfd/core.h
index 27dac3f..dacdc49 100644
--- a/include/linux/mfd/core.h
+++ b/include/linux/mfd/core.h
@@ -16,6 +16,38 @@
 
 #include <linux/platform_device.h>
 
+#define MFD_CELL_ALL(_name, _res, _pdata, _id, _compat, _match)		\
+	{								\
+		.name = (_name),					\
+		.num_resources = ARRAY_SIZE((_res)),			\
+		.resources = (_res),					\
+		.platform_data = (_pdata),				\
+		.pdata_size = ARRAY_SIZE((_pdata)),			\
+		.of_compatible = (_compat),				\
+		.acpi_match = (_match),					\
+		.id = _id,						\
+	}
+
+#define OF_MFD_CELL(_name, _res, _pdata, _id, _compat)			\
+	{								\
+		MFD_CELL_ALL(_name, _res, _pdata, _id, _compat, NULL)	\
+	}
+
+#define ACPI_MFD_CELL(_name, _res, _pdata, _id, _match)			\
+	{								\
+		MFD_CELL_ALL(_name, _res, _pdata, _id, NULL, _match)	\
+	}
+
+#define MFD_CELL_BASIC(_name, _res, _pdata, _id)			\
+	{								\
+		MFD_CELL_ALL(_name, _res, _pdata, _id, NULL, NULL)	\
+	}
+
+#define MFD_CELL_NAME(_name)						\
+	{								\
+		MFD_CELL_ALL(_name, NULL, NULL, 0, NULL, NULL)		\
+	}
+
 struct irq_domain;
 
 /* Matches ACPI PNP id, either _HID or _CID, or ACPI _ADR */
-- 
1.9.1

             reply	other threads:[~2016-02-09 14:27 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-09 14:27 Lee Jones [this message]
2016-02-09 15:20 ` [PATCH] mfd: Provide MACRO to declare commonly defined MFD cell attributes Laxman Dewangan
2016-02-10 12:38 ` Laxman Dewangan
2016-02-10 15:38 ` [PATCH v2] " Lee Jones
2016-02-10 17:50   ` Laxman Dewangan
2016-02-11  9:10     ` Lee Jones
2016-02-11  9:01       ` Laxman Dewangan
2016-02-11  9:46         ` Lee Jones
2016-02-26 10:43   ` Andy Shevchenko
2016-02-10 15:39 ` [PATCH v2] mfd: ab8500: Provide a small example using new MFD cell MACROs Lee Jones
2016-02-15  9:58   ` Linus Walleij

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1455028027-1527-1-git-send-email-lee.jones@linaro.org \
    --to=lee.jones@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).