Skip to content

Commit cd20a82

Browse files
author
QuIC Gerrit Code Review
committed
Merge change 5307 into android-msm-2.6.29-release
* changes: msm: Add OEM RAPI RPC Client Driver.
2 parents a36c180 + 4946434 commit cd20a82

File tree

5 files changed

+601
-0
lines changed

5 files changed

+601
-0
lines changed

arch/arm/configs/msm7201a_defconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,7 @@ CONFIG_MSM_ONCRPCROUTER=y
226226
CONFIG_MSM_ONCRPCROUTER_DEBUG=y
227227
CONFIG_MSM_RPCSERVERS=y
228228
CONFIG_MSM_RPC_PING=y
229+
CONFIG_MSM_RPC_OEM_RAPI=y
229230
CONFIG_MSM_RPCSERVER_HANDSET=y
230231
# CONFIG_MSM_CPU_FREQ_SET_MIN_MAX is not set
231232
CONFIG_MSM_HW3D=y

arch/arm/mach-msm/Kconfig

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -448,6 +448,13 @@ config MSM_RPC_PING
448448
help
449449
Implements MSM rpc ping test module.
450450

451+
config MSM_RPC_OEM_RAPI
452+
depends on MSM_ONCRPCROUTER
453+
default m
454+
bool "MSM oem rapi"
455+
help
456+
Implements MSM oem rapi client module.
457+
451458
config MSM_RPCSERVER_HANDSET
452459
depends on MSM_ONCRPCROUTER
453460
default y

arch/arm/mach-msm/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ obj-$(CONFIG_MSM_ONCRPCROUTER) += smd_rpcrouter_device.o
3131
obj-$(CONFIG_MSM_ONCRPCROUTER) += smd_rpcrouter_servers.o
3232
obj-$(CONFIG_MSM_ONCRPCROUTER) += smd_rpcrouter_clients.o
3333
obj-$(CONFIG_MSM_RPC_PING) += ping_mdm_rpc_client.o
34+
obj-$(CONFIG_MSM_RPC_OEM_RAPI) += oem_rapi_client.o
3435
obj-$(CONFIG_MSM_RPCSERVERS) += rpc_server_dog_keepalive.o
3536
obj-$(CONFIG_MSM_RPCSERVERS) += rpc_server_time_remote.o
3637
obj-$(CONFIG_MSM_DALRPC) += dal.o
Lines changed: 118 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,118 @@
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 met:
5+
* * Redistributions of source code must retain the above copyright
6+
* notice, this list of conditions and the following disclaimer.
7+
* * Redistributions in binary form must reproduce the above copyright
8+
* notice, this list of conditions and the following disclaimer in the
9+
* documentation and/or other materials provided with the distribution.
10+
* * Neither the name of Code Aurora Forum nor
11+
* the names of its contributors may be used to endorse or promote
12+
* products derived from this software without specific prior written
13+
* permission.
14+
*
15+
* Alternatively, provided that this notice is retained in full, this software
16+
* may be relicensed by the recipient under the terms of the GNU General Public
17+
* License version 2 ("GPL") and only version 2, in which case the provisions of
18+
* the GPL apply INSTEAD OF those given above. If the recipient relicenses the
19+
* software under the GPL, then the identification text in the MODULE_LICENSE
20+
* macro must be changed to reflect "GPLv2" instead of "Dual BSD/GPL". Once a
21+
* recipient changes the license terms to the GPL, subsequent recipients shall
22+
* not relicense under alternate licensing terms, including the BSD or dual
23+
* BSD/GPL terms. In addition, the following license statement immediately
24+
* below and between the words START and END shall also then apply when this
25+
* software is relicensed under the GPL:
26+
*
27+
* START
28+
*
29+
* This program is free software; you can redistribute it and/or modify it under
30+
* the terms of the GNU General Public License version 2 and only version 2 as
31+
* published by the Free Software Foundation.
32+
*
33+
* This program is distributed in the hope that it will be useful, but WITHOUT
34+
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
35+
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
36+
* details.
37+
*
38+
* You should have received a copy of the GNU General Public License along with
39+
* this program; if not, write to the Free Software Foundation, Inc.,
40+
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
41+
42+
* END
43+
44+
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
45+
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
46+
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
47+
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
48+
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
49+
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
50+
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
51+
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
52+
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
53+
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
54+
* POSSIBILITY OF SUCH DAMAGE.
55+
*/
56+
57+
#ifndef __ASM__ARCH_OEM_RAPI_CLIENT_H
58+
#define __ASM__ARCH_OEM_RAPI_CLIENT_H
59+
60+
/*
61+
* OEM RAPI CLIENT Driver header file
62+
*/
63+
64+
#include <linux/kernel.h>
65+
66+
enum {
67+
OEM_RAPI_CLIENT_EVENT_NONE = 0,
68+
69+
/*
70+
* list of oem rapi client events
71+
*/
72+
73+
OEM_RAPI_CLIENT_EVENT_MAX
74+
75+
};
76+
77+
struct oem_rapi_client_streaming_func_cb_arg {
78+
uint32_t event;
79+
void *handle;
80+
uint32_t in_len;
81+
char *input;
82+
uint32_t out_len_valid;
83+
uint32_t output_valid;
84+
uint32_t output_size;
85+
};
86+
87+
struct oem_rapi_client_streaming_func_cb_ret {
88+
uint32_t *out_len;
89+
char *output;
90+
};
91+
92+
struct oem_rapi_client_streaming_func_arg {
93+
uint32_t event;
94+
int (*cb_func)(struct oem_rapi_client_streaming_func_cb_arg *,
95+
struct oem_rapi_client_streaming_func_cb_ret *);
96+
void *handle;
97+
uint32_t in_len;
98+
char *input;
99+
uint32_t out_len_valid;
100+
uint32_t output_valid;
101+
uint32_t output_size;
102+
};
103+
104+
struct oem_rapi_client_streaming_func_ret {
105+
uint32_t *out_len;
106+
char *output;
107+
};
108+
109+
int oem_rapi_client_streaming_function(
110+
struct msm_rpc_client *client,
111+
struct oem_rapi_client_streaming_func_arg *arg,
112+
struct oem_rapi_client_streaming_func_ret *ret);
113+
114+
int oem_rapi_client_close(void);
115+
116+
struct msm_rpc_client *oem_rapi_client_init(void);
117+
118+
#endif

0 commit comments

Comments
 (0)