es2: add entry in debugfs to control endpoint to cport mapping
Create one entry in cport debugfs for each cport connected.
A read on entry will return the number of the bulk endpoint
set mapped to this cport.
A write will map the bulk set of bulk endpoint to this cport.
Example:
To map ep3 and ep4 to cport 12 of interface id 2 (APB2)
echo 1 > /sys/kernel/debug/greybus/intf2/CP12
Valid values: 0 to 6
- 0 is the muxed endpoint set (ep2 and ep3).
APBridgeA firmware will extract from Greybus header
the cport number and send data to the right cport.
By default, all cports are mapped to this one.
- 1 to 6 are dedicated endpoin set
(2 endpoints are used only by one cport).
Note:
* bulk endpoint value mean:
0 => ep1 and ep2
1 => ep3 and ep4
...
6 => ep13 and ep14
* Be aware that CPx debugfs entry use hd_cport_id,
ie it may be different from the cport id in manifest.
Signed-off-by:
Alexandre Bailon <abailon@baylibre.com>
Please register or sign in to comment