Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 1 | /* 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 */ |
| 20 | enum { |
| 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 */ |
| 28 | enum { |
| 29 | PMAPP_CLOCK_VOTE_OFF = 0, |
| 30 | PMAPP_CLOCK_VOTE_ON, |
| 31 | PMAPP_CLOCK_VOTE_PIN_CTRL, |
| 32 | }; |
| 33 | |
| 34 | /* vreg ids */ |
| 35 | enum { |
| 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 */ |
| 43 | enum { |
| 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 */ |
| 50 | enum { |
| 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 | |
| 57 | int msm_pm_app_rpc_init(void(*callback)(int online)); |
| 58 | void msm_pm_app_rpc_deinit(void(*callback)(int online)); |
| 59 | int msm_pm_app_register_vbus_sn(void (*callback)(int online)); |
| 60 | void msm_pm_app_unregister_vbus_sn(void (*callback)(int online)); |
| 61 | int msm_pm_app_enable_usb_ldo(int); |
| 62 | int pmic_vote_3p3_pwr_sel_switch(int boost); |
| 63 | |
| 64 | int pmapp_display_clock_config(uint enable); |
| 65 | |
| 66 | int pmapp_clock_vote(const char *voter_id, uint clock_id, uint vote); |
| 67 | int pmapp_smps_clock_vote(const char *voter_id, uint vreg_id, uint vote); |
| 68 | int pmapp_vreg_level_vote(const char *voter_id, uint vreg_id, uint level); |
| 69 | int pmapp_smps_mode_vote(const char *voter_id, uint vreg_id, uint mode); |
| 70 | int pmapp_vreg_pincntrl_vote(const char *voter_id, uint vreg_id, |
| 71 | uint clock_id, uint vote); |
| 72 | int pmapp_disp_backlight_set_brightness(int value); |
| 73 | void pmapp_disp_backlight_init(void); |
Trilok Soni | f4f0f06 | 2011-08-29 00:49:41 +0530 | [diff] [blame] | 74 | int pmapp_vreg_lpm_pincntrl_vote(const char *voter_id, uint vreg_id, |
| 75 | uint clock_id, uint vote); |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 76 | #endif |