Skip to content

Commit b204431

Browse files
driver: sensor: Fix accelerometer interrupts (#81)
lis2dw12 demo driver side changes from the last PR. Signed-off-by: Kevin King <kevin.king101@t-mobile.com> Signed-off-by: Jared Baumann <jared.baumann8@t-mobile.com> Co-authored-by: Jared Baumann <jared.baumann8@t-mobile.com>
1 parent 8dedcd1 commit b204431

File tree

6 files changed

+389
-231
lines changed

6 files changed

+389
-231
lines changed

CODEOWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
/.github/workflows/ @ryanhagen-tmo @eniolaodufuwa-tmo
1111
/west.yml @ryanhagen-tmo @eniolaodufuwa-tmo
1212
include/zephyr/drivers/sensor/tsl2540.h @jtbaumann
13+
include/zephyr/drivers/sensor/lis2dw12.h @jtbaumann @kking-1601
1314
samples/subsys/shell/fs/boards/tmo_dev_edge.conf @jtbaumann
1415
samples/bluetooth/peripheral_hr/boards/tmo_dev_edge.conf @jtbaumann
1516
samples/bluetooth/peripheral_ht/boards/tmo_dev_edge.conf @jtbaumann

boards/arm/tmo_dev_edge/tmo_dev_edge.dts

Lines changed: 31 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -117,11 +117,11 @@
117117

118118
&usart1 {
119119
// UART_1
120-
current-speed = <115200>;
121-
location-rx = <GECKO_LOCATION(20) GECKO_PORT_D GECKO_PIN(13)>;
122-
location-tx = <GECKO_LOCATION(20) GECKO_PORT_D GECKO_PIN(12)>;
123-
location-cts = <GECKO_LOCATION(15) GECKO_PORT_D GECKO_PIN(11)>;
124-
location-rts = <GECKO_LOCATION(13) GECKO_PORT_D GECKO_PIN(10)>;
120+
current-speed = <115200>;
121+
location-rx = <GECKO_LOCATION(20) GECKO_PORT_D GECKO_PIN(13)>;
122+
location-tx = <GECKO_LOCATION(20) GECKO_PORT_D GECKO_PIN(12)>;
123+
location-cts = <GECKO_LOCATION(15) GECKO_PORT_D GECKO_PIN(11)>;
124+
location-rts = <GECKO_LOCATION(13) GECKO_PORT_D GECKO_PIN(10)>;
125125
hw-flow-control;
126126
status = "okay";
127127

@@ -130,13 +130,13 @@
130130
// murata,1sc
131131
compatible = "murata,1sc";
132132
mdm-wake-host-gpios = <&gpiod 14 GPIO_ACTIVE_HIGH>;
133-
mdm-wake-mdm-gpios = <&gpiod 15 GPIO_ACTIVE_HIGH>;
134-
mdm-rst-done-gpios = <&gpiod 9 GPIO_ACTIVE_HIGH>;
135-
mdm-reset-gpios = <&gpiod 8 GPIO_ACTIVE_HIGH>;
136-
mdm-rx-gpios = <&gpiod 13 GPIO_ACTIVE_HIGH>;
137-
mdm-tx-gpios = <&gpiod 12 GPIO_ACTIVE_HIGH>;
138-
mdm-cts-gpios = <&gpiod 11 GPIO_ACTIVE_HIGH>;
139-
mdm-rts-gpios = <&gpiod 10 GPIO_ACTIVE_HIGH>;
133+
mdm-wake-mdm-gpios = <&gpiod 15 GPIO_ACTIVE_HIGH>;
134+
mdm-rst-done-gpios = <&gpiod 9 GPIO_ACTIVE_HIGH>;
135+
mdm-reset-gpios = <&gpiod 8 GPIO_ACTIVE_HIGH>;
136+
mdm-rx-gpios = <&gpiod 13 GPIO_ACTIVE_HIGH>;
137+
mdm-tx-gpios = <&gpiod 12 GPIO_ACTIVE_HIGH>;
138+
mdm-cts-gpios = <&gpiod 11 GPIO_ACTIVE_HIGH>;
139+
mdm-rts-gpios = <&gpiod 10 GPIO_ACTIVE_HIGH>;
140140
status = "okay";
141141
};
142142
};
@@ -197,12 +197,18 @@
197197
compatible = "silabs,rs9116w";
198198
reg = <0>;
199199
spi-max-frequency = <6400000>;
200-
int-gpios = <&gpioa 6 GPIO_ACTIVE_HIGH>; // input
201-
reset-gpios = <&gpioa 9 GPIO_ACTIVE_LOW>; // output init LOW
202-
sleep-wake-indication-gpios = <&gpioa 5 GPIO_ACTIVE_LOW>; // input
203-
wake-on-wireless-gpios = <&gpioa 3 GPIO_ACTIVE_HIGH>; // input
204-
sleep-wake-confirmation-gpios = <&gpioa 4 GPIO_ACTIVE_HIGH>; // output init HIGH
205-
poc-gpios = <&gpioa 8 GPIO_ACTIVE_LOW>; // output init LOW
200+
// input
201+
int-gpios = <&gpioa 6 GPIO_ACTIVE_HIGH>;
202+
// output init LOW
203+
reset-gpios = <&gpioa 9 GPIO_ACTIVE_LOW>;
204+
// input
205+
sleep-wake-indication-gpios = <&gpioa 5 GPIO_ACTIVE_LOW>;
206+
// input
207+
wake-on-wireless-gpios = <&gpioa 3 GPIO_ACTIVE_HIGH>;
208+
// output init HIGH
209+
sleep-wake-confirmation-gpios = <&gpioa 4 GPIO_ACTIVE_HIGH>;
210+
// output init LOW
211+
poc-gpios = <&gpioa 8 GPIO_ACTIVE_LOW>;
206212
status = "okay";
207213
};
208214
};
@@ -232,7 +238,13 @@
232238
reg = <0x18 0x4>;
233239
status = "okay";
234240
// Note int2 is not used
235-
irq-gpios = <&gpiob 8 GPIO_ACTIVE_HIGH>;
241+
irq-gpios = <&gpiob 8 GPIO_ACTIVE_HIGH>;
242+
range = <2>;
243+
power-mode = <4>;
244+
tap-mode = <1>;
245+
tap-threshold = <12>, <12>, <14>;
246+
tap-latency = <0xF>;
247+
// label = "LIS2DW12";
236248
};
237249

238250
/* Sony GNSS receiver */

0 commit comments

Comments
 (0)