Skip to content

Commit 34febea

Browse files
committed
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 <[email protected]>
1 parent 7e7828b commit 34febea

File tree

1 file changed

+6
-16
lines changed

1 file changed

+6
-16
lines changed

drivers/sensors/Kconfig

Lines changed: 6 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -267,6 +267,8 @@ config SENSORS_BMI160_SPI
267267

268268
endchoice # BMI160 Interface
269269

270+
if SENSORS_BMI160_I2C
271+
270272
choice
271273
prompt "I2C Address"
272274
default BMI160_I2C_ADDR_68
@@ -283,6 +285,7 @@ config BMI160_I2C_ADDR_69
283285
If SDO pin is pulled to VDDIO, use 0x69
284286

285287
endchoice # I2C Address
288+
endif # SENSORS_BMI160_I2C
286289

287290
endif # SENSORS_BMI160
288291

@@ -320,22 +323,7 @@ config SENSORS_BMI088_SPI
320323

321324
endchoice # BMI088 Interface
322325

323-
choice
324-
prompt "I2C Address"
325-
default BMI160_I2C_ACC_ADDR_18
326-
327-
config BMI160_I2C_ACC_ADDR_18
328-
bool "0x18"
329-
---help---
330-
Default address.
331-
If SDO pin is pulled to GND, use 0x18
332-
333-
config BMI160_I2C_ACC_ADDR_19
334-
bool "0x19"
335-
---help---
336-
If SDO pin is pulled to VDDIO, use 0x19
337-
338-
endchoice # I2C Address
326+
if SENSORS_BMI088_I2C
339327

340328
choice
341329
prompt "I2C Address"
@@ -354,6 +342,8 @@ config BMI088_I2C_GYRO_ADDR_69
354342

355343
endchoice # I2C Address
356344

345+
endif # SENSORS_BMI088_I2C
346+
357347
endif # SENSORS_BMI088
358348

359349
config SENSORS_BMI270

0 commit comments

Comments
 (0)