Skip to content

Commit 6353ba8

Browse files
wm-eisoskartben
authored andcommitted
drivers: sensor: wsen_itds_2533020201601: add sensor driver
Add wsen_itds_2533020201601 driver with the corrected name and compatibility with the hal update as well as added new features. Signed-off-by: Wajdi ELMuhtadi <wajdi.elmuhtadi@we-online.com>
1 parent 3824356 commit 6353ba8

16 files changed

+1765
-0
lines changed

doc/releases/migration-guide-4.2.rst

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,24 @@ Sensors
219219
and :dtcompatible:`meas,ms5837-02ba`. In order to use one of the two variants, the
220220
status property needs to be used as well.
221221

222+
* The :dtcompatible:`we,wsen-itds` driver has been renamed to
223+
:dtcompatible:`we,wsen-itds-2533020201601`.
224+
The Device Tree can be configured as follows:
225+
226+
.. code-block:: devicetree
227+
228+
&i2c0 {
229+
itds:itds-2533020201601@19 {
230+
compatible = "we,wsen-itds-2533020201601";
231+
reg = <0x19>;
232+
odr = "400";
233+
op-mode = "high-perf";
234+
power-mode = "normal";
235+
events-interrupt-gpios = <&gpio1 1 GPIO_ACTIVE_HIGH>;
236+
drdy-interrupt-gpios = < &gpio1 2 GPIO_ACTIVE_HIGH >;
237+
};
238+
};
239+
222240
Serial
223241
=======
224242

doc/releases/release-notes-4.2.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -692,6 +692,7 @@ New Drivers
692692
* :dtcompatible:`pixart,pat9136`
693693
* :dtcompatible:`st,lsm6dsv32x`
694694
* :dtcompatible:`vishay,veml6031`
695+
* :dtcompatible:`we,wsen-itds-2533020201601`
695696

696697
* Serial controller
697698

drivers/sensor/wsen/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
# zephyr-keep-sorted-start
66
add_subdirectory_ifdef(CONFIG_WSEN_HIDS_2525020210002 wsen_hids_2525020210002)
7+
add_subdirectory_ifdef(CONFIG_WSEN_ITDS_2533020201601 wsen_itds_2533020201601)
78
add_subdirectory_ifdef(CONFIG_WSEN_PADS_2511020213301 wsen_pads_2511020213301)
89
add_subdirectory_ifdef(CONFIG_WSEN_PDUS_25131308XXXXX wsen_pdus_25131308XXXXX)
910
add_subdirectory_ifdef(CONFIG_WSEN_TIDS_2521020222501 wsen_tids_2521020222501)

drivers/sensor/wsen/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
# zephyr-keep-sorted-start
66
source "drivers/sensor/wsen/wsen_hids_2525020210002/Kconfig"
7+
source "drivers/sensor/wsen/wsen_itds_2533020201601/Kconfig"
78
source "drivers/sensor/wsen/wsen_pads_2511020213301/Kconfig"
89
source "drivers/sensor/wsen/wsen_pdus_25131308XXXXX/Kconfig"
910
source "drivers/sensor/wsen/wsen_tids_2521020222501/Kconfig"
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_itds_2533020201601.c)
7+
zephyr_library_sources_ifdef(CONFIG_WSEN_ITDS_2533020201601_TRIGGER wsen_itds_2533020201601_trigger.c)
Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
# Copyright (c) 2025 Würth Elektronik eiSos GmbH & Co. KG
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
menuconfig WSEN_ITDS_2533020201601
5+
bool "WSEN-ITDS-2533020201601 3-axis acceleration sensor"
6+
default y
7+
depends on DT_HAS_WE_WSEN_ITDS_2533020201601_ENABLED
8+
select I2C if $(dt_compat_on_bus,$(DT_COMPAT_WE_WSEN_ITDS_2533020201601),i2c)
9+
select SPI if $(dt_compat_on_bus,$(DT_COMPAT_WE_WSEN_ITDS_2533020201601),spi)
10+
select HAS_WESENSORS
11+
help
12+
Enable driver for the WSEN-ITDS I2C/SPI-based acceleration sensor with integrated
13+
temperature sensor.
14+
15+
if WSEN_ITDS_2533020201601
16+
17+
choice WSEN_ITDS_2533020201601_TRIGGER_MODE
18+
prompt "Trigger mode"
19+
default WSEN_ITDS_2533020201601_TRIGGER_NONE
20+
help
21+
Specify the type of triggering to be used by the driver.
22+
23+
config WSEN_ITDS_2533020201601_TRIGGER_NONE
24+
bool "No trigger"
25+
26+
config WSEN_ITDS_2533020201601_TRIGGER_GLOBAL_THREAD
27+
bool "Use global thread"
28+
depends on GPIO
29+
select WSEN_ITDS_2533020201601_TRIGGER
30+
31+
config WSEN_ITDS_2533020201601_TRIGGER_OWN_THREAD
32+
bool "Use own thread"
33+
depends on GPIO
34+
select WSEN_ITDS_2533020201601_TRIGGER
35+
36+
endchoice # WSEN_ITDS_2533020201601_TRIGGER_MODE
37+
38+
config WSEN_ITDS_2533020201601_TRIGGER
39+
bool
40+
41+
config WSEN_ITDS_2533020201601_EVENTS
42+
bool
43+
44+
config WSEN_ITDS_2533020201601_THREAD_PRIORITY
45+
int "Thread priority"
46+
depends on WSEN_ITDS_2533020201601_TRIGGER_OWN_THREAD
47+
default 10
48+
help
49+
Priority of thread used by the driver to handle interrupts.
50+
51+
config WSEN_ITDS_2533020201601_THREAD_STACK_SIZE
52+
int "Thread stack size"
53+
depends on WSEN_ITDS_2533020201601_TRIGGER_OWN_THREAD
54+
default 1024
55+
help
56+
Stack size of thread used by the driver to handle interrupts.
57+
58+
config WSEN_ITDS_2533020201601_TAP
59+
bool "Tap and double tap detection"
60+
depends on WSEN_ITDS_2533020201601_TRIGGER
61+
select WSEN_ITDS_2533020201601_EVENTS
62+
help
63+
Enable tap (single/double) detection
64+
Note that the minimum ODR required for using the tap recognition functionality is 400 Hz.
65+
66+
config WSEN_ITDS_2533020201601_FREEFALL
67+
bool "Free-fall detection"
68+
depends on WSEN_ITDS_2533020201601_TRIGGER
69+
select WSEN_ITDS_2533020201601_EVENTS
70+
help
71+
Enable free-fall detection
72+
73+
config WSEN_ITDS_2533020201601_DELTA
74+
bool "Wake-up detection (SENSOR_TRIG_DELTA)"
75+
depends on WSEN_ITDS_2533020201601_TRIGGER
76+
select WSEN_ITDS_2533020201601_EVENTS
77+
help
78+
Enable wake-up detection (SENSOR_TRIG_DELTA)
79+
80+
endif # WSEN_ITDS_2533020201601

0 commit comments

Comments
 (0)