[PATCH v5 1/4] regulator: helper routine to extract regulator_init_data
From: Thomas Abraham <hidden>
Date: 2011-12-05 09:10:54
Also in:
linux-devicetree, linux-omap, lkml
Hi Mark, On 4 December 2011 21:24, Mark Brown [off-list ref] wrote:
On Sun, Dec 04, 2011 at 06:51:23PM +0530, Thomas Abraham wrote:quoted
For regulators that are not turned on by bootloader, and which require 'apply_uV' constraint, is there any alternative for turning on the regulator when using dt?If the regulator isn't software managed then always_on covers this - the regulator core will enable any always_on regulators that haven't been enabled already.
Thanks for the hint. I was trying to deal with a regulator that was not software managed but also required the voltage level to be set to certain level. That was possible with 'apply_uV' constraint in non-dt case. Anyway, I have modified the code to manage the regulator and this works fine in dt case as well without the 'apply_uV' constraint.
quoted
? ? ? /* do we need to apply the constraint voltage */ - ? ? if (rdev->constraints->apply_uV && - ? ? ? ? rdev->constraints->min_uV == rdev->constraints->max_uV) { + ? ? if ((rdev->constraints->apply_uV && + ? ? ? ? rdev->constraints->min_uV == rdev->constraints->max_uV) || + ? ? ? ? ? ? (!rdev->constraints->boot_on && rdev->constraints->always_on)) { ? ? ? ? ? ? ? ret = _regulator_do_set_voltage(rdev, ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? rdev->constraints->min_uV, ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? rdev->constraints->max_uV);I'm not sure I understand the intended logic there. ?Voltage constraints and enable/disable constraints are orthogonal here.
Ok. I guess the above change is incorrect then. Thanks, Thomas.