Skip to content

Commit 72b2031

Browse files
deveritec-rosccarlescufi
authored andcommitted
drivers: set LIS2DH default trigger mode to "EDGE_BOTH"
Previous value just activated the ability to trigger for both edges, without (de)-activating the gpio. This caused an assrtion error in GPIO.h. Fixes zephyrproject-rtos#71227 Signed-off-by: Juliane Schulze <[email protected]>
1 parent 0079ab1 commit 72b2031

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

drivers/sensor/st/lis2dh/lis2dh_trigger.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ LOG_MODULE_DECLARE(lis2dh, CONFIG_SENSOR_LOG_LEVEL);
1919
#include "lis2dh.h"
2020

2121
static const gpio_flags_t gpio_int_cfg[5] = {
22-
GPIO_INT_EDGE,
22+
GPIO_INT_EDGE_BOTH,
2323
GPIO_INT_EDGE_RISING,
2424
GPIO_INT_EDGE_FALLING,
2525
GPIO_INT_LEVEL_HIGH,

dts/bindings/sensor/st,lis2dh-common.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ properties:
3434
The default of 0 is the most common situation to avoid multiple interrupts
3535
to be triggered by same event.
3636
37-
- 0 # LIS2DH_DT_GPIO_INT_EDGE
37+
- 0 # LIS2DH_DT_GPIO_INT_EDGE_BOTH
3838
- 1 # LIS2DH_DT_GPIO_INT_EDGE_RISING
3939
- 2 # LIS2DH_DT_GPIO_INT_EDGE_FALLING
4040
- 3 # LIS2DH_DT_GPIO_INT_LEVEL_HIGH
@@ -51,7 +51,7 @@ properties:
5151
The default of 0 is the most common situation to avoid multiple interrupts
5252
to be triggered by same event.
5353
54-
- 0 # LIS2DH_DT_GPIO_INT_EDGE
54+
- 0 # LIS2DH_DT_GPIO_INT_EDGE_BOTH
5555
- 1 # LIS2DH_DT_GPIO_INT_EDGE_RISING
5656
- 2 # LIS2DH_DT_GPIO_INT_EDGE_FALLING
5757
- 3 # LIS2DH_DT_GPIO_INT_LEVEL_HIGH

include/zephyr/dt-bindings/sensor/lis2dh.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
#define ZEPHYR_INCLUDE_DT_BINDINGS_ST_LIS2DH_H_
88

99
/* GPIO interrupt configuration */
10-
#define LIS2DH_DT_GPIO_INT_EDGE 0
10+
#define LIS2DH_DT_GPIO_INT_EDGE_BOTH 0
1111
#define LIS2DH_DT_GPIO_INT_EDGE_RISING 1
1212
#define LIS2DH_DT_GPIO_INT_EDGE_FALLING 2
1313
#define LIS2DH_DT_GPIO_INT_LEVEL_HIGH 3

0 commit comments

Comments
 (0)