Skip to content

Commit 03b075d

Browse files
wm-eisoskartben
authored andcommitted
drivers: sensor: wsen_pads_2511020213301: add sensor driver
Add wsen_pads_2511020213301 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 19b7eec commit 03b075d

17 files changed

+1191
-0
lines changed

doc/releases/migration-guide-4.1.rst

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -328,6 +328,21 @@ SDHC
328328
Sensors
329329
=======
330330

331+
* The :dtcompatible:`we,wsen-pads` driver has been renamed to
332+
:dtcompatible:`we,wsen-pads-2511020213301`.
333+
The Device Tree can be configured as follows:
334+
335+
.. code-block:: devicetree
336+
337+
&i2c0 {
338+
pads:pads-2511020213301@5d {
339+
compatible = "we,wsen-pads-2511020213301";
340+
reg = <0x5d>;
341+
odr = < 10 >;
342+
interrupt-gpios = <&gpio1 1 GPIO_ACTIVE_HIGH>;
343+
};
344+
};
345+
331346
* The :dtcompatible:`we,wsen-pdus` driver has been renamed to
332347
:dtcompatible:`we,wsen-pdus-25131308XXXXX`.
333348
The Device Tree can be configured as follows:

doc/releases/release-notes-4.1.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -535,6 +535,7 @@ New Drivers
535535
* :dtcompatible:`st,lsm6dsv16x`
536536
* :dtcompatible:`ti,tmag3001`
537537
* :dtcompatible:`ti,tmp435`
538+
* :dtcompatible:`we,wsen-pads-2511020213301`
538539
* :dtcompatible:`we,wsen-pdus-25131308XXXXX`
539540
* :dtcompatible:`we,wsen-tids-2521020222501`
540541

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_PADS_2511020213301 wsen_pads_2511020213301)
78
add_subdirectory_ifdef(CONFIG_WSEN_PDUS_25131308XXXXX wsen_pdus_25131308XXXXX)
89
add_subdirectory_ifdef(CONFIG_WSEN_TIDS_2521020222501 wsen_tids_2521020222501)
910
# zephyr-keep-sorted-stop

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_pads_2511020213301/Kconfig"
78
source "drivers/sensor/wsen/wsen_pdus_25131308XXXXX/Kconfig"
89
source "drivers/sensor/wsen/wsen_tids_2521020222501/Kconfig"
910
# 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_pads_2511020213301.c)
7+
zephyr_library_sources_ifdef(CONFIG_WSEN_PADS_2511020213301_TRIGGER wsen_pads_2511020213301_trigger.c)
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
# Copyright (c) 2025 Würth Elektronik eiSos GmbH & Co. KG
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
menuconfig WSEN_PADS_2511020213301
5+
bool "WSEN-PADS-2511020213301 absolute pressure and temperature sensor"
6+
default y
7+
depends on DT_HAS_WE_WSEN_PADS_2511020213301_ENABLED
8+
select I2C if $(dt_compat_on_bus,$(DT_COMPAT_WE_WSEN_PADS),i2c)
9+
select SPI if $(dt_compat_on_bus,$(DT_COMPAT_WE_WSEN_PADS),spi)
10+
select HAS_WESENSORS
11+
help
12+
Enable driver for the WSEN-PADS-2511020213301 I2C/SPI-based absolute pressure sensor with integrated
13+
temperature sensor.
14+
15+
if WSEN_PADS_2511020213301
16+
17+
choice WSEN_PADS_2511020213301_TRIGGER_MODE
18+
prompt "Trigger mode"
19+
default WSEN_PADS_2511020213301_TRIGGER_NONE
20+
help
21+
Specify the type of triggering to be used by the driver.
22+
23+
config WSEN_PADS_2511020213301_TRIGGER_NONE
24+
bool "No trigger"
25+
26+
config WSEN_PADS_2511020213301_TRIGGER_GLOBAL_THREAD
27+
bool "Use global thread"
28+
depends on GPIO
29+
select WSEN_PADS_2511020213301_TRIGGER
30+
31+
config WSEN_PADS_2511020213301_TRIGGER_OWN_THREAD
32+
bool "Use own thread"
33+
depends on GPIO
34+
select WSEN_PADS_2511020213301_TRIGGER
35+
36+
endchoice # WSEN_PADS_2511020213301_TRIGGER_MODE
37+
38+
config WSEN_PADS_2511020213301_TRIGGER
39+
bool
40+
41+
config WSEN_PADS_2511020213301_THREAD_PRIORITY
42+
int "Thread priority"
43+
depends on WSEN_PADS_2511020213301_TRIGGER_OWN_THREAD
44+
default 10
45+
help
46+
Priority of thread used by the driver to handle interrupts.
47+
48+
config WSEN_PADS_2511020213301_THREAD_STACK_SIZE
49+
int "Thread stack size"
50+
depends on WSEN_PADS_2511020213301_TRIGGER_OWN_THREAD
51+
default 1024
52+
help
53+
Stack size of thread used by the driver to handle interrupts.
54+
55+
config WSEN_PADS_2511020213301_PRESSURE_THRESHOLD
56+
bool "Pressure threshold triggers"
57+
depends on WSEN_PADS_2511020213301_TRIGGER
58+
help
59+
Allows you to set up triggers for high and/or low pressure thresholds.
60+
if activated then data ready trigger can't be set up.
61+
62+
endif # WSEN_PADS_2511020213301

0 commit comments

Comments
 (0)