aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/bus.c
diff options
context:
space:
mode:
authorMark Brown <broonie@linaro.org>2014-01-26 19:32:14 -0500
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2014-01-28 16:37:22 -0500
commit49a12877d2777cadcb838981c3c4f5a424aef310 (patch)
treef8b16b3abed3e423de70506a401d75074b17344c /drivers/acpi/bus.c
parent73f7d1ca32638028e3271f54616773727e2f9f26 (diff)
ACPI / init: Flag use of ACPI and ACPI idioms for power supplies to regulator API
There is currently no facility in ACPI to express the hookup of voltage regulators, the expectation is that the regulators that exist in the system will be handled transparently by firmware if they need software control at all. This means that if for some reason the regulator API is enabled on such a system it should assume that any supplies that devices need are provided by the system at all relevant times without any software intervention. Tell the regulator core to make this assumption by calling regulator_has_full_constraints(). Do this as soon as we know we are using ACPI so that the information is available to the regulator core as early as possible. This will cause the regulator core to pretend that there is an always on regulator supplying any supply that is requested but that has not otherwise been mapped which is the behaviour expected on a system with ACPI. Should the ability to specify regulators be added in future revisions of ACPI then once we have support for ACPI mappings in the kernel the same assumptions will apply. It is also likely that systems will default to a mode of operation which does not require any interpretation of these mappings in order to be compatible with existing operating system releases so it should remain safe to make these assumptions even if the mappings exist but are not supported by the kernel. Signed-off-by: Mark Brown <broonie@linaro.org> Cc: All applicable <stable@vger.kernel.org> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/acpi/bus.c')
-rw-r--r--drivers/acpi/bus.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/acpi/bus.c b/drivers/acpi/bus.c
index 0710004055c8..296bec89f4a1 100644
--- a/drivers/acpi/bus.c
+++ b/drivers/acpi/bus.c
@@ -33,6 +33,7 @@
33#include <linux/proc_fs.h> 33#include <linux/proc_fs.h>
34#include <linux/acpi.h> 34#include <linux/acpi.h>
35#include <linux/slab.h> 35#include <linux/slab.h>
36#include <linux/regulator/machine.h>
36#ifdef CONFIG_X86 37#ifdef CONFIG_X86
37#include <asm/mpspec.h> 38#include <asm/mpspec.h>
38#endif 39#endif
@@ -576,6 +577,14 @@ void __init acpi_early_init(void)
576 goto error0; 577 goto error0;
577 } 578 }
578 579
580 /*
581 * If the system is using ACPI then we can be reasonably
582 * confident that any regulators are managed by the firmware
583 * so tell the regulator core it has everything it needs to
584 * know.
585 */
586 regulator_has_full_constraints();
587
579 return; 588 return;
580 589
581 error0: 590 error0: