Open frank-zago opened 1 year ago
Unfortunately, cs_change
has a meaning for every transfer in a message, not just the last. If you're aiming for upstream, you should deal with that.
Also, see the kernel default implementation of transfer_one_message for definitive desired behavior.
I realize this model screws up your attempts at packing individual transfers into URBs for better utilization. But this won't actually hurt performance in practice since multi-transfer messages are:
Maybe you should just implement set_cs
and transfer_one
and let the kernel's default transfer_one_message
deal with the cs_change
logic? It's easier, simplifies the code, will behave correctly and will not cause any noticable perf hit IMO.
This change is next on my list. I finished simplifying i2c. I'll do the same for spi.
untested so far