zephyr/drivers/sensor
Ulf Magnusson eddd98f811 kconfig: Replace some single-symbol 'if's with 'depends on'
I think people might be reading differences into 'if' and 'depends on'
that aren't there, like maybe 'if' being needed to "hide" a symbol,
while 'depends on' just adds a dependency.

There are no differences between 'if' and 'depends on'. 'if' is just a
shorthand for 'depends on'. They work the same when it comes to creating
implicit menus too.

The way symbols get "hidden" is through their dependencies not being
satisfied ('if'/'depends on' get copied up as a dependency on the
prompt).

Since 'if' and 'depends on' are the same, an 'if' with just a single
symbol in it can be replaced with a 'depends on'. IMO, it's best to
avoid 'if' there as a style choice too, because it confuses people into
thinking there's deep Kconfig magic going on that requires 'if'.

Going for 'depends on' can also remove some nested 'if's, which
generates nicer symbol information and docs, because nested 'if's really
are so simple/dumb that they just add the dependencies from both 'if's
to all symbols within.

Replace a bunch of single-symbol 'if's with 'depends on' to despam the
Kconfig files a bit and make it clearer how things work. Also do some
other minor related dependency refactoring.

The replacement isn't complete. Will fix up the rest later. Splitting it
a bit to make it more manageable.

(Everything above is true for choices, menus, and comments as well.)

Detected by tweaking the Kconfiglib parsing code. It's impossible to
detect after parsing, because 'if' turns into 'depends on'.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2020-02-08 08:32:42 -05:00
..
adt7420 sensor: adt7420: update for new GPIO API 2020-02-05 12:00:36 +01:00
adxl362 gpio: rename typedef for devicetree flags 2020-02-05 12:00:36 +01:00
adxl372 gpio: rename typedef for devicetree flags 2020-02-05 12:00:36 +01:00
ak8975 drivers: sensor: ak8975: remove legacy reference to MPU6050 2020-01-08 16:40:04 +01:00
amg88xx gpio: rename typedef for devicetree flags 2020-02-05 12:00:36 +01:00
ams_iAQcore kconfig: Replace some single-symbol 'if's with 'depends on' 2020-02-08 08:32:42 -05:00
apds9960 drivers: apds9960: convert to new GPIO API 2020-02-05 12:00:36 +01:00
bma280 drivers: sensor: bma280: convert to new GPIO API 2020-02-05 12:00:36 +01:00
bmc150_magn gpio: rename typedef for devicetree flags 2020-02-05 12:00:36 +01:00
bme280 drivers: sensor: bme280: Add CS control when using SPI 2020-01-14 08:49:19 -06:00
bme680 kconfig: Remove some redundant single-item menus and ifs 2019-12-21 10:26:54 -05:00
bmg160 gpio: rename typedef for devicetree flags 2020-02-05 12:00:36 +01:00
bmi160 gpio: rename typedef for devicetree flags 2020-02-05 12:00:36 +01:00
bmm150 sensor: bmm150: Convert to DTS 2019-11-08 07:44:54 -06:00
ccs811 sensors: ccs811: update to new API 2020-02-05 12:00:36 +01:00
dht gpio: rename typedef for devicetree flags 2020-02-05 12:00:36 +01:00
ens210 kconfig: Clean up header comments and make them consistent 2019-11-04 17:31:27 -05:00
fxas21002 gpio: rename typedef for devicetree flags 2020-02-05 12:00:36 +01:00
fxos8700 kconfig: Replace some single-symbol 'if's with 'depends on' 2020-02-08 08:32:42 -05:00
grove kconfig: Clean up header comments and make them consistent 2019-11-04 17:31:27 -05:00
hmc5883l drivers: hmc5883l: update to new GPIO API 2020-02-05 12:00:36 +01:00
hp206c sensor: hp206c: Convert to DTS 2019-11-08 07:44:54 -06:00
hts221 drivers: sensor: hts221: cleanup related to devicetree and trigger idiom 2020-02-05 12:00:36 +01:00
iis3dhhc driver/sensor: iis3dhhc: update to use new GPIO API 2020-02-05 12:00:36 +01:00
isl29035 drivers: sensor: isl29035: update to new GPIO API 2020-02-05 12:00:36 +01:00
lis2dh drivers: sensor: lis2dh: convert to new GPIO API 2020-02-05 12:00:36 +01:00
lis2ds12 gpio: rename typedef for devicetree flags 2020-02-05 12:00:36 +01:00
lis2dw12 driver/sensor: lis2dw12: update to use new GPIO API 2020-02-05 12:00:36 +01:00
lis2mdl driver/sensor: lis2mdl: update to use new GPIO API 2020-02-05 12:00:36 +01:00
lis3mdl drivers: sensor: lis3mdl: replace deprecated gpio_pin callback API 2020-02-05 12:00:36 +01:00
lps22hb kconfig: Replace some single-symbol 'if's with 'depends on' 2020-02-08 08:32:42 -05:00
lps22hh driver/sensor: lps22hh: update to use new GPIO API 2020-02-05 12:00:36 +01:00
lps25hb kconfig: Replace some single-symbol 'if's with 'depends on' 2020-02-08 08:32:42 -05:00
lsm6ds0 kconfig: Clean up header comments and make them consistent 2019-11-04 17:31:27 -05:00
lsm6dsl kconfig: Replace some single-symbol 'if's with 'depends on' 2020-02-08 08:32:42 -05:00
lsm6dso driver/sensor: lsm6dso: update to use new GPIO API 2020-02-05 12:00:36 +01:00
lsm9ds0_gyro gpio: rename typedef for devicetree flags 2020-02-05 12:00:36 +01:00
lsm9ds0_mfd kconfig: Clean up header comments and make them consistent 2019-11-04 17:31:27 -05:00
lsm303dlhc_magn kconfig: Clean up header comments and make them consistent 2019-11-04 17:31:27 -05:00
max30101 kconfig: Clean up header comments and make them consistent 2019-11-04 17:31:27 -05:00
max44009 sensor: max44009: Convert to DTS 2019-11-08 07:44:54 -06:00
mcp9808 drivers: sensor: mcp9808: update to new GPIO API 2020-02-05 12:00:36 +01:00
mpu6050 drivers: sensor: mpu6050: convert to new GPIO API 2020-02-05 12:00:36 +01:00
ms5607 drivers: sensor: ms5607: fix potential integer overlow 2020-01-16 07:47:59 -06:00
ms5837 kconfig: Clean up header comments and make them consistent 2019-11-04 17:31:27 -05:00
nrf5 drivers: clock_control: Add subsys argument to the callback 2020-02-05 17:07:01 +01:00
nxp_kinetis_temp drivers: sensor: add driver for the nxp kinetis temperature sensor 2020-01-16 17:30:42 -06:00
opt3001 include: Fix use of <misc/FOO.h> -> <sys/FOO.h> 2019-12-10 08:39:37 -05:00
pms7003 kconfig: Clean up header comments and make them consistent 2019-11-04 17:31:27 -05:00
qdec_nrfx drivers: sensors: qdec_nrfx: Fix compilation after HAL update 2020-01-15 16:16:09 +01:00
sht3xd kconfig: Replace some single-symbol 'if's with 'depends on' 2020-02-08 08:32:42 -05:00
si7006 treewide: use full path to sensor.h header 2020-01-26 17:52:12 +01:00
si7060 kconfig: Clean up header comments and make them consistent 2019-11-04 17:31:27 -05:00
stts751 driver/sensor: stts751: update to use new GPIO API 2020-02-05 12:00:36 +01:00
sx9500 drivers: sensor: sx9500: convert to new GPIO API 2020-02-05 12:00:36 +01:00
th02 sensor: th02: Convert to DTS 2019-11-08 07:44:54 -06:00
ti_hdc drivers: ti_hdc: convert to new GPIO API 2020-02-05 12:00:36 +01:00
tmp007 drivers: sensor: tmp007: convert to new GPIO API 2020-02-05 12:00:36 +01:00
tmp112 sensor: tmp112: Convert to DTS 2019-11-08 07:44:54 -06:00
tmp116 sensor: tmp116: Add support for tmp117, fix calculation issues 2019-12-20 20:18:25 -05:00
vl53l0x kconfig: Replace some single-symbol 'if's with 'depends on' 2020-02-08 08:32:42 -05:00
CMakeLists.txt drivers: sensor: add driver for the nxp kinetis temperature sensor 2020-01-16 17:30:42 -06:00
Kconfig drivers: sensor: add driver for the nxp kinetis temperature sensor 2020-01-16 17:30:42 -06:00
sensor_handlers.c
sensor_shell.c treewide: use full path to sensor.h header 2020-01-26 17:52:12 +01:00