Skip to contentSkip to conversation

mfd/da903x: initialize PMIC core early

PATCH In review Mike Rapoport 3 participants 5 messages Jun 15, 2009

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mfd/da903x: initialize PMIC core early

Samuel,
It'd be great if this can go to 2.6.31

---
 drivers/mfd/da903x.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/mfd/da903x.c +1 -1
index 7283d88..e5ffe56 100644
@@ -561,7 +561,7 @@ static int __init da903x_init(void)
 {
 	return i2c_add_driver(&da903x_driver);
 }
-module_init(da903x_init);
+subsys_initcall(da903x_init);
 
 static void __exit da903x_exit(void)
 {
Signature · 6 lines
1.6.0.6


-- 
Sincerely yours,
Mike.
#1 lore raw

Hi Mike,

Quoted 2 lines · Mike Rapoport

Samuel,
It'd be great if this can go to 2.6.31

Sure. Care to explain why this needs to be called earlier ?

Cheers,
Samuel.

Quoted 26 lines
---
 drivers/mfd/da903x.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/mfd/da903x.c +1 -1
index 7283d88..e5ffe56 100644
@@ -561,7 +561,7 @@ static int __init da903x_init(void)
 {
 	return i2c_add_driver(&da903x_driver);
 }
-module_init(da903x_init);
+subsys_initcall(da903x_init);
 
 static void __exit da903x_exit(void)
 {
Signature · 6 lines
1.6.0.6


-- 
Sincerely yours,
Mike.
Signature · 2 lines
Intel Open Source Technology Centre
http://oss.intel.com/
#2 lore raw
Quoted 6 lines · Samuel Ortiz

Hi Mike,

Quoted 2 lines · Mike Rapoport

Samuel,
It'd be great if this can go to 2.6.31

Sure. Care to explain why this needs to be called earlier ?

We want to have da903x regulators available early during boot, and since they are subdevices of mfd/da903x they cannot be enabled until the da903x core is initialized.
I just saw Liam Girdwood pull request with "regulator: Move regulator drivers to subsys_initcall()" commit and jumped in :)

Quoted 30 lines

Cheers,
Samuel.

Quoted 26 lines
---
 drivers/mfd/da903x.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/mfd/da903x.c +1 -1
index 7283d88..e5ffe56 100644
@@ -561,7 +561,7 @@ static int __init da903x_init(void)
 {
 	return i2c_add_driver(&da903x_driver);
 }
-module_init(da903x_init);
+subsys_initcall(da903x_init);
 
 static void __exit da903x_exit(void)
 {
Signature · 6 lines
1.6.0.6


-- 
Sincerely yours,
Mike.
Signature · 2 lines
Sincerely yours,
Mike.
#3 lore raw
Quoted 9 lines · Mike Rapoport
Quoted 1 line · Samuel Ortiz

Sure. Care to explain why this needs to be called earlier ?

We want to have da903x regulators available early during boot, and since they are subdevices of mfd/da903x they cannot be enabled until the da903x core is initialized.
I just saw Liam Girdwood pull request with "regulator: Move regulator drivers to subsys_initcall()" commit and jumped in :)

Any MFD core with regulators on it ought to be pulled forward to subsys_initcall(). Doing this makes it easier to get a sensible ordering during boot without having a song and dance in consumer drivers waiting for the regulators that supply them to instantiate.

#4 lore raw
Quoted 11 lines · Mark Brown
Quoted 9 lines · Mike Rapoport
Quoted 1 line · Samuel Ortiz

Sure. Care to explain why this needs to be called earlier ?

We want to have da903x regulators available early during boot, and since they are subdevices of mfd/da903x they cannot be enabled until the da903x core is initialized.
I just saw Liam Girdwood pull request with "regulator: Move regulator drivers to subsys_initcall()" commit and jumped in :)

Quoted 4 lines

Any MFD core with regulators on it ought to be pulled forward to subsys_initcall(). Doing this makes it easier to get a sensible ordering during boot without having a song and dance in consumer drivers waiting for the regulators that supply them to instantiate.

Yep, I'm preparing a patch for that.

Cheers,
Samuel.

Signature · 2 lines
Intel Open Source Technology Centre
http://oss.intel.com/