Skip to content
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

emul: spi: SPI_EMUL_INIT(n) hard-coded to instance #0 #60118

Merged

Conversation

tristan-google
Copy link
Collaborator

The SPI_EMUL_INIT(n) macro used to instantiate SPI bus emulators builds an array of SPI devices attached to the bus, but always checks instance #0 of the bus and not n. This makes multiple instances of an emulated SPI bus unusable and popualtes them all with bus 0's devices.

Change the 0 to n, which matches how the I2C bus emulator does it.

The `SPI_EMUL_INIT(n)` macro used to instantiate SPI bus emulators
builds an array of SPI devices attached to the bus, but always checks
instance #0 of the bus and not `n`. This makes multiple instances of an
emulated SPI bus unusable and popualtes them all with bus 0's devices.

Change the `0` to `n`, which matches how the I2C bus emulator does it.

Signed-off-by: Tristan Honscheid <honscheid@google.com>
@fabiobaltieri fabiobaltieri added the Trivial Changes that can be reviewed by anyone, i.e. doc changes, minor build system tweaks, etc. label Jul 6, 2023
Copy link

@ericpeers ericpeers left a comment

Choose a reason for hiding this comment

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

nit: populate in commit message

@keith-zephyr
Copy link
Contributor

nit: populate in commit message

The commit message is valid. See 39cfc52

Also note that the compliance checks verify the commit message format.

@carlescufi carlescufi merged commit 8131076 into zephyrproject-rtos:main Jul 7, 2023
@barnas-michal
Copy link
Collaborator

Also note that the compliance checks verify the commit message format.

There is a misspelling of word "populates" with "popualtes"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: SPI SPI bus Trivial Changes that can be reviewed by anyone, i.e. doc changes, minor build system tweaks, etc.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants