/arch/arm/mach-msm/include/mach/oem_rapi_client.h
C++ Header | 132 lines | 64 code | 15 blank | 53 comment | 0 complexity | d3510d928cf7138a41c545aee07dbdaf 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_OEM_RAPI_CLIENT_H
31#define __ASM__ARCH_OEM_RAPI_CLIENT_H
32
33/*
34 * OEM RAPI CLIENT Driver header file
35 */
36
37#include <linux/types.h>
38#include <mach/msm_rpcrouter.h>
39
40enum {
41 OEM_RAPI_CLIENT_EVENT_NONE = 0,
42
43 /*
44 * list of oem rapi client events
45 */
46
47#if defined (CONFIG_LGE_SUPPORT_RAPI)
48 /* LGE_CHANGES_S [khlee@lge.com] 2009-12-04, [VS740] use OEMRAPI */
49 LG_FW_RAPI_START = 100,
50 LG_FW_RAPI_CLIENT_EVENT_GET_LINE_TYPE = LG_FW_RAPI_START,
51 LG_FW_TESTMODE_EVENT_FROM_ARM11 = LG_FW_RAPI_START + 1,
52 LG_FW_A2M_BATT_INFO_GET = LG_FW_RAPI_START + 2,
53 LG_FW_A2M_PSEUDO_BATT_INFO_SET = LG_FW_RAPI_START + 3,
54 LG_FW_MEID_GET = LG_FW_RAPI_START + 4,
55 //LGSI_LS670_Froyo_ToGB_Raghupathy_26Apr2011_Start
56 LG_FW_SET_OPERATION_MODE = LG_FW_RAPI_START + 5,
57 //LGSI_LS670_Froyo_ToGB_Raghupathy_26Apr2011_End
58 /* LGE_CHANGES_S [woonghee.park@lge.com] 2010-05-18, [VS740],
59 * LG_FW_CHARGING_TIMER
60 */
61 LG_FW_SET_CHARGING_TIMER = LG_FW_RAPI_START + 6,
62 LG_FW_GET_CHARGING_TIMER = LG_FW_RAPI_START + 7,
63 /* LGE_CHANGES_E [woonghee.park@lge.com] */
64 /* LGE_CHANGE [dojip.kim@lge.com] 2010-05-29, [LS670] PCB Version */
65 LG_FW_GET_PCB_VERSION = LG_FW_RAPI_START + 8,
66 /* LGE_CHANGE [dojip.kim@lge.com] 2010-05-29, [LS670] LG_FW_RTN_RESET */
67 LG_FW_RAPI_CLIENT_EVENT_SET_RTN_RESET= LG_FW_RAPI_START + 9,
68 /* LGE_CHANGE [dojip.kim@lge.com] 2010-08-09, [LS670]
69 * no stop charging even if hot or cold battery
70 */
71 LG_FW_RAPI_CLIENT_EVENT_SET_THM_NO_STOP_CHARGING = LG_FW_RAPI_START + 10,
72 /* LGE_CHANGE [dojip.kim@lge.com] 2010-08-9 */
73 //LGSI_LS670_Froyo_ToGB_Raghupathy_26Apr2011_Start
74 LG_FW_A2M_BLOCK_CHARGING_SET = LG_FW_RAPI_START + 11,
75 /* LGE_CHANGE [james.jang@lge.com] 2010-08-25 */
76 LG_FW_CIQ_EXCEPTION_ERROR_TEST = LG_FW_RAPI_START + 12,
77 /* LGE_CHANGE [dojip.kim@lge.com] 2010-09-01 */
78 LG_FW_SET_CHARGING_STAT_REALTIME_UPDATE = LG_FW_RAPI_START + 13,
79 LG_FW_GET_CHARGING_STAT_REALTIME_UPDATE = LG_FW_RAPI_START + 14,
80 //LGSI_LS670_Froyo_ToGB_Raghupathy_26Apr2011_End
81 /* LGE_CHANGE [dojip.kim@lge.com] 2010-09-12, prl version */
82 LG_FW_GET_PRL_VERSION = LG_FW_RAPI_START + 15,
83 /* LGE_CHANGE [dojip.kim@lge.com] 2010-09-28, ftm boot */
84 LG_FW_SET_FTM_BOOT = LG_FW_RAPI_START + 16,
85 LG_FW_GET_FTM_BOOT = LG_FW_RAPI_START + 17,
86#endif
87 OEM_RAPI_CLIENT_EVENT_MAX
88
89};
90
91struct oem_rapi_client_streaming_func_cb_arg {
92 uint32_t event;
93 void *handle;
94 uint32_t in_len;
95 char *input;
96 uint32_t out_len_valid;
97 uint32_t output_valid;
98 uint32_t output_size;
99};
100
101struct oem_rapi_client_streaming_func_cb_ret {
102 uint32_t *out_len;
103 char *output;
104};
105
106struct oem_rapi_client_streaming_func_arg {
107 uint32_t event;
108 int (*cb_func)(struct oem_rapi_client_streaming_func_cb_arg *,
109 struct oem_rapi_client_streaming_func_cb_ret *);
110 void *handle;
111 uint32_t in_len;
112 char *input;
113 uint32_t out_len_valid;
114 uint32_t output_valid;
115 uint32_t output_size;
116};
117
118struct oem_rapi_client_streaming_func_ret {
119 uint32_t *out_len;
120 char *output;
121};
122
123int oem_rapi_client_streaming_function(
124 struct msm_rpc_client *client,
125 struct oem_rapi_client_streaming_func_arg *arg,
126 struct oem_rapi_client_streaming_func_ret *ret);
127
128int oem_rapi_client_close(void);
129
130struct msm_rpc_client *oem_rapi_client_init(void);
131
132#endif