Skip to content

Commit 4068d41

Browse files
wm-eisoskartben
authored andcommitted
drivers: sensor: wsen_tids_2521020222501: add sensor driver
Add wsen_tids_2521020222501 driver with the corrected name and compatibility with the hal update as well as added new features. Signed-off-by: Wajdi ELMuhtadi <[email protected]>
1 parent c48c15e commit 4068d41

File tree

15 files changed

+891
-0
lines changed

15 files changed

+891
-0
lines changed

doc/releases/migration-guide-4.1.rst

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -301,6 +301,21 @@ Sensors
301301
};
302302
};
303303
304+
* The :dtcompatible:`we,wsen-tids` driver has been renamed to
305+
:dtcompatible:`we,wsen-tids-2521020222501`.
306+
The Device Tree can be configured as follows:
307+
308+
.. code-block:: devicetree
309+
310+
&i2c0 {
311+
tids:tids-2521020222501@3F {
312+
compatible = "we,wsen-tids-2521020222501";
313+
reg = < 0x3F >;
314+
odr = < 25 >;
315+
interrupt-gpios = <&gpio1 1 GPIO_ACTIVE_LOW>;
316+
};
317+
};
318+
304319
Serial
305320
======
306321

doc/releases/release-notes-4.1.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -283,6 +283,9 @@ Drivers and Sensors
283283
* Replaced outdated :dtcompatible:`we,wsen-pdus` differential pressure sensor driver
284284
and renamed it to :dtcompatible:`we,wsen-pdus-25131308XXXXX`.
285285

286+
* Replaced outdated :dtcompatible:`we,wsen-tids` temperature sensor driver
287+
and renamed it to :dtcompatible:`we,wsen-tids-2521020222501`.
288+
286289
* Serial
287290

288291
* SPI

drivers/sensor/wsen/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,5 @@
55
# zephyr-keep-sorted-start
66
add_subdirectory_ifdef(CONFIG_WSEN_HIDS_2525020210002 wsen_hids_2525020210002)
77
add_subdirectory_ifdef(CONFIG_WSEN_PDUS_25131308XXXXX wsen_pdus_25131308XXXXX)
8+
add_subdirectory_ifdef(CONFIG_WSEN_TIDS_2521020222501 wsen_tids_2521020222501)
89
# zephyr-keep-sorted-stop

drivers/sensor/wsen/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,5 @@
55
# zephyr-keep-sorted-start
66
source "drivers/sensor/wsen/wsen_hids_2525020210002/Kconfig"
77
source "drivers/sensor/wsen/wsen_pdus_25131308XXXXX/Kconfig"
8+
source "drivers/sensor/wsen/wsen_tids_2521020222501/Kconfig"
89
# zephyr-keep-sorted-stop
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Copyright (c) 2025 Würth Elektronik eiSos GmbH & Co. KG
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
zephyr_library()
5+
6+
zephyr_library_sources(wsen_tids_2521020222501.c)
7+
zephyr_library_sources_ifdef(CONFIG_WSEN_TIDS_2521020222501_TRIGGER wsen_tids_2521020222501_trigger.c)
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
# Copyright (c) 2025 Würth Elektronik eiSos GmbH & Co. KG
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
menuconfig WSEN_TIDS_2521020222501
5+
bool "WSEN-TIDS-2521020222501 temperature sensor"
6+
default y
7+
depends on DT_HAS_WE_WSEN_TIDS_2521020222501_ENABLED
8+
select I2C
9+
select HAS_WESENSORS
10+
help
11+
Enable driver for the WSEN-TIDS-2521020222501 I2C-based temperature sensor.
12+
13+
if WSEN_TIDS_2521020222501
14+
15+
choice WSEN_TIDS_2521020222501_TRIGGER_MODE
16+
prompt "Trigger mode"
17+
default WSEN_TIDS_2521020222501_TRIGGER_NONE
18+
help
19+
Specify the type of triggering to be used by the driver.
20+
21+
config WSEN_TIDS_2521020222501_TRIGGER_NONE
22+
bool "No trigger"
23+
24+
config WSEN_TIDS_2521020222501_TRIGGER_GLOBAL_THREAD
25+
bool "Use global thread"
26+
depends on GPIO
27+
select WSEN_TIDS_2521020222501_TRIGGER
28+
29+
config WSEN_TIDS_2521020222501_TRIGGER_OWN_THREAD
30+
bool "Use own thread"
31+
depends on GPIO
32+
select WSEN_TIDS_2521020222501_TRIGGER
33+
34+
endchoice # WSEN_TIDS_2521020222501_TRIGGER_MODE
35+
36+
config WSEN_TIDS_2521020222501_TRIGGER
37+
bool
38+
39+
config WSEN_TIDS_2521020222501_THREAD_PRIORITY
40+
int "Thread priority"
41+
depends on WSEN_TIDS_2521020222501_TRIGGER_OWN_THREAD
42+
default 10
43+
help
44+
Priority of thread used by the driver to handle interrupts.
45+
46+
config WSEN_TIDS_2521020222501_THREAD_STACK_SIZE
47+
int "Thread stack size"
48+
depends on WSEN_TIDS_2521020222501_TRIGGER_OWN_THREAD
49+
default 1024
50+
help
51+
Stack size of thread used by the driver to handle interrupts.
52+
53+
endif # WSEN_TIDS_2521020222501

0 commit comments

Comments
 (0)