Skip to content

Conversation

jeremydick
Copy link
Contributor

@jeremydick jeremydick commented Oct 10, 2025

Remove the delay parameter from the MIPI_DBI_SPI_CONFIG macros and use the SPI_CS_CONTROL_INIT macro to create the SPI CS, which will pull the values for delay from the devicetree

See RFC #97348

Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks, I've created an RFC for the proposed API changes. An alternative approach to fix the immediate issue introduced in #87427 which caused hardware CS to no longer work would be to set .cs_is_gpio = DT_SPI_DEV_HAS_CS_GPIOS(node_id) in the macro instead of always true. I can create a new PR for just that if it is better in the short term

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes if a fix is possible without API change, it's better.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Standalone PR is #97366. Will keep this RFC open since the delay parameter has been deprecated for SPI CS, so should probably be removed from MIPI DBI SPI

Remove the delay parameter from the MIPI_DBI_SPI_CONFIG macros
and use the SPI_CS_CONTROL_INIT macro to create the SPI CS,
which will pull the values for delay and cs_is_gpio from the devicetree

This fixes incorrectly trying to use a GPIO CS when there isn't one

Signed-off-by: Jeremy Dick <[email protected]>
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: Display Release Notes To be mentioned in the release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants