diff options
author | Mauro Carvalho Chehab <mchehab@osg.samsung.com> | 2015-04-21 05:33:03 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@osg.samsung.com> | 2015-04-21 08:44:55 -0400 |
commit | 64131a87f2aae2ed9e05d8227c5b009ca6c50d98 (patch) | |
tree | fdea23fd59216120bf54a48c60ca24489a733f14 /include/uapi/linux/hsi/cs-protocol.h | |
parent | 676ee36be04985062522804c2de04f0764212be6 (diff) | |
parent | 2c33ce009ca2389dbf0535d0672214d09738e35e (diff) |
Merge branch 'drm-next-merged' of git://people.freedesktop.org/~airlied/linux into v4l_for_linus
* 'drm-next-merged' of git://people.freedesktop.org/~airlied/linux: (9717 commits)
media-bus: Fixup RGB444_1X12, RGB565_1X16, and YUV8_1X24 media bus format
hexdump: avoid warning in test function
fs: take i_mutex during prepare_binprm for set[ug]id executables
smp: Fix error case handling in smp_call_function_*()
iommu-common: Fix PARISC compile-time warnings
sparc: Make LDC use common iommu poll management functions
sparc: Make sparc64 use scalable lib/iommu-common.c functions
Break up monolithic iommu table/lock into finer graularity pools and lock
sparc: Revert generic IOMMU allocator.
tools/power turbostat: correct dumped pkg-cstate-limit value
tools/power turbostat: calculate TSC frequency from CPUID(0x15) on SKL
tools/power turbostat: correct DRAM RAPL units on recent Xeon processors
tools/power turbostat: Initial Skylake support
tools/power turbostat: Use $(CURDIR) instead of $(PWD) and add support for O= option in Makefile
tools/power turbostat: modprobe msr, if needed
tools/power turbostat: dump MSR_TURBO_RATIO_LIMIT2
tools/power turbostat: use new MSR_TURBO_RATIO_LIMIT names
Bluetooth: hidp: Fix regression with older userspace and flags validation
config: Enable NEED_DMA_MAP_STATE by default when SWIOTLB is selected
perf/x86/intel/pt: Fix and clean up error handling in pt_event_add()
...
That solves several merge conflicts:
Documentation/DocBook/media/v4l/subdev-formats.xml
Documentation/devicetree/bindings/vendor-prefixes.txt
drivers/staging/media/mn88473/mn88473.c
include/linux/kconfig.h
include/uapi/linux/media-bus-format.h
The ones at subdev-formats.xml and media-bus-format.h are not trivial.
That's why we opted to merge from DRM.
Diffstat (limited to 'include/uapi/linux/hsi/cs-protocol.h')
-rw-r--r-- | include/uapi/linux/hsi/cs-protocol.h | 113 |
1 files changed, 113 insertions, 0 deletions
diff --git a/include/uapi/linux/hsi/cs-protocol.h b/include/uapi/linux/hsi/cs-protocol.h new file mode 100644 index 000000000000..4957bba57cbe --- /dev/null +++ b/include/uapi/linux/hsi/cs-protocol.h | |||
@@ -0,0 +1,113 @@ | |||
1 | /* | ||
2 | * cmt-speech interface definitions | ||
3 | * | ||
4 | * Copyright (C) 2008,2009,2010 Nokia Corporation. All rights reserved. | ||
5 | * | ||
6 | * Contact: Kai Vehmanen <kai.vehmanen@nokia.com> | ||
7 | * Original author: Peter Ujfalusi <peter.ujfalusi@nokia.com> | ||
8 | * | ||
9 | * This program is free software; you can redistribute it and/or | ||
10 | * modify it under the terms of the GNU General Public License | ||
11 | * version 2 as published by the Free Software Foundation. | ||
12 | * | ||
13 | * This program is distributed in the hope that it will be useful, but | ||
14 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
16 | * General Public License for more details. | ||
17 | * | ||
18 | * You should have received a copy of the GNU General Public License | ||
19 | * along with this program; if not, write to the Free Software | ||
20 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA | ||
21 | * 02110-1301 USA | ||
22 | */ | ||
23 | |||
24 | #ifndef _CS_PROTOCOL_H | ||
25 | #define _CS_PROTOCOL_H | ||
26 | |||
27 | #include <linux/types.h> | ||
28 | #include <linux/ioctl.h> | ||
29 | |||
30 | /* chardev parameters */ | ||
31 | #define CS_DEV_FILE_NAME "/dev/cmt_speech" | ||
32 | |||
33 | /* user-space API versioning */ | ||
34 | #define CS_IF_VERSION 2 | ||
35 | |||
36 | /* APE kernel <-> user space messages */ | ||
37 | #define CS_CMD_SHIFT 28 | ||
38 | #define CS_DOMAIN_SHIFT 24 | ||
39 | |||
40 | #define CS_CMD_MASK 0xff000000 | ||
41 | #define CS_PARAM_MASK 0xffffff | ||
42 | |||
43 | #define CS_CMD(id, dom) \ | ||
44 | (((id) << CS_CMD_SHIFT) | ((dom) << CS_DOMAIN_SHIFT)) | ||
45 | |||
46 | #define CS_ERROR CS_CMD(1, 0) | ||
47 | #define CS_RX_DATA_RECEIVED CS_CMD(2, 0) | ||
48 | #define CS_TX_DATA_READY CS_CMD(3, 0) | ||
49 | #define CS_TX_DATA_SENT CS_CMD(4, 0) | ||
50 | |||
51 | /* params to CS_ERROR indication */ | ||
52 | #define CS_ERR_PEER_RESET 0 | ||
53 | |||
54 | /* ioctl interface */ | ||
55 | |||
56 | /* parameters to CS_CONFIG_BUFS ioctl */ | ||
57 | #define CS_FEAT_TSTAMP_RX_CTRL (1 << 0) | ||
58 | #define CS_FEAT_ROLLING_RX_COUNTER (2 << 0) | ||
59 | |||
60 | /* parameters to CS_GET_STATE ioctl */ | ||
61 | #define CS_STATE_CLOSED 0 | ||
62 | #define CS_STATE_OPENED 1 /* resource allocated */ | ||
63 | #define CS_STATE_CONFIGURED 2 /* data path active */ | ||
64 | |||
65 | /* maximum number of TX/RX buffers */ | ||
66 | #define CS_MAX_BUFFERS_SHIFT 4 | ||
67 | #define CS_MAX_BUFFERS (1 << CS_MAX_BUFFERS_SHIFT) | ||
68 | |||
69 | /* Parameters for setting up the data buffers */ | ||
70 | struct cs_buffer_config { | ||
71 | __u32 rx_bufs; /* number of RX buffer slots */ | ||
72 | __u32 tx_bufs; /* number of TX buffer slots */ | ||
73 | __u32 buf_size; /* bytes */ | ||
74 | __u32 flags; /* see CS_FEAT_* */ | ||
75 | __u32 reserved[4]; | ||
76 | }; | ||
77 | |||
78 | /* | ||
79 | * Struct describing the layout and contents of the driver mmap area. | ||
80 | * This information is meant as read-only information for the application. | ||
81 | */ | ||
82 | struct cs_mmap_config_block { | ||
83 | __u32 reserved1; | ||
84 | __u32 buf_size; /* 0=disabled, otherwise the transfer size */ | ||
85 | __u32 rx_bufs; /* # of RX buffers */ | ||
86 | __u32 tx_bufs; /* # of TX buffers */ | ||
87 | __u32 reserved2; | ||
88 | /* array of offsets within the mmap area for each RX and TX buffer */ | ||
89 | __u32 rx_offsets[CS_MAX_BUFFERS]; | ||
90 | __u32 tx_offsets[CS_MAX_BUFFERS]; | ||
91 | __u32 rx_ptr; | ||
92 | __u32 rx_ptr_boundary; | ||
93 | __u32 reserved3[2]; | ||
94 | /* | ||
95 | * if enabled with CS_FEAT_TSTAMP_RX_CTRL, monotonic | ||
96 | * timestamp taken when the last control command was received | ||
97 | */ | ||
98 | struct timespec tstamp_rx_ctrl; | ||
99 | }; | ||
100 | |||
101 | #define CS_IO_MAGIC 'C' | ||
102 | |||
103 | #define CS_IOW(num, dtype) _IOW(CS_IO_MAGIC, num, dtype) | ||
104 | #define CS_IOR(num, dtype) _IOR(CS_IO_MAGIC, num, dtype) | ||
105 | #define CS_IOWR(num, dtype) _IOWR(CS_IO_MAGIC, num, dtype) | ||
106 | #define CS_IO(num) _IO(CS_IO_MAGIC, num) | ||
107 | |||
108 | #define CS_GET_STATE CS_IOR(21, unsigned int) | ||
109 | #define CS_SET_WAKELINE CS_IOW(23, unsigned int) | ||
110 | #define CS_GET_IF_VERSION CS_IOR(30, unsigned int) | ||
111 | #define CS_CONFIG_BUFS CS_IOW(31, struct cs_buffer_config) | ||
112 | |||
113 | #endif /* _CS_PROTOCOL_H */ | ||