|
| 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