Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

usb: docs: document altmode register/unregister functions

The typec_bus.rst asks for documentation of those two
functions, but they don't exist:

./drivers/usb/typec/bus.c:1: warning: 'typec_altmode_unregister_driver' not found
./drivers/usb/typec/bus.c:1: warning: 'typec_altmode_register_driver' not found

Also, they're not declared on bus.c but, instead, at a header
file (typec_altmode.h).

So, add documentation for both functions at the header and
change the kernel-doc markup under typec_bus.rst to point
to the right place.

While here, also place the documentation for both structs
declared on typec_altmode.h at the rst file.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>

+23 -1
+7 -1
Documentation/driver-api/usb/typec_bus.rst
··· 91 91 Driver API 92 92 ---------- 93 93 94 + Alternate mode structs 95 + ~~~~~~~~~~~~~~~~~~~~~~ 96 + 97 + .. kernel-doc:: include/linux/usb/typec_altmode.h 98 + :functions: typec_altmode_driver typec_altmode_ops 99 + 94 100 Alternate mode driver registering/unregistering 95 101 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 96 102 97 - .. kernel-doc:: drivers/usb/typec/bus.c 103 + .. kernel-doc:: include/linux/usb/typec_altmode.h 98 104 :functions: typec_altmode_register_driver typec_altmode_unregister_driver 99 105 100 106 Alternate mode driver operations
+16
include/linux/usb/typec_altmode.h
··· 152 152 #define to_altmode_driver(d) container_of(d, struct typec_altmode_driver, \ 153 153 driver) 154 154 155 + /** 156 + * typec_altmode_register_driver - registers a USB Type-C alternate mode 157 + * device driver 158 + * @drv: pointer to struct typec_altmode_driver 159 + * 160 + * These drivers will be bind to the partner alternate mode devices. They will 161 + * handle all SVID specific communication. 162 + */ 155 163 #define typec_altmode_register_driver(drv) \ 156 164 __typec_altmode_register_driver(drv, THIS_MODULE) 157 165 int __typec_altmode_register_driver(struct typec_altmode_driver *drv, 158 166 struct module *module); 167 + /** 168 + * typec_altmode_unregister_driver - unregisters a USB Type-C alternate mode 169 + * device driver 170 + * @drv: pointer to struct typec_altmode_driver 171 + * 172 + * These drivers will be bind to the partner alternate mode devices. They will 173 + * handle all SVID specific communication. 174 + */ 159 175 void typec_altmode_unregister_driver(struct typec_altmode_driver *drv); 160 176 161 177 #define module_typec_altmode_driver(__typec_altmode_driver) \