[PATCHv3 09/11] omap4: twl: added pmic startup / shutdown times

Tero Kristo
2011-10-05T17:17:39Z

Signed-off-by: Tero Kristo <t-kristo@ti.com>
---
arch/arm/mach-omap2/omap_twl.c | 17 +++++++++++++++++
1 files changed, 17 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-omap2/omap_twl.c b/arch/arm/mach-omap2/omap_twl.c
index 62ed050..c095cf2 100644
--- a/arch/arm/mach-omap2/omap_twl.c
+++ b/arch/arm/mach-omap2/omap_twl.c
@@ -55,6 +55,13 @@ static bool __initdata twl_sr_enable_autoinit;
#define REG_SMPS_OFFSET 0xE0
#define SMARTREFLEX_ENABLE BIT(3)

+struct twl_lp_description {
+ u32 osc_shut_time;
+ u32 osc_start_time;
+ u32 pmic_shut_time;
+ u32 pmic_start_time;
+};
+
static unsigned long twl4030_vsel_to_uv(const u8 vsel)
{
return (((vsel * 125) + 6000)) * 100;
@@ -220,9 +227,15 @@ static struct omap_voltdm_pmic omap4_core_pmic = {
.uv_to_vsel = twl6030_uv_to_vsel,
};

+static struct twl_lp_description omap4_pmic_lp_desc = {
+ .pmic_shut_time = 500,
+ .pmic_start_time = 500,
+};
+
int __init omap4_twl_init(void)
{
struct voltagedomain *voltdm;
+ struct twl_lp_description *desc;

if (!cpu_is_omap44xx())
return -ENODEV;
@@ -236,6 +249,10 @@ int __init omap4_twl_init(void)
voltdm = voltdm_lookup("core");
omap_voltage_register_pmic(voltdm, &omap4_core_pmic);

+ desc = &omap4_pmic_lp_desc;
+
+ omap_pm_set_pmic_lp_time(desc->pmic_start_time, desc->pmic_shut_time);
+
return 0;
}

--
1.7.4.1