On Thu, Jul 17, 2014 at 8:29 AM, Rob Clark <robdclark at gmail.com> wrote: > On Thu, Jul 17, 2014 at 4:10 AM, divya ojha <odivya77 at gmail.com> wrote: [...] >> Don't we need to have a if(regulator_enabled) check after >> devm_regulator_get function ? >> I see a similar test after camera regulator_get function call. > > tbh, I'm not 100% sure. >
Regulators in the Qualcomm platform works by casting votes with the RPM and there is no way to query the current state of a regulator, so the regulator code will only return information regarding the Linux systems votes. So, we can unfortunately not check this. This setup also makes it important that if we want a regulator on and set to a certain voltage then we need to cast our vote with these values, or some other subsystem might lower it by releasing their votes. Regards, Bjorn