dts: sensor: Add dts yaml bindings for the fxos8700 sensor
Adds dts yaml bindings for the fxos8700 sensor to allow the sensor driver name, i2c driver name, and i2c address to be extracted from dts instead of kconfig. Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
This commit is contained in:
parent
e92df9c01d
commit
88d5949b94
2 changed files with 27 additions and 1 deletions
|
@ -12,6 +12,8 @@ menuconfig FXOS8700
|
|||
help
|
||||
Enable driver for the FXOS8700 accelerometer/magnetometer
|
||||
|
||||
if !HAS_DTS_I2C_DEVICE
|
||||
|
||||
config FXOS8700_NAME
|
||||
string "Device name"
|
||||
depends on FXOS8700
|
||||
|
@ -19,7 +21,7 @@ config FXOS8700_NAME
|
|||
|
||||
config FXOS8700_I2C_NAME
|
||||
string "I2C device name"
|
||||
depends on FXOS8700 && !HAS_DTS_I2C
|
||||
depends on FXOS8700
|
||||
default I2C_0_NAME
|
||||
|
||||
config FXOS8700_I2C_ADDRESS
|
||||
|
@ -31,6 +33,8 @@ config FXOS8700_I2C_ADDRESS
|
|||
The I2C slave address can be configured by the SA0 and SA1 input
|
||||
pins. This option should usually be set by the board defconfig.
|
||||
|
||||
endif # !HAS_DTS_I2C_DEVICE
|
||||
|
||||
config FXOS8700_WHOAMI
|
||||
hex "WHOAMI value"
|
||||
depends on FXOS8700
|
||||
|
|
22
dts/bindings/sensor/nxp,fxos8700.yaml
Normal file
22
dts/bindings/sensor/nxp,fxos8700.yaml
Normal file
|
@ -0,0 +1,22 @@
|
|||
#
|
||||
# Copyright (c) 2018, NXP
|
||||
#
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
#
|
||||
---
|
||||
title: FXOS8700 6-axis accelerometer/magnetometer
|
||||
id: nxp,fxos8700
|
||||
version: 0.1
|
||||
|
||||
description: >
|
||||
This is a representation of the FXOS8700 6-axis accelerometer/magnetometer
|
||||
sensor
|
||||
|
||||
inherits:
|
||||
!include i2c-device.yaml
|
||||
|
||||
properties:
|
||||
compatible:
|
||||
constraint: "nxp,fxos8700"
|
||||
|
||||
...
|
Loading…
Add table
Add a link
Reference in a new issue