blob: 0012d23029cec5fcd241e3f10997a9f19b23cd3b [file] [log] [blame]
Abir Ghosh989d5e92016-10-09 11:47:28 +03001#ifndef _UAPI_QBT1000_H_
2#define _UAPI_QBT1000_H_
3
4#define MAX_NAME_SIZE 32
5
6/*
7 * enum qbt1000_commands -
8 * enumeration of command options
9 * @QBT1000_LOAD_APP - cmd loads TZ app
10 * @QBT1000_UNLOAD_APP - cmd unloads TZ app
11 * @QBT1000_SEND_TZCMD - sends cmd to TZ app
12 * @QBT1000_SET_FINGER_DETECT_KEY - sets the input key to send on finger detect
13 * @QBT1000_CONFIGURE_POWER_KEY - enables/disables sending the power key on
14 finger down events
15*/
16enum qbt1000_commands {
17 QBT1000_LOAD_APP = 100,
18 QBT1000_UNLOAD_APP = 101,
19 QBT1000_SEND_TZCMD = 102,
20 QBT1000_SET_FINGER_DETECT_KEY = 103,
21 QBT1000_CONFIGURE_POWER_KEY = 104
22};
Abir Ghosh0705fad2017-09-27 15:54:57 +030023#define QBT1000_ENABLE_GESTURES 105
Abir Ghosh989d5e92016-10-09 11:47:28 +030024
25/*
26 * enum qbt1000_fw_event -
27 * enumeration of firmware events
28 * @FW_EVENT_FINGER_DOWN - finger down detected
29 * @FW_EVENT_FINGER_UP - finger up detected
30 * @FW_EVENT_INDICATION - an indication IPC from the firmware is pending
31 */
32enum qbt1000_fw_event {
33 FW_EVENT_FINGER_DOWN = 1,
34 FW_EVENT_FINGER_UP = 2,
35 FW_EVENT_CBGE_REQUIRED = 3,
36};
37
38/*
39 * struct qbt1000_app -
40 * used to load and unload apps in TZ
41 * @app_handle - qseecom handle for clients
42 * @name - Name of secure app to load
43 * @size - Size of requested buffer of secure app
44 * @high_band_width - 1 - for high bandwidth usage
45 * 0 - for normal bandwidth usage
46 */
47struct qbt1000_app {
48 struct qseecom_handle **app_handle;
49 char name[MAX_NAME_SIZE];
50 uint32_t size;
51 uint8_t high_band_width;
52};
53
54/*
55 * struct qbt1000_send_tz_cmd -
56 * used to cmds to TZ App
57 * @app_handle - qseecom handle for clients
58 * @req_buf - Buffer containing request for secure app
59 * @req_buf_len - Length of request buffer
60 * @rsp_buf - Buffer containing response from secure app
61 * @rsp_buf_len - Length of response buffer
62 */
63struct qbt1000_send_tz_cmd {
64 struct qseecom_handle *app_handle;
65 uint8_t *req_buf;
66 uint32_t req_buf_len;
67 uint8_t *rsp_buf;
68 uint32_t rsp_buf_len;
69};
70
71/*
72 * struct qbt1000_erie_event -
73 * used to receive events from Erie
74 * @buf - Buffer containing event from Erie
75 * @buf_len - Length of buffer
76 */
77struct qbt1000_erie_event {
78 uint8_t *buf;
79 uint32_t buf_len;
80};
81
82/*
Abir Ghosh0705fad2017-09-27 15:54:57 +030083 * struct qbt1000_enable_gestures -
84 * used to configure whether gestures detection is enabled or disabled
85 * @enable - if non-zero, gestures detection is enabled
86 */
87struct qbt1000_enable_gestures {
88 unsigned int enable;
89};
90
91/*
Abir Ghosh989d5e92016-10-09 11:47:28 +030092 * struct qbt1000_set_finger_detect_key -
93 * used to configure the input key which is sent on finger down/up event
94 * @key_code - Key code to send on finger down/up. 0 disables sending key events
95 */
96struct qbt1000_set_finger_detect_key {
97 unsigned int key_code;
98};
99
100/*
101 * struct qbt1000_configure_power_key -
102 * used to configure whether the power key is sent on finger down
103 * @enable - if non-zero, power key is sent on finger down
104 */
105struct qbt1000_configure_power_key {
106 unsigned int enable;
107};
108
109#endif /* _UAPI_QBT1000_H_ */