diff options
| author | Jonathan Herman <hermanjl@cs.unc.edu> | 2013-01-22 10:38:37 -0500 |
|---|---|---|
| committer | Jonathan Herman <hermanjl@cs.unc.edu> | 2013-01-22 10:38:37 -0500 |
| commit | fcc9d2e5a6c89d22b8b773a64fb4ad21ac318446 (patch) | |
| tree | a57612d1888735a2ec7972891b68c1ac5ec8faea /include/linux/tegra_rpc.h | |
| parent | 8dea78da5cee153b8af9c07a2745f6c55057fe12 (diff) | |
Diffstat (limited to 'include/linux/tegra_rpc.h')
| -rw-r--r-- | include/linux/tegra_rpc.h | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/include/linux/tegra_rpc.h b/include/linux/tegra_rpc.h new file mode 100644 index 00000000000..16e6367cf56 --- /dev/null +++ b/include/linux/tegra_rpc.h | |||
| @@ -0,0 +1,47 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (C) 2010 Google, Inc. | ||
| 3 | * | ||
| 4 | * Author: | ||
| 5 | * Dima Zavin <dima@android.com> | ||
| 6 | * | ||
| 7 | * Based on original code from NVIDIA, and a partial rewrite by: | ||
| 8 | * Gary King <gking@nvidia.com> | ||
| 9 | * | ||
| 10 | * This software is licensed under the terms of the GNU General Public | ||
| 11 | * License version 2, as published by the Free Software Foundation, and | ||
| 12 | * may be copied, distributed, and modified under those terms. | ||
| 13 | * | ||
| 14 | * This program is distributed in the hope that it will be useful, | ||
| 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 17 | * GNU General Public License for more details. | ||
| 18 | * | ||
| 19 | */ | ||
| 20 | |||
| 21 | #ifndef __LINUX_TEGRA_RPC_H | ||
| 22 | #define __LINUX_TEGRA_RPC_H | ||
| 23 | |||
| 24 | #define TEGRA_RPC_MAX_MSG_LEN 256 | ||
| 25 | |||
| 26 | /* Note: the actual size of the name in the protocol message is 16 bytes, | ||
| 27 | * but that is because the name there is not NUL terminated, only NUL | ||
| 28 | * padded. */ | ||
| 29 | #define TEGRA_RPC_MAX_NAME_LEN 17 | ||
| 30 | |||
| 31 | struct tegra_rpc_port_desc { | ||
| 32 | char name[TEGRA_RPC_MAX_NAME_LEN]; | ||
| 33 | int notify_fd; /* fd representing a trpc_sema to signal when a | ||
| 34 | * message has been received */ | ||
| 35 | }; | ||
| 36 | |||
| 37 | #define TEGRA_RPC_IOCTL_MAGIC 'r' | ||
| 38 | |||
| 39 | #define TEGRA_RPC_IOCTL_PORT_CREATE _IOW(TEGRA_RPC_IOCTL_MAGIC, 0x20, struct tegra_rpc_port_desc) | ||
| 40 | #define TEGRA_RPC_IOCTL_PORT_GET_NAME _IOR(TEGRA_RPC_IOCTL_MAGIC, 0x21, char *) | ||
| 41 | #define TEGRA_RPC_IOCTL_PORT_CONNECT _IOR(TEGRA_RPC_IOCTL_MAGIC, 0x22, long) | ||
| 42 | #define TEGRA_RPC_IOCTL_PORT_LISTEN _IOR(TEGRA_RPC_IOCTL_MAGIC, 0x23, long) | ||
| 43 | |||
| 44 | #define TEGRA_RPC_IOCTL_MIN_NR _IOC_NR(TEGRA_RPC_IOCTL_PORT_CREATE) | ||
| 45 | #define TEGRA_RPC_IOCTL_MAX_NR _IOC_NR(TEGRA_RPC_IOCTL_PORT_LISTEN) | ||
| 46 | |||
| 47 | #endif | ||
