Skip to content

spi_nxp_lpspi: Save RAM by having driver data ptr #84406

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

Merged

Conversation

decsny
Copy link
Member

@decsny decsny commented Jan 22, 2025

The commit in this PR combines two of the commits in #82877 , just splitting this off to make that PR simpler since it is technically not required for the main idea of that PR. This should merge first.

What this does is remove a lot of stuff from the lpspi data struct and replace them with a void* to driver-specific data, meaning, ie, there are multiple distinct lpspi driver files now, and these paths do not actually share data types, so having all these datas in the common data structure is a waste of space.

Make a pointer to data that is specific to a certain type of LPSPI
driver, instead of having all of it in the struct whether it is used
or not.

Signed-off-by: Declan Snyder <[email protected]>
Copy link
Collaborator

@EmilioCBen EmilioCBen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code looks good to me, mostly a search and replace with the data structure.

@kartben kartben merged commit 8978f66 into zephyrproject-rtos:main Jan 27, 2025
29 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: SPI SPI bus platform: NXP Drivers NXP Semiconductors, drivers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants