zephyr/dts/bindings/sensor/bosch,bmi270.yaml
Andreas Wiesinger cb76aab9d3 dts: sensor: bosch,bmi270: Move interrupt handling to parent binding
Moved the interrupt handling code from a bus-specific binding file to
the parent binding file. This modification ensures that interrupt
handling, which is inherently independent of the type of BUS used
(either i2c or spi), is located in the appropriate location within
the code.

Previously, this code was found in a bus-specific file, despite its
functionality being applicable to all buses. This change ensures a
more logical placement and will help to maintain coherence within the
codebase.

This change aligns with the existing implementation where the interrupt
handling code already operates independently of the BUS type.

Tested this on a nrf52840 with a bmi270 on spi bus with the sample from
zephyr/samples/sensor/bmi270 by adding an interrupt handler in main.c
which uses the bmi270_trigger.c implementation and verified this with
breakpoints and log output.

Added the irq-gpios to tests/drivers/build_all/sensor/i2c.dtsi and
tests/drivers/build_all/sensor/spi.dtsi and fixed whitespace formatting.

Fixes: #58843

Signed-off-by: Andreas Wiesinger <awiesing90@gmail.com>
2023-09-13 16:26:24 +02:00

18 lines
468 B
YAML

# Copyright (c) 2021, Bosch Sensortec GmbH
# Copyright (c) 2022, Nordic Semiconductor ASA
# SPDX-License-Identifier: Apache-2.0
description: |
The BMI270 is an inertial measurement unit. See more info at:
https://www.bosch-sensortec.com/products/motion-sensors/imus/bmi270.html
include: sensor-device.yaml
compatible: "bosch,bmi270"
properties:
irq-gpios:
type: phandle-array
description: |
The INT1 and (optional) INT2 signal connections.