blob: 725e7608c006196584d2310dc3cc5eeb98677056 [file] [log] [blame]
Ben Cheng655a7c02013-10-16 16:09:24 -07001/****************************************************************************
2 ****************************************************************************
3 ***
4 *** This header was automatically generated from a Linux kernel header
5 *** of the same name, to make information necessary for userspace to
6 *** call into the kernel available to libc. It contains only constants,
7 *** structures, and macros generated from the original header, and thus,
8 *** contains no copyrightable information.
9 ***
10 *** To edit the content of this header, modify the corresponding
11 *** source file (e.g. under external/kernel-headers/original/) then
12 *** run bionic/libc/kernel/tools/update_all.py
13 ***
14 *** Any manual change here will be lost the next time this script will
15 *** be run. You've been warned!
16 ***
17 ****************************************************************************
18 ****************************************************************************/
Christopher Ferrisd32ca142020-02-04 16:16:51 -080019#ifndef _UAPI_LINUX_CHIO_H
20#define _UAPI_LINUX_CHIO_H
Ben Cheng655a7c02013-10-16 16:09:24 -070021#define CHET_MT 0
22#define CHET_ST 1
23#define CHET_IE 2
24#define CHET_DT 3
Ben Cheng655a7c02013-10-16 16:09:24 -070025#define CHET_V1 4
26#define CHET_V2 5
27#define CHET_V3 6
28#define CHET_V4 7
Ben Cheng655a7c02013-10-16 16:09:24 -070029struct changer_params {
Tao Baod7db5942015-01-28 10:07:51 -080030 int cp_curpicker;
31 int cp_npickers;
32 int cp_nslots;
Tao Baod7db5942015-01-28 10:07:51 -080033 int cp_nportals;
34 int cp_ndrives;
Ben Cheng655a7c02013-10-16 16:09:24 -070035};
36struct changer_vendor_params {
Tao Baod7db5942015-01-28 10:07:51 -080037 int cvp_n1;
38 char cvp_label1[16];
39 int cvp_n2;
40 char cvp_label2[16];
Tao Baod7db5942015-01-28 10:07:51 -080041 int cvp_n3;
42 char cvp_label3[16];
43 int cvp_n4;
44 char cvp_label4[16];
Tao Baod7db5942015-01-28 10:07:51 -080045 int reserved[8];
Ben Cheng655a7c02013-10-16 16:09:24 -070046};
47struct changer_move {
Tao Baod7db5942015-01-28 10:07:51 -080048 int cm_fromtype;
Tao Baod7db5942015-01-28 10:07:51 -080049 int cm_fromunit;
50 int cm_totype;
51 int cm_tounit;
52 int cm_flags;
Ben Cheng655a7c02013-10-16 16:09:24 -070053};
54#define CM_INVERT 1
55struct changer_exchange {
Tao Baod7db5942015-01-28 10:07:51 -080056 int ce_srctype;
Tao Baod7db5942015-01-28 10:07:51 -080057 int ce_srcunit;
58 int ce_fdsttype;
59 int ce_fdstunit;
60 int ce_sdsttype;
Tao Baod7db5942015-01-28 10:07:51 -080061 int ce_sdstunit;
62 int ce_flags;
Ben Cheng655a7c02013-10-16 16:09:24 -070063};
64#define CE_INVERT1 1
Ben Cheng655a7c02013-10-16 16:09:24 -070065#define CE_INVERT2 2
66struct changer_position {
Tao Baod7db5942015-01-28 10:07:51 -080067 int cp_type;
68 int cp_unit;
Tao Baod7db5942015-01-28 10:07:51 -080069 int cp_flags;
Ben Cheng655a7c02013-10-16 16:09:24 -070070};
71#define CP_INVERT 1
72struct changer_element_status {
Tao Baod7db5942015-01-28 10:07:51 -080073 int ces_type;
74 unsigned char __user * ces_data;
Ben Cheng655a7c02013-10-16 16:09:24 -070075};
76#define CESTATUS_FULL 0x01
Ben Cheng655a7c02013-10-16 16:09:24 -070077#define CESTATUS_IMPEXP 0x02
78#define CESTATUS_EXCEPT 0x04
79#define CESTATUS_ACCESS 0x08
80#define CESTATUS_EXENAB 0x10
Ben Cheng655a7c02013-10-16 16:09:24 -070081#define CESTATUS_INENAB 0x20
82struct changer_get_element {
Tao Baod7db5942015-01-28 10:07:51 -080083 int cge_type;
84 int cge_unit;
Tao Baod7db5942015-01-28 10:07:51 -080085 int cge_status;
86 int cge_errno;
87 int cge_srctype;
88 int cge_srcunit;
Tao Baod7db5942015-01-28 10:07:51 -080089 int cge_id;
90 int cge_lun;
91 char cge_pvoltag[36];
92 char cge_avoltag[36];
Tao Baod7db5942015-01-28 10:07:51 -080093 int cge_flags;
Ben Cheng655a7c02013-10-16 16:09:24 -070094};
95#define CGE_ERRNO 0x01
96#define CGE_INVERT 0x02
Ben Cheng655a7c02013-10-16 16:09:24 -070097#define CGE_SRC 0x04
98#define CGE_IDLUN 0x08
99#define CGE_PVOLTAG 0x10
100#define CGE_AVOLTAG 0x20
Ben Cheng655a7c02013-10-16 16:09:24 -0700101struct changer_set_voltag {
Tao Baod7db5942015-01-28 10:07:51 -0800102 int csv_type;
103 int csv_unit;
104 char csv_voltag[36];
Tao Baod7db5942015-01-28 10:07:51 -0800105 int csv_flags;
Ben Cheng655a7c02013-10-16 16:09:24 -0700106};
107#define CSV_PVOLTAG 0x01
108#define CSV_AVOLTAG 0x02
Ben Cheng655a7c02013-10-16 16:09:24 -0700109#define CSV_CLEARTAG 0x04
Tao Baod7db5942015-01-28 10:07:51 -0800110#define CHIOMOVE _IOW('c', 1, struct changer_move)
111#define CHIOEXCHANGE _IOW('c', 2, struct changer_exchange)
112#define CHIOPOSITION _IOW('c', 3, struct changer_position)
Tao Baod7db5942015-01-28 10:07:51 -0800113#define CHIOGPICKER _IOR('c', 4, int)
114#define CHIOSPICKER _IOW('c', 5, int)
115#define CHIOGPARAMS _IOR('c', 6, struct changer_params)
116#define CHIOGSTATUS _IOW('c', 8, struct changer_element_status)
Tao Baod7db5942015-01-28 10:07:51 -0800117#define CHIOGELEM _IOW('c', 16, struct changer_get_element)
118#define CHIOINITELEM _IO('c', 17)
119#define CHIOSVOLTAG _IOW('c', 18, struct changer_set_voltag)
120#define CHIOGVPARAMS _IOR('c', 19, struct changer_vendor_params)
Christopher Ferrisd32ca142020-02-04 16:16:51 -0800121#endif