Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 544aca39 authored by Sebastian Andrzej Siewior's avatar Sebastian Andrzej Siewior Committed by Felipe Balbi
Browse files

usb: gadget: provide a wrapper around SourceSink's setup function



The setup request can be sent to an interface/endpoint or to the device
itself. If it is sent to an interface / endpoint then we forward it to
the function that is mapped to that interface / endpoint.
If the device is the target of the setup request then we forward it to the
->setup() callback of the currently active configuration.
In case of the sourcesink function the requests are function specific
but are sent to the device.
This patch introduces a setup wrapper at configuration level which
forwards the request to the function. By using this wrapper we can keep
the function specific code within the function file and we need just a
hint at config level to forward the request.
The here introduced global variable will be moved into the gadget (which
combines the two functions) in a later patch.
SourceSink is currently the only function using ->setup() at config level.

Signed-off-by: default avatarSebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: default avatarFelipe Balbi <balbi@ti.com>
parent 32b86665
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment