From a20b8342c5920c0ba22eaec327fdd4bbd1a75743 Mon Sep 17 00:00:00 2001 From: Hao Luo Date: Mon, 17 Jun 2024 09:44:20 +0800 Subject: [PATCH] drivers: ambiq: Add dependencies to avoid showing to non-ambiq platforms Fixed the Kconfig.ambiq under i2c and spi so that they don't litter. (cherry picked from commit d1eea369b1fd7e366a50ec6d0a2a29365a794c26) Original-Signed-off-by: Hao Luo GitOrigin-RevId: d1eea369b1fd7e366a50ec6d0a2a29365a794c26 Change-Id: Ib6d09fed27b24b12f6b8ef63fe7d15360b9257b4 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/zephyr/+/5666212 Reviewed-by: Ting Shen Tested-by: Ting Shen Tested-by: ChromeOS Prod (Robot) Commit-Queue: Ting Shen --- drivers/i2c/Kconfig.ambiq | 6 +++++- drivers/spi/Kconfig.ambiq | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/drivers/i2c/Kconfig.ambiq b/drivers/i2c/Kconfig.ambiq index 04a80848d9f..ca925a89fbd 100644 --- a/drivers/i2c/Kconfig.ambiq +++ b/drivers/i2c/Kconfig.ambiq @@ -5,7 +5,7 @@ # SPDX-License-Identifier: Apache-2.0 # -config I2C_AMBIQ +menuconfig I2C_AMBIQ bool "AMBIQ I2C driver" default y depends on DT_HAS_AMBIQ_I2C_ENABLED @@ -14,6 +14,8 @@ config I2C_AMBIQ help Enable driver for Ambiq I2C. +if I2C_AMBIQ + config I2C_AMBIQ_DMA bool "AMBIQ APOLLO I2C DMA Support" help @@ -24,3 +26,5 @@ config I2C_DMA_TCB_BUFFER_SIZE default 1024 help DMA Transfer Control Buffer size in words + +endif # I2C_AMBIQ diff --git a/drivers/spi/Kconfig.ambiq b/drivers/spi/Kconfig.ambiq index 1a249945988..5121655fb8b 100644 --- a/drivers/spi/Kconfig.ambiq +++ b/drivers/spi/Kconfig.ambiq @@ -6,7 +6,7 @@ # SPDX-License-Identifier: Apache-2.0 # -config SPI_AMBIQ +menuconfig SPI_AMBIQ bool "AMBIQ SPI driver" default y depends on DT_HAS_AMBIQ_SPI_ENABLED @@ -15,6 +15,8 @@ config SPI_AMBIQ help Enable driver for Ambiq SPI. +if SPI_AMBIQ + config SPI_AMBIQ_DMA bool "AMBIQ APOLLO SPI DMA Support" depends on SPI_AMBIQ @@ -28,6 +30,8 @@ config SPI_DMA_TCB_BUFFER_SIZE help DMA Transfer Control Buffer size in words +endif # SPI_AMBIQ + config MSPI_AMBIQ bool "AMBIQ MSPI driver" default y