xref: /openbmc/linux/include/linux/usb/ccid.h (revision 75bf465f0bc33e9b776a46d6a1b9b990f5fb7c37)
1*1a59d1b8SThomas Gleixner /* SPDX-License-Identifier: GPL-2.0-or-later */
27f7c548cSVincent Pelletier /*
37f7c548cSVincent Pelletier  *  Copyright (c) 2018  Vincent Pelletier
47f7c548cSVincent Pelletier  */
57f7c548cSVincent Pelletier /*
67f7c548cSVincent Pelletier  */
77f7c548cSVincent Pelletier #ifndef __CCID_H
87f7c548cSVincent Pelletier #define __CCID_H
97f7c548cSVincent Pelletier 
107f7c548cSVincent Pelletier #include <linux/types.h>
117f7c548cSVincent Pelletier 
127f7c548cSVincent Pelletier #define USB_INTERFACE_CLASS_CCID 0x0b
137f7c548cSVincent Pelletier 
147f7c548cSVincent Pelletier struct ccid_descriptor {
157f7c548cSVincent Pelletier 	__u8  bLength;
167f7c548cSVincent Pelletier 	__u8  bDescriptorType;
177f7c548cSVincent Pelletier 	__le16 bcdCCID;
187f7c548cSVincent Pelletier 	__u8  bMaxSlotIndex;
197f7c548cSVincent Pelletier 	__u8  bVoltageSupport;
207f7c548cSVincent Pelletier 	__le32 dwProtocols;
217f7c548cSVincent Pelletier 	__le32 dwDefaultClock;
227f7c548cSVincent Pelletier 	__le32 dwMaximumClock;
237f7c548cSVincent Pelletier 	__u8  bNumClockSupported;
247f7c548cSVincent Pelletier 	__le32 dwDataRate;
257f7c548cSVincent Pelletier 	__le32 dwMaxDataRate;
267f7c548cSVincent Pelletier 	__u8  bNumDataRatesSupported;
277f7c548cSVincent Pelletier 	__le32 dwMaxIFSD;
287f7c548cSVincent Pelletier 	__le32 dwSynchProtocols;
297f7c548cSVincent Pelletier 	__le32 dwMechanical;
307f7c548cSVincent Pelletier 	__le32 dwFeatures;
317f7c548cSVincent Pelletier 	__le32 dwMaxCCIDMessageLength;
327f7c548cSVincent Pelletier 	__u8  bClassGetResponse;
337f7c548cSVincent Pelletier 	__u8  bClassEnvelope;
347f7c548cSVincent Pelletier 	__le16 wLcdLayout;
357f7c548cSVincent Pelletier 	__u8  bPINSupport;
367f7c548cSVincent Pelletier 	__u8  bMaxCCIDBusySlots;
377f7c548cSVincent Pelletier } __attribute__ ((packed));
387f7c548cSVincent Pelletier 
397f7c548cSVincent Pelletier #endif /* __CCID_H */
40