dts: sensor: Add dts yaml bindings for the max30101 sensor

Adds dts yaml bindings for the max30101 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:
Maureen Helm 2018-01-16 07:54:41 -06:00 committed by Kumar Gala
commit 641aa5c58a
2 changed files with 25 additions and 1 deletions

View file

@ -13,6 +13,8 @@ menuconfig MAX30101
if MAX30101 if MAX30101
if !HAS_DTS_I2C_DEVICE
config MAX30101_NAME config MAX30101_NAME
string string
prompt "Driver name" prompt "Driver name"
@ -21,9 +23,10 @@ config MAX30101_NAME
config MAX30101_I2C_NAME config MAX30101_I2C_NAME
string string
prompt "I2C device name" prompt "I2C device name"
depends on !HAS_DTS_I2C
default "I2C_0" default "I2C_0"
endif # !HAS_DTS_I2C_DEVICE
config MAX30101_SMP_AVE config MAX30101_SMP_AVE
int "Sample averaging" int "Sample averaging"
range 0 7 range 0 7

View file

@ -0,0 +1,21 @@
#
# Copyright (c) 2018, NXP
#
# SPDX-License-Identifier: Apache-2.0
#
---
title: MAX30101 heart rate sensor
id: nxp,max30101
version: 0.1
description: >
This is a representation of the MAX30101 heart rate sensor
inherits:
!include i2c-device.yaml
properties:
compatible:
constraint: "max,max30101"
...