Skip to content

Conversation

@AlessandroLuo
Copy link
Contributor

Changed to define ambiq spi/i2c dma mode as a binding property instead of kconfig macros, making it more flexible for different spi/i2c instances.

@AlessandroLuo AlessandroLuo requested a review from Copilot May 9, 2025 01:44
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR changes the DMA configuration for Ambiq SPI/I2C drivers from compile‐time Kconfig macros to a binding property, allowing more flexibility for different instances.

  • Added a new binding property "dma-mode" in the DTS YAML file.
  • Updated SPI and I2C drivers to use the new property instead of CONFIG_* macros.
  • Removed corresponding DMA options from Kconfig files.

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
dts/bindings/mfd/ambiq,iom.yaml Added "dma-mode" property for enabling DMA and updated command queue size description.
drivers/spi/spi_ambiq_spic.c Introduced the dma_mode field, revised transfer logic and interrupt setup based on dma_mode.
drivers/spi/Kconfig.ambiq Removed the SPI DMA configuration option to use the new binding property instead.
drivers/i2c/i2c_ambiq.c Introduced the dma_mode field and updated transfer functions to handle DMA or blocking transfers accordingly.
drivers/i2c/Kconfig.ambiq Removed the I2C DMA configuration option in favor of the binding property.

@AlessandroLuo AlessandroLuo force-pushed the ambiq-iom-dma branch 3 times, most recently from e952c91 to 5def355 Compare May 9, 2025 02:32
Changed to define ambiq spi/i2c dma mode as a binding property
instead of kconfig macros, making it more flexible for different
spi/i2c instances.

Signed-off-by: Hao Luo <hluo@ambiq.com>
@sonarqubecloud
Copy link

sonarqubecloud bot commented May 9, 2025

@kartben kartben merged commit d89c61b into zephyrproject-rtos:main May 13, 2025
27 checks passed
@AlessandroLuo AlessandroLuo deleted the ambiq-iom-dma branch June 18, 2025 03:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants