PageRenderTime 25ms CodeModel.GetById 17ms app.highlight 7ms RepoModel.GetById 1ms app.codeStats 0ms

/arch/arm/mach-fsm/include/mach/rpc_pmapp.h

https://bitbucket.org/sammyz/iscream_thunderc-2.6.35-rebase
C++ Header | 85 lines | 41 code | 11 blank | 33 comment | 0 complexity | 368d96f2eaf182a55d4fd0c65d19e088 MD5 | raw file
Possible License(s): GPL-2.0, LGPL-2.0, AGPL-1.0
 1/* Copyright (c) 2009, Code Aurora Forum. All rights reserved.
 2 *
 3 * Redistribution and use in source and binary forms, with or without
 4 * modification, are permitted provided that the following conditions are
 5 * met:
 6 *     * Redistributions of source code must retain the above copyright
 7 *       notice, this list of conditions and the following disclaimer.
 8 *     * Redistributions in binary form must reproduce the above
 9 *       copyright notice, this list of conditions and the following
10 *       disclaimer in the documentation and/or other materials provided
11 *       with the distribution.
12 *     * Neither the name of Code Aurora Forum, Inc. nor the names of its
13 *       contributors may be used to endorse or promote products derived
14 *       from this software without specific prior written permission.
15 *
16 * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
17 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
18 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
19 * ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
20 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
21 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
22 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
23 * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
24 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
25 * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
26 * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 *
28 */
29
30#ifndef __ASM_ARCH_MSM_RPC_PMAPP_H
31#define __ASM_ARCH_MSM_RPC_PMAPP_H
32
33#include <mach/msm_rpcrouter.h>
34
35/* Clock voting ids */
36enum {
37	PMAPP_CLOCK_ID_DO = 0,
38	PMAPP_CLOCK_ID_D1,
39	PMAPP_CLOCK_ID_A0,
40	PMAPP_CLOCK_ID_A1,
41};
42
43/* Clock voting types */
44enum {
45	PMAPP_CLOCK_VOTE_OFF = 0,
46	PMAPP_CLOCK_VOTE_ON,
47	PMAPP_CLOCK_VOTE_PIN_CTRL,
48};
49
50/* SMPS vreg ids */
51enum {
52	PMAPP_VREG_S3 = 21,
53	PMAPP_VREG_S2 = 23,
54	PMAPP_VREG_S4 = 24,
55};
56
57/* SMPS clock voting types */
58enum {
59	PMAPP_SMPS_CLK_VOTE_DONTCARE = 0,
60	PMAPP_SMPS_CLK_VOTE_2P74,	/* 2.74 MHz */
61	PMAPP_SMPS_CLK_VOTE_1P6,	/* 1.6 MHz */
62};
63
64/* SMPS mode voting types */
65enum {
66	PMAPP_SMPS_MODE_VOTE_DONTCARE = 0,
67	PMAPP_SMPS_MODE_VOTE_PWM,
68	PMAPP_SMPS_MODE_VOTE_PFM,
69	PMAPP_SMPS_MODE_VOTE_AUTO
70};
71
72int msm_pm_app_rpc_init(void);
73void msm_pm_app_rpc_deinit(void);
74int msm_pm_app_register_vbus_sn(void (*callback)(int online));
75void msm_pm_app_unregister_vbus_sn(void (*callback)(int online));
76int msm_pm_app_enable_usb_ldo(int);
77
78int pmapp_display_clock_config(uint enable);
79
80int pmapp_clock_vote(const char *voter_id, uint clock_id, uint vote);
81int pmapp_smps_clock_vote(const char *voter_id, uint vreg_id, uint vote);
82int pmapp_vreg_level_vote(const char *voter_id, uint vreg_id, uint level);
83int pmapp_smps_mode_vote(const char *voter_id, uint vreg_id, uint mode);
84
85#endif