Skip to content

Commit 54c0cae

Browse files
committed
sensor: hts221: Cleanup Kconfig for driver & bus name
Move to use an if HAS_DTS_I2C_DEVICE instead of depends on so that the Kconfig sybmols don't even show up if HAS_DTS_I2C_DEVICE is true. Signed-off-by: Kumar Gala <[email protected]>
1 parent ec77270 commit 54c0cae

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

drivers/sensor/hts221/Kconfig

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,23 +12,27 @@ menuconfig HTS221
1212
help
1313
Enable driver for HTS221 I2C-based temperature and humidity sensor.
1414

15+
if !HAS_DTS_I2C_DEVICE
16+
1517
config HTS221_NAME
1618
string
1719
prompt "Driver name"
1820
default "HTS221"
19-
depends on HTS221 && !HAS_DTS_I2C_DEVICE
21+
depends on HTS221
2022
help
2123
Device name with which the HTS221 sensor is identified.
2224

2325
config HTS221_I2C_MASTER_DEV_NAME
2426
string
2527
prompt "I2C master where HTS221 is connected"
26-
depends on HTS221 && !HAS_DTS_I2C_DEVICE
28+
depends on HTS221
2729
default "I2C_0"
2830
help
2931
Specify the device name of the I2C master device to which HTS221 is
3032
connected.
3133

34+
endif
35+
3236
choice
3337
prompt "Trigger mode"
3438
depends on HTS221

0 commit comments

Comments
 (0)