-
Notifications
You must be signed in to change notification settings - Fork 6.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
devicetree: Add a first sensor to dts
Each sensor would be expected to describe some common attributes in an include file like this and be included in the board/soc dts where the sensor is used. In this way common sensor channels and descriptions would be available. Signed-off-by: Tom Burdick <[email protected]>
- Loading branch information
Showing
2 changed files
with
19 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
/* | ||
* Copyright (c) 2023 Intel Corporation | ||
* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
#include <zephyr/dt-bindings/sensor/channel.h> | ||
#include <zephyr/dt-bindings/sensor/field.h> | ||
|
||
compatible = "bosch,bmi160"; | ||
|
||
accel@0 { | ||
compatible = "zephyr,sensor-channel"; | ||
channel-type = SENSOR_CHANNEL_ACCELERATION; | ||
channel-index = 0; | ||
channel-fields = <SENSOR_FIELD_X SENSOR_FIELD_Y SENSOR_FIELD_Z>; | ||
} | ||
|