blob: d81ce05e4eb58971c975bdea384f9b02deb07eb5 [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 */
Ben Cheng655a7c02013-10-16 16:09:24 -07007#ifndef __LINUX_CAPI_H__
8#define __LINUX_CAPI_H__
9#include <linux/types.h>
10#include <linux/ioctl.h>
Ben Cheng655a7c02013-10-16 16:09:24 -070011#include <linux/kernelcapi.h>
12typedef struct capi_register_params {
Tao Baod7db5942015-01-28 10:07:51 -080013 __u32 level3cnt;
14 __u32 datablkcnt;
Tao Baod7db5942015-01-28 10:07:51 -080015 __u32 datablklen;
Ben Cheng655a7c02013-10-16 16:09:24 -070016} capi_register_params;
Tao Baod7db5942015-01-28 10:07:51 -080017#define CAPI_REGISTER _IOW('C', 0x01, struct capi_register_params)
Ben Cheng655a7c02013-10-16 16:09:24 -070018#define CAPI_MANUFACTURER_LEN 64
Tao Baod7db5942015-01-28 10:07:51 -080019#define CAPI_GET_MANUFACTURER _IOWR('C', 0x06, int)
Ben Cheng655a7c02013-10-16 16:09:24 -070020typedef struct capi_version {
Tao Baod7db5942015-01-28 10:07:51 -080021 __u32 majorversion;
22 __u32 minorversion;
Tao Baod7db5942015-01-28 10:07:51 -080023 __u32 majormanuversion;
24 __u32 minormanuversion;
Ben Cheng655a7c02013-10-16 16:09:24 -070025} capi_version;
Tao Baod7db5942015-01-28 10:07:51 -080026#define CAPI_GET_VERSION _IOWR('C', 0x07, struct capi_version)
Ben Cheng655a7c02013-10-16 16:09:24 -070027#define CAPI_SERIAL_LEN 8
Tao Baod7db5942015-01-28 10:07:51 -080028#define CAPI_GET_SERIAL _IOWR('C', 0x08, int)
Ben Cheng655a7c02013-10-16 16:09:24 -070029typedef struct capi_profile {
Tao Baod7db5942015-01-28 10:07:51 -080030 __u16 ncontroller;
Tao Baod7db5942015-01-28 10:07:51 -080031 __u16 nbchannel;
32 __u32 goptions;
33 __u32 support1;
34 __u32 support2;
Tao Baod7db5942015-01-28 10:07:51 -080035 __u32 support3;
36 __u32 reserved[6];
37 __u32 manu[5];
Ben Cheng655a7c02013-10-16 16:09:24 -070038} capi_profile;
Tao Baod7db5942015-01-28 10:07:51 -080039#define CAPI_GET_PROFILE _IOWR('C', 0x09, struct capi_profile)
Ben Cheng655a7c02013-10-16 16:09:24 -070040typedef struct capi_manufacturer_cmd {
Tao Baod7db5942015-01-28 10:07:51 -080041 unsigned long cmd;
Elliott Hughes0f0c18f2023-03-29 15:53:31 -070042 void * data;
Ben Cheng655a7c02013-10-16 16:09:24 -070043} capi_manufacturer_cmd;
Tao Baod7db5942015-01-28 10:07:51 -080044#define CAPI_MANUFACTURER_CMD _IOWR('C', 0x20, struct capi_manufacturer_cmd)
45#define CAPI_GET_ERRCODE _IOR('C', 0x21, __u16)
46#define CAPI_INSTALLED _IOR('C', 0x22, __u16)
Ben Cheng655a7c02013-10-16 16:09:24 -070047typedef union capi_ioctl_struct {
Tao Baod7db5942015-01-28 10:07:51 -080048 __u32 contr;
49 capi_register_params rparams;
50 __u8 manufacturer[CAPI_MANUFACTURER_LEN];
Tao Baod7db5942015-01-28 10:07:51 -080051 capi_version version;
52 __u8 serial[CAPI_SERIAL_LEN];
53 capi_profile profile;
54 capi_manufacturer_cmd cmd;
Tao Baod7db5942015-01-28 10:07:51 -080055 __u16 errcode;
Ben Cheng655a7c02013-10-16 16:09:24 -070056} capi_ioctl_struct;
57#define CAPIFLAG_HIGHJACKING 0x0001
Tao Baod7db5942015-01-28 10:07:51 -080058#define CAPI_GET_FLAGS _IOR('C', 0x23, unsigned)
Tao Baod7db5942015-01-28 10:07:51 -080059#define CAPI_SET_FLAGS _IOR('C', 0x24, unsigned)
60#define CAPI_CLR_FLAGS _IOR('C', 0x25, unsigned)
61#define CAPI_NCCI_OPENCOUNT _IOR('C', 0x26, unsigned)
62#define CAPI_NCCI_GETUNIT _IOR('C', 0x27, unsigned)
Ben Cheng655a7c02013-10-16 16:09:24 -070063#endif