-
Notifications
You must be signed in to change notification settings - Fork 8.4k
drivers: spi: Call correct SPI device definition macros #81353
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
Conversation
|
Hello @dpw13, and thank you very much for your first pull request to the Zephyr project! |
550ac46 to
a6692b1
Compare
|
Apologies for the force-push, I'm still working out how to address code style issues and the best way I found was to reformat modified lines pre-commit. It looks like the compliance check wants me to reformat some fairly large sections of macro in some of these files and it appears to me that |
tbursztyka
left a comment
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.
@dpw13 force push a PR is a normal procedure, it's totally fine.
lgtm
soburi
left a comment
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.
I checked renesas_ra8, gd32, pl022, these are fine.
If CONFIG_SPI_STATS is enabled, the device state for all SPI controller drivers must contain the SPI stats. This space is allocated by calling Z_SPI_INIT_FN as part of the device definition; this is done automatically when using SPI_DEVICE_DT_DEFINE instead of DEVICE_DT_DEFINE. If space for statistics is not properly allocated but CONFIG_SPI_STATS is enabled, an unexpected write to memory outside of the stats region may occur on a SPI transfer. This commit uses SPI_DEVICE_DT_DEFINE or SPI_DEVICE_DT_INST_DEFINE for all in-tree SPI controller drivers. Signed-off-by: Dane Wagner <[email protected]>
a6692b1 to
0544746
Compare
|
Fixed merge conflict in zephyr/drivers/spi/spi_mcux_lpspi.c. No functional changes since last push. |
|
@tbursztyka please take a look / re-approve. Thanks! |
If CONFIG_SPI_STATS is enabled, the device state for all SPI controller drivers must contain the SPI stats. This space is allocated by calling Z_SPI_INIT_FN as part of the device definition; this is done automatically when using SPI_DEVICE_DT_DEFINE instead of DEVICE_DT_DEFINE. If space for statistics is not properly allocated but CONFIG_SPI_STATS is enabled, an unexpected write to memory outside of the stats region may occur on a SPI transfer. This commit uses SPI_DEVICE_DT_DEFINE or SPI_DEVICE_DT_INST_DEFINE for all in-tree SPI controller drivers.