]> www.infradead.org Git - users/jedix/linux-maple.git/commit
usb: gadget: f_fs: Add the missing get_alt callback
authorHardik Gajjar <hgajjar@de.adit-jv.com>
Fri, 1 Mar 2024 12:47:08 +0000 (13:47 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 26 Mar 2024 09:43:01 +0000 (10:43 +0100)
commit2f550553e23c889b54440bf05e2484d84105e48d
tree2d91b13b080541d8acc23a932bf1f1a9b02f3300
parentf7a7f80ccc8df017507e2b1e1dd652361374d25b
usb: gadget: f_fs: Add the missing get_alt callback

The Apple CarLife iAP gadget has a descriptor in userspace with two
alternate settings. The host sends the set_alt request to configure
alt_setting 0 or 1, and this is verified by the subsequent get_alt
request.

This patch implements and sets the get_alt callback. Without the
get_alt callback, composite.c abruptly concludes the
USB_REQ_GET/SET_INTERFACE request, assuming only one alt setting
for the endpoint.

unlike the uvc and ncm, f_fs gadget is fully implemented in userspace,
and driver just reset the eps and generate the event. so no additional
adaptaion associated with this change is not required in set_alt callback

Signed-off-by: Hardik Gajjar <hgajjar@de.adit-jv.com>
Link: https://lore.kernel.org/r/20240301124708.120394-1-hgajjar@de.adit-jv.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/gadget/function/f_fs.c