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 menelaus: %u\n", ret);
36 static int n800_auto_voltage_scale(void)
40 ret = menelaus_set_vcore_hw(1400, 1050);
42 printk(KERN_ERR "Could not set VCORE voltage on menelaus: %u\n", ret);
48 static int n800_menelaus_init(struct device *dev)
52 ret = n800_auto_voltage_scale();
55 ret = n800_auto_sleep_regulators();
61 static struct menelaus_platform_data n800_menelaus_platform_data = {
62 .late_init = n800_menelaus_init,
65 void __init n800_pm_init(void)
67 menelaus_set_platform_data(&n800_menelaus_platform_data);
72 void __init n800_pm_init(void)