On Mon, Sep 03, 2012 at 07:55:39PM +0530, Laxman Dewangan wrote:Here we are trying to call the supply disable if child refcount become 0.
+ /* If supply enabled during registrtaion then need to disableI don't understand why we need this flag. Shouldn't we just be making
+ * when full constraint enabled.
+ */
+ unsigned int need_supply_disable:1;
the reference counts for the supplies correct and then have the
regulator disabled in the late initcall as a result of its refcount
falling to zero when the children are disabled?
I think what we need toMy second patch was similar but Rabin has some issue to handle the case when is_regulator_enable() is not implementd by regulator device driver.
do here is always take a reference to the supply if the child is enabled
during boot, then in the initcall we can just disable the parent
regulator as normal.