blob: ab1a6a14d1a07e63b0101bb64a460630fb367ba2 [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 ****************************************************************************/
19#ifndef _UAPI_CM4000_H_
20#define _UAPI_CM4000_H_
21#include <linux/types.h>
Ben Cheng655a7c02013-10-16 16:09:24 -070022#define MAX_ATR 33
Elliott Hughes8cb52b02013-11-21 13:43:23 -080023/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -070024#define CM4000_MAX_DEV 4
25typedef struct atreq {
26 __s32 atr_len;
Ben Cheng655a7c02013-10-16 16:09:24 -070027 unsigned char atr[64];
Elliott Hughes8cb52b02013-11-21 13:43:23 -080028/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -070029 __s32 power_act;
30 unsigned char bIFSD;
31 unsigned char bIFSC;
Ben Cheng655a7c02013-10-16 16:09:24 -070032} atreq_t;
Elliott Hughes8cb52b02013-11-21 13:43:23 -080033/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -070034typedef struct ptsreq {
35 __u32 protocol;
36 unsigned char flags;
Ben Cheng655a7c02013-10-16 16:09:24 -070037 unsigned char pts1;
Elliott Hughes8cb52b02013-11-21 13:43:23 -080038/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -070039 unsigned char pts2;
40 unsigned char pts3;
41} ptsreq_t;
Ben Cheng655a7c02013-10-16 16:09:24 -070042#define CM_IOC_MAGIC 'c'
Elliott Hughes8cb52b02013-11-21 13:43:23 -080043/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -070044#define CM_IOC_MAXNR 255
45#define CM_IOCGSTATUS _IOR (CM_IOC_MAGIC, 0, unsigned char *)
46#define CM_IOCGATR _IOWR(CM_IOC_MAGIC, 1, atreq_t *)
Ben Cheng655a7c02013-10-16 16:09:24 -070047#define CM_IOCSPTS _IOW (CM_IOC_MAGIC, 2, ptsreq_t *)
Elliott Hughes8cb52b02013-11-21 13:43:23 -080048/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -070049#define CM_IOCSRDR _IO (CM_IOC_MAGIC, 3)
50#define CM_IOCARDOFF _IO (CM_IOC_MAGIC, 4)
51#define CM_IOSDBGLVL _IOW(CM_IOC_MAGIC, 250, int*)
Ben Cheng655a7c02013-10-16 16:09:24 -070052#define CM_CARD_INSERTED 0x01
Elliott Hughes8cb52b02013-11-21 13:43:23 -080053/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -070054#define CM_CARD_POWERED 0x02
55#define CM_ATR_PRESENT 0x04
56#define CM_ATR_VALID 0x08
Ben Cheng655a7c02013-10-16 16:09:24 -070057#define CM_STATE_VALID 0x0f
Elliott Hughes8cb52b02013-11-21 13:43:23 -080058/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -070059#define CM_NO_READER 0x10
60#define CM_BAD_CARD 0x20
61#endif