File tree Expand file tree Collapse file tree 4 files changed +10
-4
lines changed Expand file tree Collapse file tree 4 files changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -901,6 +901,7 @@ const struct bmi160_device_config bmi160_config = {
901901#if defined(CONFIG_BMI160_TRIGGER )
902902 .gpio_port = DT_INST_0_BOSCH_BMI160_INT_GPIOS_CONTROLLER ,
903903 .int_pin = DT_INST_0_BOSCH_BMI160_INT_GPIOS_PIN ,
904+ .int_flags = DT_INST_0_BOSCH_BMI160_INT_GPIOS_FLAGS ,
904905#endif
905906};
906907
Original file line number Diff line number Diff line change @@ -386,7 +386,8 @@ struct bmi160_range {
386386struct bmi160_device_config {
387387#if defined(CONFIG_BMI160_TRIGGER )
388388 const char * gpio_port ;
389- u8_t int_pin ;
389+ gpio_pin_t int_pin ;
390+ gpio_devicetree_flags_t int_flags ;
390391#endif
391392};
392393
Original file line number Diff line number Diff line change @@ -301,15 +301,15 @@ int bmi160_trigger_mode_init(struct device *dev)
301301 }
302302
303303 gpio_pin_configure (bmi160 -> gpio , cfg -> int_pin ,
304- GPIO_DIR_IN | GPIO_INT | GPIO_INT_EDGE |
305- GPIO_INT_ACTIVE_LOW | GPIO_INT_DEBOUNCE );
304+ GPIO_INPUT | cfg -> int_flags );
306305
307306 gpio_init_callback (& bmi160 -> gpio_cb ,
308307 bmi160_gpio_callback ,
309308 BIT (cfg -> int_pin ));
310309
311310 gpio_add_callback (bmi160 -> gpio , & bmi160 -> gpio_cb );
312- gpio_pin_enable_callback (bmi160 -> gpio , cfg -> int_pin );
311+ gpio_pin_interrupt_configure (bmi160 -> gpio , cfg -> int_pin ,
312+ GPIO_INT_EDGE_TO_ACTIVE );
313313
314314 return bmi160_byte_write (dev , BMI160_REG_INT_OUT_CTRL ,
315315 BMI160_INT1_OUT_EN | BMI160_INT1_EDGE_CTRL );
Original file line number Diff line number Diff line change @@ -14,3 +14,7 @@ properties:
1414 int-gpios :
1515 type : phandle-array
1616 required : false
17+ description : |
18+ This property specifies the connection for INT1, because the
19+ Zephyr driver maps all interrupts to INT1. The signal defaults
20+ to output low when produced by the sensor.
You can’t perform that action at this time.
0 commit comments