diff mbox

[3/3] mfd: db8500-prcmu: Example using new OF_MFD_CELL/MFD_CELL_BASIC MACROs

Message ID 20160713112651.14539-4-lee.jones@linaro.org
State New
Headers show

Commit Message

Lee Jones July 13, 2016, 11:26 a.m. UTC
... with and without 'resources'.

Signed-off-by: Lee Jones <lee.jones@linaro.org>

---
 drivers/mfd/db8500-prcmu.c | 33 ++++++++++-----------------------
 1 file changed, 10 insertions(+), 23 deletions(-)

-- 
2.9.0

Comments

Linus Walleij Aug. 4, 2016, 7:47 a.m. UTC | #1
On Wed, Jul 13, 2016 at 1:26 PM, Lee Jones <lee.jones@linaro.org> wrote:

> ... with and without 'resources'.

>

> Signed-off-by: Lee Jones <lee.jones@linaro.org>


Acked-by: Linus Walleij <linus.walleij@linaro.org>


I'm not 100% sure what is going on but the result sure looks
neat and I'll be happy to test the result and complain if anything
breaks ;)

Yours,
Linus Walleij
Lee Jones Aug. 5, 2016, 7:40 a.m. UTC | #2
On Thu, 04 Aug 2016, Linus Walleij wrote:

> On Wed, Jul 13, 2016 at 1:26 PM, Lee Jones <lee.jones@linaro.org> wrote:

> 

> > ... with and without 'resources'.

> >

> > Signed-off-by: Lee Jones <lee.jones@linaro.org>

> 

> Acked-by: Linus Walleij <linus.walleij@linaro.org>

> 

> I'm not 100% sure what is going on but the result sure looks

> neat and I'll be happy to test the result and complain if anything

> breaks ;)


:)

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
diff mbox

Patch

diff --git a/drivers/mfd/db8500-prcmu.c b/drivers/mfd/db8500-prcmu.c
index c0a86ae..4c9c951 100644
--- a/drivers/mfd/db8500-prcmu.c
+++ b/drivers/mfd/db8500-prcmu.c
@@ -3061,29 +3061,16 @@  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 = "cpufreq-ux500",
-		.of_compatible = "stericsson,cpufreq-ux500",
-		.platform_data = &db8500_cpufreq_table,
-		.pdata_size = sizeof(db8500_cpufreq_table),
-	},
-	{
-		.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("cpufreq-ux500", NULL, &db8500_cpufreq_table,
+		    sizeof(db8500_cpufreq_table), 0,
+		    "stericsson,cpufreq-ux500"),
+	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 void db8500_prcmu_update_cpufreq(void)