All of lore.kernel.org
 help / color / mirror / Atom feed
From: lee.jones@linaro.org (Lee Jones)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 05/15] mfd: db8500-prcmu: Register devices using the newly DT:ed MFD API
Date: Wed, 20 Jun 2012 13:56:41 +0100	[thread overview]
Message-ID: <1340197011-5435-6-git-send-email-lee.jones@linaro.org> (raw)
In-Reply-To: <1340197011-5435-1-git-send-email-lee.jones@linaro.org>

Now the MFD API is Device Tree aware we can use it for platform
registration again, even when booting with DT enabled. To aid in
Device Node pointer allocation we provide each cell with the
associative compatible string.

Cc: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/mfd/db8500-prcmu.c       |   14 +++++++-------
 drivers/regulator/db8500-prcmu.c |    6 ------
 2 files changed, 7 insertions(+), 13 deletions(-)

diff --git a/drivers/mfd/db8500-prcmu.c b/drivers/mfd/db8500-prcmu.c
index 1aa0bb7..e9e576c 100644
--- a/drivers/mfd/db8500-prcmu.c
+++ b/drivers/mfd/db8500-prcmu.c
@@ -2948,11 +2948,13 @@ static struct regulator_init_data db8500_regulators[DB8500_NUM_REGULATORS] = {
 static 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-u8500",
+		.of_compatible = "stericsson,cpufreq-u8500",
 	},
 };
 
@@ -2990,13 +2992,11 @@ static int __devinit db8500_prcmu_probe(struct platform_device *pdev)
 	if (cpu_is_u8500v20_or_later())
 		prcmu_config_esram0_deep_sleep(ESRAM0_DEEP_SLEEP_STATE_RET);
 
-	if (!np) {
-		err = mfd_add_devices(&pdev->dev, 0, db8500_prcmu_devs,
-				ARRAY_SIZE(db8500_prcmu_devs), NULL, 0);
-		if (err) {
-			pr_err("prcmu: Failed to add subdevices\n");
-			return err;
-		}
+	err = mfd_add_devices(&pdev->dev, 0, db8500_prcmu_devs,
+			ARRAY_SIZE(db8500_prcmu_devs), NULL, 0);
+	if (err) {
+		pr_err("prcmu: Failed to add subdevices\n");
+		return err;
 	}
 
 	pr_info("DB8500 PRCMU initialized\n");
diff --git a/drivers/regulator/db8500-prcmu.c b/drivers/regulator/db8500-prcmu.c
index 9dbb491..359f8d1 100644
--- a/drivers/regulator/db8500-prcmu.c
+++ b/drivers/regulator/db8500-prcmu.c
@@ -547,16 +547,10 @@ static int __exit db8500_regulator_remove(struct platform_device *pdev)
 	return 0;
 }
 
-static const struct of_device_id db8500_prcmu_regulator_match[] = {
-        { .compatible = "stericsson,db8500-prcmu-regulator", },
-        {}
-};
-
 static struct platform_driver db8500_regulator_driver = {
 	.driver = {
 		.name = "db8500-prcmu-regulators",
 		.owner = THIS_MODULE,
-		.of_match_table = db8500_prcmu_regulator_match,
 	},
 	.probe = db8500_regulator_probe,
 	.remove = __exit_p(db8500_regulator_remove),
-- 
1.7.9.5

  parent reply	other threads:[~2012-06-20 12:56 UTC|newest]

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-20 12:56 [PATCH 00/15] Device Tree related re-works and clean-ups Lee Jones
2012-06-20 12:56 ` [PATCH 01/15] mfd: Add IRQ domain support for the AB8500 Lee Jones
2012-06-29 14:51   ` Samuel Ortiz
2012-06-20 12:56 ` [PATCH 02/15] mfd: Generically describe interactions with the DB8500 PRCMU Lee Jones
2012-06-29 14:53   ` Samuel Ortiz
2012-06-20 12:56 ` [PATCH 03/15] mfd: Make MFD core code Device Tree and IRQ domain aware Lee Jones
2012-06-29 14:55   ` Samuel Ortiz
2012-06-29 14:52     ` Lee Jones
2012-06-29 18:49       ` Samuel Ortiz
2012-07-02  9:57         ` Lee Jones
2012-07-02 15:01           ` Samuel Ortiz
2012-06-20 12:56 ` [PATCH 04/15] mfd: ab8500: Register devices using the newly DT:ed MFD API Lee Jones
2012-06-29 15:09   ` Samuel Ortiz
2012-06-29 16:04     ` Lee Jones
2012-06-29 18:50       ` Samuel Ortiz
2012-07-02 10:03         ` Lee Jones
2012-07-02 15:14           ` Samuel Ortiz
2012-07-04 15:29             ` Lee Jones
2012-06-20 12:56 ` Lee Jones [this message]
2012-06-29 15:11   ` [PATCH 05/15] mfd: db8500-prcmu: " Samuel Ortiz
2012-06-20 12:56 ` [PATCH 06/15] mfd: Register the ab8500 from db8500-prcmu using the " Lee Jones
2012-06-29 15:15   ` Samuel Ortiz
     [not found] ` <1340197011-5435-1-git-send-email-lee.jones-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2012-06-20 12:56   ` [PATCH 07/15] i2c: Add Device Tree support to the Nomadik I2C driver Lee Jones
2012-06-20 12:56     ` Lee Jones
     [not found]     ` <1340197011-5435-8-git-send-email-lee.jones-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2012-06-20 19:30       ` Linus Walleij
2012-06-20 19:30         ` Linus Walleij
     [not found]         ` <CACRpkdbi7vmJE9LPmiu2NGM4b_SZ-Hi=a_xgrCOQX9ofKsLFew-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-06-21  6:47           ` Srinidhi Kasagar
2012-06-21  6:47             ` Srinidhi Kasagar
2012-06-20 12:56 ` [PATCH 08/15] regulator: Stop initialising AB8500's registers during bring-up Lee Jones
2012-06-20 13:08   ` Mark Brown
2012-06-20 13:19     ` Lee Jones
2012-06-20 13:26   ` Mark Brown
2012-06-20 12:56 ` [PATCH 09/15] pinctrl: pinctrl-nomadik: Fix possible memory leak Lee Jones
2012-06-20 12:56 ` [PATCH 10/15] pinctrl: pinctrl-nomadik: Append sleepmode property with vendor specific prefixes Lee Jones
2012-06-20 12:56 ` [PATCH 11/15] ARM: ux500: Remove AB8500 regulator register initialisation information Lee Jones
2012-06-20 12:56 ` [PATCH 12/15] ARM: ux500: Ensure vendor specific properties have the vendor's identifier Lee Jones
2012-06-20 12:56 ` [PATCH 13/15] ARM: ux500: Remove temporary snowball_of_platform_devs enablement structure Lee Jones
2012-06-20 12:56 ` [PATCH 14/15] ARM: ux500: Remove PMU platform registration when booting with DT Lee Jones
2012-06-20 12:56 ` [PATCH 15/15] ARM: perf: handle muxed CPU IRQ lines Lee Jones
2012-06-20 13:28   ` Will Deacon
2012-06-20 13:44     ` Lee Jones
2012-06-20 14:01       ` Will Deacon
2012-06-20 14:13         ` Lee Jones

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=1340197011-5435-6-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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.