> From: linux-pm-owner@xxxxxxxxxxxxxxx [mailto:linux-pm-owner@xxxxxxxxxxxxxxx] > On Behalf Of Mark Brown > Sent: Thursday, January 05, 2012 11:29 AM > > The fixed regulator is used to enable/disable rails which are > > mainly controlled by the switch. The switches are toggled by > > gpio apis. > > The switches are connected through on-chip gpios or through > > external devices' gpios like mfd, i2c based gpio expander etc. > > The registration of the fixed regulator get success only if the > > required gpios are already available in the system at this time. > > The on-chip gpios are available till this time as on-chip gpios > > are initialized in arch_init(). But external peripheral's gpios > > may not be available at this time as they get initialized as part > > of subsys_initcall() and due to this registration of the fixed > > regulator may fails. > > Moving the driver to subsys_initcall_sync() will make sure that > > all gpios i.e. on-chip gpios as well as external peripheral's gpios > > are available before fixed regulator registration. > > I don't really think this is worth faffing about with, it seems at least > as likely to create more problems with things that depend on the > regulator as it is to make the regulator work. Really we need Grant's > probe retry stuff or something else to solve the init ordering issues > properly. Yes, I agree, the init ordering need to be done properly but this is how we have as of now to make ordering. I have the switchA which is connected on regulatorA (from PMIC) and the switchB which is in the gpio of the pmic. The fixed regulator registration for switchA and switchB are failing because it did not found the valid supply/gpio. The one way to resolve the call probe of the fixed regulator only when pmic initialization is done and it is in subsys_init(). The other way is to do the platform device registration of the fixed regulator is in subsys_initcall_sync() in place of arch_init, although driver is in subsys_initcall() to postponed the probe calling. What do you suggest on this case? -- To unsubscribe from this list: send the line "unsubscribe linux-tegra" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html