Open NekoCWD opened 8 months ago
I think this potential feature requires input from the Linux kernel USB community, they might have some ideas about how it should be done.
Could you send a mail to the linux-usb mailing list about this?
@.*** http://www.linux-usb.org/mailing.html https://lore.kernel.org/linux-usb/
Please post the link to the lore thread back here too.
-- bye, pabs
I think it would be great if library could provide full list of functions, that can be used in gadget. Maybe something like:
int *usbg_get_available_function_types()
Which will return null-terminated array of functions or error(f.e if modules directory doesn't contain modules.{order/builtin})We can search in modules.order and modules.builtin for
kernel/drivers/usb/gadget/function/usb_f_{function_name}.ko
and then recognize it withusbg_lookup_function_type(function_name)
Are there better ways to do this? If no, i can make a PR with it