aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mfd/db8500-prcmu.c
diff options
context:
space:
mode:
authorLee Jones <lee.jones@linaro.org>2012-06-20 08:56:41 -0400
committerSamuel Ortiz <sameo@linux.intel.com>2012-07-08 18:16:09 -0400
commit5d90322bc85894105bbf738abc148135a619e01a (patch)
tree2528dc25da2c4173cfac1c7b198b7cb18efff2dc /drivers/mfd/db8500-prcmu.c
parentba7cbc3e15df1eb34a3a986b52ac82db3a569ab9 (diff)
mfd: Register db8500-prcmu devices using the newly DT:ed MFD API
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. Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'drivers/mfd/db8500-prcmu.c')
-rw-r--r--drivers/mfd/db8500-prcmu.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/mfd/db8500-prcmu.c b/drivers/mfd/db8500-prcmu.c
index 9effb710d4e0..50b49d965f2b 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] = {
2948static struct mfd_cell db8500_prcmu_devs[] = { 2948static struct mfd_cell db8500_prcmu_devs[] = {
2949 { 2949 {
2950 .name = "db8500-prcmu-regulators", 2950 .name = "db8500-prcmu-regulators",
2951 .of_compatible = "stericsson,db8500-prcmu-regulator",
2951 .platform_data = &db8500_regulators, 2952 .platform_data = &db8500_regulators,
2952 .pdata_size = sizeof(db8500_regulators), 2953 .pdata_size = sizeof(db8500_regulators),
2953 }, 2954 },
2954 { 2955 {
2955 .name = "cpufreq-u8500", 2956 .name = "cpufreq-u8500",
2957 .of_compatible = "stericsson,cpufreq-u8500",
2956 }, 2958 },
2957}; 2959};
2958 2960
@@ -2990,13 +2992,11 @@ static int __devinit db8500_prcmu_probe(struct platform_device *pdev)
2990 if (cpu_is_u8500v20_or_later()) 2992 if (cpu_is_u8500v20_or_later())
2991 prcmu_config_esram0_deep_sleep(ESRAM0_DEEP_SLEEP_STATE_RET); 2993 prcmu_config_esram0_deep_sleep(ESRAM0_DEEP_SLEEP_STATE_RET);
2992 2994
2993 if (!np) { 2995 err = mfd_add_devices(&pdev->dev, 0, db8500_prcmu_devs,
2994 err = mfd_add_devices(&pdev->dev, 0, db8500_prcmu_devs, 2996 ARRAY_SIZE(db8500_prcmu_devs), NULL, 0);
2995 ARRAY_SIZE(db8500_prcmu_devs), NULL, 0); 2997 if (err) {
2996 if (err) { 2998 pr_err("prcmu: Failed to add subdevices\n");
2997 pr_err("prcmu: Failed to add subdevices\n"); 2999 return err;
2998 return err;
2999 }
3000 } 3000 }
3001 3001
3002 pr_info("DB8500 PRCMU initialized\n"); 3002 pr_info("DB8500 PRCMU initialized\n");