提交 5d90322b 编写于 作者: L Lee Jones 提交者: Samuel Ortiz

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: NLee Jones <lee.jones@linaro.org>
Signed-off-by: NSamuel Ortiz <sameo@linux.intel.com>
上级 ba7cbc3e
...@@ -2948,11 +2948,13 @@ static struct regulator_init_data db8500_regulators[DB8500_NUM_REGULATORS] = { ...@@ -2948,11 +2948,13 @@ static struct regulator_init_data db8500_regulators[DB8500_NUM_REGULATORS] = {
static struct mfd_cell db8500_prcmu_devs[] = { static struct mfd_cell db8500_prcmu_devs[] = {
{ {
.name = "db8500-prcmu-regulators", .name = "db8500-prcmu-regulators",
.of_compatible = "stericsson,db8500-prcmu-regulator",
.platform_data = &db8500_regulators, .platform_data = &db8500_regulators,
.pdata_size = sizeof(db8500_regulators), .pdata_size = sizeof(db8500_regulators),
}, },
{ {
.name = "cpufreq-u8500", .name = "cpufreq-u8500",
.of_compatible = "stericsson,cpufreq-u8500",
}, },
}; };
...@@ -2990,14 +2992,12 @@ static int __devinit db8500_prcmu_probe(struct platform_device *pdev) ...@@ -2990,14 +2992,12 @@ static int __devinit db8500_prcmu_probe(struct platform_device *pdev)
if (cpu_is_u8500v20_or_later()) if (cpu_is_u8500v20_or_later())
prcmu_config_esram0_deep_sleep(ESRAM0_DEEP_SLEEP_STATE_RET); prcmu_config_esram0_deep_sleep(ESRAM0_DEEP_SLEEP_STATE_RET);
if (!np) {
err = mfd_add_devices(&pdev->dev, 0, db8500_prcmu_devs, err = mfd_add_devices(&pdev->dev, 0, db8500_prcmu_devs,
ARRAY_SIZE(db8500_prcmu_devs), NULL, 0); ARRAY_SIZE(db8500_prcmu_devs), NULL, 0);
if (err) { if (err) {
pr_err("prcmu: Failed to add subdevices\n"); pr_err("prcmu: Failed to add subdevices\n");
return err; return err;
} }
}
pr_info("DB8500 PRCMU initialized\n"); pr_info("DB8500 PRCMU initialized\n");
......
...@@ -547,16 +547,10 @@ static int __exit db8500_regulator_remove(struct platform_device *pdev) ...@@ -547,16 +547,10 @@ static int __exit db8500_regulator_remove(struct platform_device *pdev)
return 0; return 0;
} }
static const struct of_device_id db8500_prcmu_regulator_match[] = {
{ .compatible = "stericsson,db8500-prcmu-regulator", },
{}
};
static struct platform_driver db8500_regulator_driver = { static struct platform_driver db8500_regulator_driver = {
.driver = { .driver = {
.name = "db8500-prcmu-regulators", .name = "db8500-prcmu-regulators",
.owner = THIS_MODULE, .owner = THIS_MODULE,
.of_match_table = db8500_prcmu_regulator_match,
}, },
.probe = db8500_regulator_probe, .probe = db8500_regulator_probe,
.remove = __exit_p(db8500_regulator_remove), .remove = __exit_p(db8500_regulator_remove),
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册