For most of the stuff there, documenting is easy, as the header file contains information. Yet, I was unable to document two data structs: ca_msg and ca_descr As those two structs are used by a few drivers, keep them.
Showing the changes to include/uapi/linux (1 of 2 files). Show all
Unified · Split
| @@ -24,39 +24,81 @@ · 23 unmodified lines | ||
| 24 | 24 | #ifndef _DVBCA_H_ |
| 25 | 25 | #define _DVBCA_H_ |
| 26 | 26 | |
| 27 | −/* slot interface types and info */ | |
| 27 | +/** | |
| 28 | + * struct ca_slot_info - CA slot interface types and info. | |
| 29 | + * | |
| 30 | + * @num: slot number. | |
| 31 | + * @type: slot type. | |
| 32 | + * @flags: flags applicable to the slot. | |
| 33 | + * | |
| 34 | + * This struct stores the CA slot information. | |
| 35 | + * | |
| 36 | + * @type can be: | |
| 37 | + * | |
| 38 | + * - %CA_CI - CI high level interface; | |
| 39 | + * - %CA_CI_LINK - CI link layer level interface; | |
| 40 | + * - %CA_CI_PHYS - CI physical layer level interface; | |
| 41 | + * - %CA_DESCR - built-in descrambler; | |
| 42 | + * - %CA_SC -simple smart card interface. | |
| 43 | + * | |
| 44 | + * @flags can be: | |
| 45 | + * | |
| 46 | + * - %CA_CI_MODULE_PRESENT - module (or card) inserted; | |
| 47 | + * - %CA_CI_MODULE_READY - module is ready for usage. | |
| 48 | + */ | |
| 28 | 49 | |
| 29 | 50 | struct ca_slot_info { |
| 30 | − int num; /* slot number */ | |
| 31 | − | |
| 32 | − int type; /* CA interface this slot supports */ | |
| 33 | −#define CA_CI 1 /* CI high level interface */ | |
| 34 | −#define CA_CI_LINK 2 /* CI link layer level interface */ | |
| 35 | −#define CA_CI_PHYS 4 /* CI physical layer level interface */ | |
| 36 | −#define CA_DESCR 8 /* built-in descrambler */ | |
| 37 | −#define CA_SC 128 /* simple smart card interface */ | |
| 51 | + int num; | |
| 52 | + int type; | |
| 53 | +#define CA_CI 1 | |
| 54 | +#define CA_CI_LINK 2 | |
| 55 | +#define CA_CI_PHYS 4 | |
| 56 | +#define CA_DESCR 8 | |
| 57 | +#define CA_SC 128 | |
| 38 | 58 | |
| 39 | 59 | unsigned int flags; |
| 40 | −#define CA_CI_MODULE_PRESENT 1 /* module (or card) inserted */ | |
| 60 | +#define CA_CI_MODULE_PRESENT 1 | |
| 41 | 61 | #define CA_CI_MODULE_READY 2 |
| 42 | 62 | }; |
| 43 | 63 | |
| 44 | 64 | |
| 45 | −/* descrambler types and info */ | |
| 46 | − | |
| 65 | +/** | |
| 66 | + * struct ca_descr_info - descrambler types and info. | |
| 67 | + * | |
| 68 | + * @num: number of available descramblers (keys). | |
| 69 | + * @type: type of supported scrambling system. | |
| 70 | + * | |
| 71 | + * Identifies the number of descramblers and their type. | |
| 72 | + * | |
| 73 | + * @type can be: | |
| 74 | + * | |
| 75 | + * - %CA_ECD - European Common Descrambler (ECD) hardware; | |
| 76 | + * - %CA_NDS - Videoguard (NDS) hardware; | |
| 77 | + * - %CA_DSS - Distributed Sample Scrambling (DSS) hardware. | |
| 78 | + */ | |
| 47 | 79 | struct ca_descr_info { |
| 48 | − unsigned int num; /* number of available descramblers (keys) */ | |
| 49 | − unsigned int type; /* type of supported scrambling system */ | |
| 80 | + unsigned int num; | |
| 81 | + unsigned int type; | |
| 50 | 82 | #define CA_ECD 1 |
| 51 | 83 | #define CA_NDS 2 |
| 52 | 84 | #define CA_DSS 4 |
| 53 | 85 | }; |
| 54 | 86 | |
| 87 | +/** | |
| 88 | + * struct ca_caps - CA slot interface capabilities. | |
| 89 | + * | |
| 90 | + * @slot_num: total number of CA card and module slots. | |
| 91 | + * @slot_type: bitmap with all supported types as defined at | |
| 92 | + * &struct ca_slot_info (e. g. %CA_CI, %CA_CI_LINK, etc). | |
| 93 | + * @descr_num: total number of descrambler slots (keys) | |
| 94 | + * @descr_type: bitmap with all supported types as defined at | |
| 95 | + * &struct ca_descr_info (e. g. %CA_ECD, %CA_NDS, etc). | |
| 96 | + */ | |
| 55 | 97 | struct ca_caps { |
| 56 | − unsigned int slot_num; /* total number of CA card and module slots */ | |
| 57 | − unsigned int slot_type; /* OR of all supported types */ | |
| 58 | − unsigned int descr_num; /* total number of descrambler slots (keys) */ | |
| 59 | − unsigned int descr_type; /* OR of all supported types */ | |
| 98 | + unsigned int slot_num; | |
| 99 | + unsigned int slot_type; | |
| 100 | + unsigned int descr_num; | |
| 101 | + unsigned int descr_type; | |
| 60 | 102 | }; |
| 61 | 103 | |
| 62 | 104 | /* a message to/from a CI-CAM */ |