> From: Axel Lin [mailto:axel.lin@xxxxxxxxxx] > Sent: Thursday, January 03, 2013 11:01 AM > To: Bryan Wu > Cc: Kim, Milo; Shreshtha Kumar SAHU; Richard Purdie; linux- > leds@xxxxxxxxxxxxxxx > Subject: Re: [PATCH] leds: lm3530: Ensure drvdata->enable has correct > status if regulator_disable fails > > This driver uses regulator_get() rather than regulator_get_exclusive(). > So I think we need the drvdata->enable to determinate if this driver > needs to call regulator_enable/disable, which will add reference count > if the regulator is already enabled by other driver. > > Calls to regulator_enable() must be balanced with calls to > regulator_disable(). > Having a drvdata->enable flag in this driver also ensures we have > balance calls > for regulator_enable/regulator_disable. I think no need to consider the use_count in regulator-consumer side, but I'll update if after testing in the real board. Thanks! Best Regards, Milo -- To unsubscribe from this list: send the line "unsubscribe linux-leds" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html