blob: b54e167aa719ee8f84c121ae43e95feb68666bab [file] [log] [blame]
Duy Truonge833aca2013-02-12 13:35:08 -08001/* Copyright (c) 2012, The Linux Foundation. All rights reserved.
Mahesh Sivasubramaniana8ff9922012-03-27 17:50:42 -06002 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License version 2 and
5 * only version 2 as published by the Free Software Foundation.
6 *
7 * This program is distributed in the hope that it will be useful,
8 * but WITHOUT ANY WARRANTY; without even the implied warranty of
9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 * GNU General Public License for more details.
11 *
12 */
13#ifndef __ARCH_ARM_MACH_MSM_RPM_NOTIF_H
14#define __ARCH_ARM_MACH_MSM_RPM_NOTIF_H
15
16struct msm_rpm_notifier_data {
17 uint32_t rsc_type;
18 uint32_t rsc_id;
19 uint32_t key;
20 uint32_t size;
21 uint8_t *value;
22};
Mahesh Sivasubramanian11dad772012-07-13 14:00:01 -060023/**
24 * msm_rpm_register_notifier - Register for sleep set notifications
25 *
26 * @nb - notifier block to register
27 *
28 * return 0 on success, errno on failure.
29 */
Mahesh Sivasubramaniana8ff9922012-03-27 17:50:42 -060030int msm_rpm_register_notifier(struct notifier_block *nb);
Mahesh Sivasubramanian11dad772012-07-13 14:00:01 -060031
32/**
33 * msm_rpm_unregister_notifier - Unregister previously registered notifications
34 *
35 * @nb - notifier block to unregister
36 *
37 * return 0 on success, errno on failure.
38 */
Mahesh Sivasubramaniana8ff9922012-03-27 17:50:42 -060039int msm_rpm_unregister_notifier(struct notifier_block *nb);
40
Mahesh Sivasubramanian11dad772012-07-13 14:00:01 -060041/**
42 * msm_rpm_enter_sleep - Notify RPM driver to prepare for entering sleep
43 */
44int msm_rpm_enter_sleep(void);
45
46/**
47 * msm_rpm_exit_sleep - Notify RPM driver about resuming from power collapse
48 */
49void msm_rpm_exit_sleep(void);
Mahesh Sivasubramaniana8ff9922012-03-27 17:50:42 -060050#endif /*__ARCH_ARM_MACH_MSM_RPM_NOTIF_H */