blob: b9815a57d6e676f809b6cfdaf208caa841dcec5e [file] [log] [blame]
Mahesh Sivasubramanian9063a292012-11-09 09:15:30 -07001/* 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 Sivasubramanian9063a292012-11-09 09:15:30 -070050
51/**
52 * msm_rpm_waiting_for_ack - Indicate if there is RPM message
53 * pending acknowledgement.
54 * returns true for pending messages and false otherwise
55 */
56bool msm_rpm_waiting_for_ack(void);
57
Mahesh Sivasubramaniana8ff9922012-03-27 17:50:42 -060058#endif /*__ARCH_ARM_MACH_MSM_RPM_NOTIF_H */