blob: 86f04bf2a07879e03b7ae50516b56baac21e90bb [file] [log] [blame]
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001/* Copyright (c) 2009-2010, Code Aurora Forum. All rights reserved.
2 *
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
14#ifndef __ASM_ARCH_MSM_RPC_PMAPP_H
15#define __ASM_ARCH_MSM_RPC_PMAPP_H
16
17#include <mach/msm_rpcrouter.h>
18
19/* Clock voting ids */
20enum {
21 PMAPP_CLOCK_ID_DO = 0,
22 PMAPP_CLOCK_ID_D1,
23 PMAPP_CLOCK_ID_A0,
24 PMAPP_CLOCK_ID_A1,
25};
26
27/* Clock voting types */
28enum {
29 PMAPP_CLOCK_VOTE_OFF = 0,
30 PMAPP_CLOCK_VOTE_ON,
31 PMAPP_CLOCK_VOTE_PIN_CTRL,
32};
33
34/* vreg ids */
35enum {
36 PMAPP_VREG_LDO22 = 14,
37 PMAPP_VREG_S3 = 21,
38 PMAPP_VREG_S2 = 23,
39 PMAPP_VREG_S4 = 24,
40};
41
42/* SMPS clock voting types */
43enum {
44 PMAPP_SMPS_CLK_VOTE_DONTCARE = 0,
45 PMAPP_SMPS_CLK_VOTE_2P74, /* 2.74 MHz */
46 PMAPP_SMPS_CLK_VOTE_1P6, /* 1.6 MHz */
47};
48
49/* SMPS mode voting types */
50enum {
51 PMAPP_SMPS_MODE_VOTE_DONTCARE = 0,
52 PMAPP_SMPS_MODE_VOTE_PWM,
53 PMAPP_SMPS_MODE_VOTE_PFM,
54 PMAPP_SMPS_MODE_VOTE_AUTO
55};
56
57int msm_pm_app_rpc_init(void(*callback)(int online));
58void msm_pm_app_rpc_deinit(void(*callback)(int online));
59int msm_pm_app_register_vbus_sn(void (*callback)(int online));
60void msm_pm_app_unregister_vbus_sn(void (*callback)(int online));
61int msm_pm_app_enable_usb_ldo(int);
62int pmic_vote_3p3_pwr_sel_switch(int boost);
63
64int pmapp_display_clock_config(uint enable);
65
66int pmapp_clock_vote(const char *voter_id, uint clock_id, uint vote);
67int pmapp_smps_clock_vote(const char *voter_id, uint vreg_id, uint vote);
68int pmapp_vreg_level_vote(const char *voter_id, uint vreg_id, uint level);
69int pmapp_smps_mode_vote(const char *voter_id, uint vreg_id, uint mode);
70int pmapp_vreg_pincntrl_vote(const char *voter_id, uint vreg_id,
71 uint clock_id, uint vote);
72int pmapp_disp_backlight_set_brightness(int value);
73void pmapp_disp_backlight_init(void);
Trilok Sonif4f0f062011-08-29 00:49:41 +053074int pmapp_vreg_lpm_pincntrl_vote(const char *voter_id, uint vreg_id,
75 uint clock_id, uint vote);
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070076#endif