2019-04-06 09:08:09 -04:00
|
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
|
2024-03-26 14:57:31 -05:00
|
|
|
# zephyr-keep-sorted-start
|
|
|
|
add_subdirectory(adi)
|
2024-03-26 19:08:34 -05:00
|
|
|
add_subdirectory(ams)
|
2024-04-04 18:31:04 -05:00
|
|
|
add_subdirectory(aosong)
|
2024-04-04 18:57:34 -05:00
|
|
|
add_subdirectory(asahi_kasei)
|
2024-03-26 15:13:28 -05:00
|
|
|
add_subdirectory(bosch)
|
2024-04-04 18:50:58 -05:00
|
|
|
add_subdirectory(espressif)
|
2024-04-04 18:38:34 -05:00
|
|
|
add_subdirectory(honeywell)
|
2024-04-04 18:45:50 -05:00
|
|
|
add_subdirectory(infineon)
|
2024-03-27 19:02:02 -05:00
|
|
|
add_subdirectory(ite)
|
2024-03-26 18:21:34 -05:00
|
|
|
add_subdirectory(maxim)
|
2024-04-04 19:03:07 -05:00
|
|
|
add_subdirectory(meas)
|
2024-03-26 18:29:08 -05:00
|
|
|
add_subdirectory(microchip)
|
2024-03-27 19:07:21 -05:00
|
|
|
add_subdirectory(nordic)
|
2024-03-27 19:10:39 -05:00
|
|
|
add_subdirectory(nuvoton)
|
2024-03-26 18:37:54 -05:00
|
|
|
add_subdirectory(nxp)
|
2024-03-27 19:16:07 -05:00
|
|
|
add_subdirectory(rohm)
|
2024-03-27 19:21:00 -05:00
|
|
|
add_subdirectory(seeed)
|
2024-03-27 18:51:06 -05:00
|
|
|
add_subdirectory(sensirion)
|
2024-03-26 18:44:45 -05:00
|
|
|
add_subdirectory(silabs)
|
2024-03-26 15:30:29 -05:00
|
|
|
add_subdirectory(st)
|
2024-03-26 18:57:09 -05:00
|
|
|
add_subdirectory(ti)
|
2024-04-04 18:21:18 -05:00
|
|
|
add_subdirectory(vishay)
|
2024-03-27 18:56:30 -05:00
|
|
|
add_subdirectory(wsen)
|
2024-03-26 14:57:31 -05:00
|
|
|
# zephyr-keep-sorted-stop
|
|
|
|
|
2023-05-20 18:43:50 -04:00
|
|
|
add_subdirectory_ifdef(CONFIG_A01NYUB a01nyub)
|
2023-08-07 12:06:30 +00:00
|
|
|
add_subdirectory_ifdef(CONFIG_AMD_SB_TSI amd_sb_tsi)
|
2023-05-19 15:09:19 +01:00
|
|
|
add_subdirectory_ifdef(CONFIG_AMG88XX amg88xx)
|
|
|
|
add_subdirectory_ifdef(CONFIG_APDS9960 apds9960)
|
2023-06-12 14:30:00 +10:00
|
|
|
add_subdirectory_ifdef(CONFIG_CURRENT_AMP current_amp)
|
2024-01-08 20:13:26 -03:00
|
|
|
add_subdirectory_ifdef(CONFIG_ENS160 ens160)
|
2023-10-27 15:17:44 +02:00
|
|
|
add_subdirectory_ifdef(CONFIG_EXPLORIR_M explorir_m)
|
2023-08-01 12:09:27 +00:00
|
|
|
add_subdirectory_ifdef(CONFIG_F75303 f75303)
|
2024-02-01 19:14:14 +01:00
|
|
|
add_subdirectory_ifdef(CONFIG_FCX_MLDX5 fcx_mldx5)
|
2023-05-19 15:09:19 +01:00
|
|
|
add_subdirectory_ifdef(CONFIG_GROW_R502A grow_r502a)
|
|
|
|
add_subdirectory_ifdef(CONFIG_HP206C hp206c)
|
2023-09-22 17:23:29 -07:00
|
|
|
add_subdirectory_ifdef(CONFIG_HS300X hs300x)
|
2024-03-11 13:41:59 -05:00
|
|
|
add_subdirectory_ifdef(CONFIG_ICM42605 tdk/icm42605)
|
|
|
|
add_subdirectory_ifdef(CONFIG_ICM42670 tdk/icm42670)
|
|
|
|
add_subdirectory_ifdef(CONFIG_ICM42688 tdk/icm42688)
|
|
|
|
add_subdirectory_ifdef(CONFIG_ICP10125 tdk/icp10125)
|
2023-07-19 23:13:31 -04:00
|
|
|
add_subdirectory_ifdef(CONFIG_IST8310 ist8310)
|
2023-05-19 15:09:19 +01:00
|
|
|
add_subdirectory_ifdef(CONFIG_ISL29035 isl29035)
|
2024-02-14 14:31:00 -03:00
|
|
|
add_subdirectory_ifdef(CONFIG_LM35 lm35)
|
2023-05-19 15:09:19 +01:00
|
|
|
add_subdirectory_ifdef(CONFIG_LM75 lm75)
|
|
|
|
add_subdirectory_ifdef(CONFIG_LM77 lm77)
|
2023-08-02 16:01:21 +02:00
|
|
|
add_subdirectory_ifdef(CONFIG_LTR_F216A ltrf216a)
|
2023-08-19 12:59:26 +05:30
|
|
|
add_subdirectory_ifdef(CONFIG_MC3419 mc3419)
|
2023-05-19 15:09:19 +01:00
|
|
|
add_subdirectory_ifdef(CONFIG_MHZ19B mhz19b)
|
2024-03-11 13:41:59 -05:00
|
|
|
add_subdirectory_ifdef(CONFIG_MPU6050 tdk/mpu6050)
|
|
|
|
add_subdirectory_ifdef(CONFIG_MPU9250 tdk/mpu9250)
|
2024-03-29 08:56:57 +01:00
|
|
|
add_subdirectory_ifdef(CONFIG_NCT75 nct75)
|
drivers: sensor: zephyr_thermistor: refactor driver
Refactor driver to align a bit more with its Linux counterpart, ie,
ntc_thermistor. This driver did quite a few _unconventional_ things,
like using "zephyr," compatibles, a dedicated node for pre-computed
compensation table (referenced by the actual pseudo-device node), etc.
The comparison helper function should likely be simplified as well (to
avoid the need for custom wrapper for bsearch), but this can be done
later.
In this refactor, each thermistor gets a compatible, e.g. "epcos,xxxx".
Compatibles are known by the driver, so are compensation tables. This
simplifies devicetree files. There's no need to bother about
compensation tables in **every** board file if Zephyr supports a certain
NTC model.
In general we should respect Linux bindings, which in the end influence
how drivers are implemented. In this case, this principle resulted in
simplified, easier to use code.
For future developers, this is how support for a new NTC can be added:
1. Add to the end of the driver:
```c
#undef DT_DRV_COMPAT
#define DT_DRV_COMPAT vnd_model
static __unused const struct ntc_compensation comp_vnd_model[] = {
{ x, y },
...,
};
#define DT_INST_FOREACH_STATUS_OKAY_VARGS(NTC_THERMISTOR_DEV_INIT,
DT_DRV_COMPAT, comp_vnd_model)
```
3. In driver's Kconfig make sure it depends on
DT_HAS_$DT_DRV_COMPAT$_ENABLED
Note: $X$ means _value_ of X.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2023-04-28 11:36:14 +02:00
|
|
|
add_subdirectory_ifdef(CONFIG_NTC_THERMISTOR ntc_thermistor)
|
2023-05-19 15:09:19 +01:00
|
|
|
add_subdirectory_ifdef(CONFIG_PMS7003 pms7003)
|
|
|
|
add_subdirectory_ifdef(CONFIG_QDEC_SAM qdec_sam)
|
|
|
|
add_subdirectory_ifdef(CONFIG_RPI_PICO_TEMP rpi_pico_temp)
|
|
|
|
add_subdirectory_ifdef(CONFIG_S11059 s11059)
|
|
|
|
add_subdirectory_ifdef(CONFIG_SBS_GAUGE sbs_gauge)
|
|
|
|
add_subdirectory_ifdef(CONFIG_SX9500 sx9500)
|
|
|
|
add_subdirectory_ifdef(CONFIG_TH02 th02)
|
2024-03-19 13:44:04 +01:00
|
|
|
add_subdirectory_ifdef(CONFIG_TSIC_XX6 tsic_xx6)
|
2023-06-11 19:23:44 +10:00
|
|
|
add_subdirectory_ifdef(CONFIG_VOLTAGE_DIVIDER voltage_divider)
|
2024-03-15 10:46:32 +08:00
|
|
|
add_subdirectory_ifdef(CONFIG_TACH_ENE_KB1200 ene_tach_kb1200)
|
2017-10-27 15:43:34 +02:00
|
|
|
|
2023-05-24 15:27:04 -07:00
|
|
|
zephyr_syscall_header(${ZEPHYR_BASE}/include/zephyr/drivers/sensor.h)
|
|
|
|
|
2021-08-04 14:40:46 -07:00
|
|
|
zephyr_library()
|
2023-05-19 15:10:41 +01:00
|
|
|
zephyr_library_property(ALLOW_EMPTY TRUE)
|
|
|
|
|
2021-08-04 14:40:46 -07:00
|
|
|
zephyr_library_sources_ifdef(CONFIG_USERSPACE sensor_handlers.c)
|
|
|
|
zephyr_library_sources_ifdef(CONFIG_SENSOR_SHELL sensor_shell.c)
|
2023-06-05 20:26:19 -06:00
|
|
|
zephyr_library_sources_ifdef(CONFIG_SENSOR_SHELL_STREAM sensor_shell_stream.c)
|
2021-08-04 14:40:46 -07:00
|
|
|
zephyr_library_sources_ifdef(CONFIG_SENSOR_SHELL_BATTERY shell_battery.c)
|
2023-04-25 23:17:46 -06:00
|
|
|
zephyr_library_sources_ifdef(CONFIG_SENSOR_ASYNC_API sensor_decoders_init.c default_rtio_sensor.c)
|