You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by ac...@apache.org on 2025/11/18 12:16:18 UTC

(nuttx) branch master updated: drivers/sensors: Fix Kconfig

This is an automated email from the ASF dual-hosted git repository.

acassis pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git


The following commit(s) were added to refs/heads/master by this push:
     new 34febea2df6 drivers/sensors: Fix Kconfig
34febea2df6 is described below

commit 34febea2df6a6113461363c2640db7c1dee5ddf2
Author: Alan Carvalho de Assis <ac...@gmail.com>
AuthorDate: Mon Nov 17 11:31:04 2025 -0300

    drivers/sensors: Fix Kconfig
    
    As reported by a user in Discord channel selection BMI160 with SPI
    interface still showing the I2C configuration. This patch fixes it.
    
    Signed-off-by: Alan C. Assis <ac...@gmail.com>
---
 drivers/sensors/Kconfig | 22 ++++++----------------
 1 file changed, 6 insertions(+), 16 deletions(-)

diff --git a/drivers/sensors/Kconfig b/drivers/sensors/Kconfig
index 0d630a22f92..3baefcd6948 100644
--- a/drivers/sensors/Kconfig
+++ b/drivers/sensors/Kconfig
@@ -267,6 +267,8 @@ config SENSORS_BMI160_SPI
 
 endchoice # BMI160 Interface
 
+if SENSORS_BMI160_I2C
+
 choice
 	prompt "I2C Address"
 	default BMI160_I2C_ADDR_68
@@ -283,6 +285,7 @@ config BMI160_I2C_ADDR_69
 		If SDO pin is pulled to VDDIO, use 0x69
 
 endchoice # I2C Address
+endif # SENSORS_BMI160_I2C
 
 endif # SENSORS_BMI160
 
@@ -320,22 +323,7 @@ config SENSORS_BMI088_SPI
 
 endchoice # BMI088 Interface
 
-choice
-	prompt "I2C Address"
-	default BMI160_I2C_ACC_ADDR_18
-
-config BMI160_I2C_ACC_ADDR_18
-	bool "0x18"
-	---help---
-		Default address.
-		If SDO pin is pulled to GND, use 0x18
-
-config BMI160_I2C_ACC_ADDR_19
-	bool "0x19"
-	---help---
-		If SDO pin is pulled to VDDIO, use 0x19
-
-endchoice # I2C Address
+if SENSORS_BMI088_I2C
 
 choice
 	prompt "I2C Address"
@@ -354,6 +342,8 @@ config BMI088_I2C_GYRO_ADDR_69
 
 endchoice # I2C Address
 
+endif # SENSORS_BMI088_I2C
+
 endif # SENSORS_BMI088
 
 config SENSORS_BMI270