On Tue, 17 Jul 2012, Bedia, Vaibhav wrote: > I am looking at adding PM support for AM335x based on l-o/master. > arch/arm/mach-omap2/pm.c has the following comment: > > /* > * In the case of DT, the PMIC and SR initialization will be done using > * a completely different mechanism. > * Disable this part if a DT blob is available. > */ > if (of_have_populated_dt()) > return 0; > > Basic DT support for AM335x is already in mainline so this check causes > various PM related inits and also the registration of the suspend ops to be > skipped. > > I tried searching the list archives for any discussion on this but could not > find anything. Can someone shed some light on the how the device tree is to > be used for PMIC and SR initialization. > > Any objections to moving the suspend ops registration before the DT blob check? Moving the registration makes sense to me, based on a quick look. IMHO, a better approach for this code would be to reverse the sense of that of_have_populated_dt() test, and specifically wrap the parts that are going to be changed by DT. The rationale here is that only certain steps need to be skipped, so those should probably be skipped explicitly rather than skipping the whole function. - Paul -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html