-
Notifications
You must be signed in to change notification settings - Fork 7.8k
drivers: spi: mchp_mss: Make the driver a bit more universal #93008
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
The driver has ignored the first RX buffer. Most likely it has been modeled for accesses to a SPI flash or similar where the first read data is not relevant. This commit makes sure that the driver can work as a universal SPI master instead. Signed-off-by: Christian Mauderer <[email protected]>
At the moment, if you would pass a NULL buffer to the driver, the rx and tx counts of that buffer would not advance. This patch fixes that. Signed-off-by: Christian Mauderer <[email protected]>
The driver did send some extra 0 bytes when the receive hasn't been finished yet. This patch makes sure to avoid that. Signed-off-by: Christian Mauderer <[email protected]>
Hello @c-mauderer, and thank you very much for your first pull request to the Zephyr project! |
|
@con-pax Please have a look at this. |
Hi @sebhub @c-mauderer, I haven't forgotten about this PR. team mates have been on vacation, hence not getting to fully test it. should be tested next week |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
The current driver has a workarround that seem to be targeted to SPI flashes. It completely throws away the first Rx buffer without any warning or error. This patch set: