4 * Copyright (C) 2006 Nokia Corporation
5 * Author: Amit Kucheria <amit.kucheria@nokia.com>
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as
9 * published by the Free Software Foundation.
12 #include <linux/kernel.h>
13 #include <linux/module.h>
14 #include <asm/arch/menelaus.h>
16 #ifdef CONFIG_MENELAUS
18 static int n800_auto_sleep_regulators(void)
23 val = EN_VPLL_SLEEP | EN_VMMC_SLEEP \
24 | EN_VAUX_SLEEP | EN_VIO_SLEEP \
25 | EN_VMEM_SLEEP | EN_DC3_SLEEP \
26 | EN_VC_SLEEP | EN_DC2_SLEEP;
28 ret = menelaus_set_regulator_sleep(1, val);
30 printk(KERN_ERR "Could not set regulators to sleep on "
31 "menelaus: %u\n", ret);
37 static int n800_auto_voltage_scale(void)
41 ret = menelaus_set_vcore_hw(1400, 1050);
43 printk(KERN_ERR "Could not set VCORE voltage on "
44 "menelaus: %u\n", ret);
50 static int n800_menelaus_init(struct device *dev)
54 ret = n800_auto_voltage_scale();
57 ret = n800_auto_sleep_regulators();
63 static struct menelaus_platform_data n800_menelaus_platform_data = {
64 .late_init = n800_menelaus_init,
67 void __init n800_pm_init(void)
69 menelaus_set_platform_data(&n800_menelaus_platform_data);
74 void __init n800_pm_init(void)