blob: 89be987bfea3cdcd6b862d99ffb8550e39a93165 [file] [log] [blame]
Elliott Hughes180edef2023-11-02 00:08:05 +00001/*
2 * This file is auto-generated. Modifications will be lost.
3 *
4 * See https://android.googlesource.com/platform/bionic/+/master/libc/kernel/
5 * for more information.
6 */
Christopher Ferrisd32ca142020-02-04 16:16:51 -08007#ifndef _UAPI_LINUX_CHIO_H
8#define _UAPI_LINUX_CHIO_H
Ben Cheng655a7c02013-10-16 16:09:24 -07009#define CHET_MT 0
10#define CHET_ST 1
11#define CHET_IE 2
12#define CHET_DT 3
Ben Cheng655a7c02013-10-16 16:09:24 -070013#define CHET_V1 4
14#define CHET_V2 5
15#define CHET_V3 6
16#define CHET_V4 7
Ben Cheng655a7c02013-10-16 16:09:24 -070017struct changer_params {
Tao Baod7db5942015-01-28 10:07:51 -080018 int cp_curpicker;
19 int cp_npickers;
20 int cp_nslots;
Tao Baod7db5942015-01-28 10:07:51 -080021 int cp_nportals;
22 int cp_ndrives;
Ben Cheng655a7c02013-10-16 16:09:24 -070023};
24struct changer_vendor_params {
Tao Baod7db5942015-01-28 10:07:51 -080025 int cvp_n1;
26 char cvp_label1[16];
27 int cvp_n2;
28 char cvp_label2[16];
Tao Baod7db5942015-01-28 10:07:51 -080029 int cvp_n3;
30 char cvp_label3[16];
31 int cvp_n4;
32 char cvp_label4[16];
Tao Baod7db5942015-01-28 10:07:51 -080033 int reserved[8];
Ben Cheng655a7c02013-10-16 16:09:24 -070034};
35struct changer_move {
Tao Baod7db5942015-01-28 10:07:51 -080036 int cm_fromtype;
Tao Baod7db5942015-01-28 10:07:51 -080037 int cm_fromunit;
38 int cm_totype;
39 int cm_tounit;
40 int cm_flags;
Ben Cheng655a7c02013-10-16 16:09:24 -070041};
42#define CM_INVERT 1
43struct changer_exchange {
Tao Baod7db5942015-01-28 10:07:51 -080044 int ce_srctype;
Tao Baod7db5942015-01-28 10:07:51 -080045 int ce_srcunit;
46 int ce_fdsttype;
47 int ce_fdstunit;
48 int ce_sdsttype;
Tao Baod7db5942015-01-28 10:07:51 -080049 int ce_sdstunit;
50 int ce_flags;
Ben Cheng655a7c02013-10-16 16:09:24 -070051};
52#define CE_INVERT1 1
Ben Cheng655a7c02013-10-16 16:09:24 -070053#define CE_INVERT2 2
54struct changer_position {
Tao Baod7db5942015-01-28 10:07:51 -080055 int cp_type;
56 int cp_unit;
Tao Baod7db5942015-01-28 10:07:51 -080057 int cp_flags;
Ben Cheng655a7c02013-10-16 16:09:24 -070058};
59#define CP_INVERT 1
60struct changer_element_status {
Tao Baod7db5942015-01-28 10:07:51 -080061 int ces_type;
Elliott Hughes0f0c18f2023-03-29 15:53:31 -070062 unsigned char * ces_data;
Ben Cheng655a7c02013-10-16 16:09:24 -070063};
64#define CESTATUS_FULL 0x01
Ben Cheng655a7c02013-10-16 16:09:24 -070065#define CESTATUS_IMPEXP 0x02
66#define CESTATUS_EXCEPT 0x04
67#define CESTATUS_ACCESS 0x08
68#define CESTATUS_EXENAB 0x10
Ben Cheng655a7c02013-10-16 16:09:24 -070069#define CESTATUS_INENAB 0x20
70struct changer_get_element {
Tao Baod7db5942015-01-28 10:07:51 -080071 int cge_type;
72 int cge_unit;
Tao Baod7db5942015-01-28 10:07:51 -080073 int cge_status;
74 int cge_errno;
75 int cge_srctype;
76 int cge_srcunit;
Tao Baod7db5942015-01-28 10:07:51 -080077 int cge_id;
78 int cge_lun;
79 char cge_pvoltag[36];
80 char cge_avoltag[36];
Tao Baod7db5942015-01-28 10:07:51 -080081 int cge_flags;
Ben Cheng655a7c02013-10-16 16:09:24 -070082};
83#define CGE_ERRNO 0x01
84#define CGE_INVERT 0x02
Ben Cheng655a7c02013-10-16 16:09:24 -070085#define CGE_SRC 0x04
86#define CGE_IDLUN 0x08
87#define CGE_PVOLTAG 0x10
88#define CGE_AVOLTAG 0x20
Ben Cheng655a7c02013-10-16 16:09:24 -070089struct changer_set_voltag {
Tao Baod7db5942015-01-28 10:07:51 -080090 int csv_type;
91 int csv_unit;
92 char csv_voltag[36];
Tao Baod7db5942015-01-28 10:07:51 -080093 int csv_flags;
Ben Cheng655a7c02013-10-16 16:09:24 -070094};
95#define CSV_PVOLTAG 0x01
96#define CSV_AVOLTAG 0x02
Ben Cheng655a7c02013-10-16 16:09:24 -070097#define CSV_CLEARTAG 0x04
Tao Baod7db5942015-01-28 10:07:51 -080098#define CHIOMOVE _IOW('c', 1, struct changer_move)
99#define CHIOEXCHANGE _IOW('c', 2, struct changer_exchange)
100#define CHIOPOSITION _IOW('c', 3, struct changer_position)
Tao Baod7db5942015-01-28 10:07:51 -0800101#define CHIOGPICKER _IOR('c', 4, int)
102#define CHIOSPICKER _IOW('c', 5, int)
103#define CHIOGPARAMS _IOR('c', 6, struct changer_params)
104#define CHIOGSTATUS _IOW('c', 8, struct changer_element_status)
Tao Baod7db5942015-01-28 10:07:51 -0800105#define CHIOGELEM _IOW('c', 16, struct changer_get_element)
106#define CHIOINITELEM _IO('c', 17)
107#define CHIOSVOLTAG _IOW('c', 18, struct changer_set_voltag)
108#define CHIOGVPARAMS _IOR('c', 19, struct changer_vendor_params)
Christopher Ferrisd32ca142020-02-04 16:16:51 -0800109#endif