board: 8930: Configure LDO L17 as always_on for 8930 SGLTE
LDO L17 is the power source for a set of MSM gpios on
8930 SGLTE. For these GPIOs to be operational L17 should
be turned on by default. Hence, set the always_on,
system_uA and peak_uA properties to the required values.
Change-Id: Id8dc79778091864a61a1c3fb90af328eb26e4d22
Signed-off-by: Anirudh Ghayal <aghayal@codeaurora.org>
diff --git a/arch/arm/mach-msm/board-8930-regulator-pm8038.c b/arch/arm/mach-msm/board-8930-regulator-pm8038.c
index 0ecb030..3e7719b 100644
--- a/arch/arm/mach-msm/board-8930-regulator-pm8038.c
+++ b/arch/arm/mach-msm/board-8930-regulator-pm8038.c
@@ -615,3 +615,19 @@
.consumer_map = msm_rpm_regulator_consumer_mapping,
.consumer_map_len = ARRAY_SIZE(msm_rpm_regulator_consumer_mapping),
};
+
+void __init configure_8930_sglte_regulator(void)
+{
+ int i;
+ struct rpm_regulator_init_data *rpm_data;
+
+ for (i = 0; i < ARRAY_SIZE(msm8930_rpm_regulator_init_data); i++) {
+ rpm_data = &msm8930_rpm_regulator_init_data[i];
+ if (rpm_data->id == RPM_VREG_ID_PM8038_L17) {
+ rpm_data->init_data.constraints.always_on = 1;
+ rpm_data->system_uA = 10000;
+ rpm_data->peak_uA = 10000;
+ break;
+ }
+ }
+}
diff --git a/arch/arm/mach-msm/board-8930.c b/arch/arm/mach-msm/board-8930.c
index 2184f82..5e26455 100644
--- a/arch/arm/mach-msm/board-8930.c
+++ b/arch/arm/mach-msm/board-8930.c
@@ -2946,6 +2946,9 @@
BUG_ON(msm_rpmrs_levels_init(&msm_rpmrs_data_pm8917));
}
+ if (machine_is_msm8930_evt())
+ configure_8930_sglte_regulator();
+
regulator_suppress_info_printing();
if (msm_xo_init())
pr_err("Failed to initialize XO votes\n");
diff --git a/arch/arm/mach-msm/board-8930.h b/arch/arm/mach-msm/board-8930.h
index cb9398c..31e5ad9 100644
--- a/arch/arm/mach-msm/board-8930.h
+++ b/arch/arm/mach-msm/board-8930.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2011-2012, The Linux Foundation. All rights reserved.
+/* Copyright (c) 2011-2013, The Linux Foundation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and
@@ -150,6 +150,7 @@
void msm8930_pm8917_gpio_mpp_init(void);
void msm8930_mdp_writeback(struct memtype_reserve *reserve_table);
void __init msm8930_init_gpu(void);
+void __init configure_8930_sglte_regulator(void);
#define PLATFORM_IS_CHARM25() \
(machine_is_msm8930_cdp() && \