diff --git a/drivers/sensor/max30101/Kconfig b/drivers/sensor/max30101/Kconfig index 834b1f79269..02469c229fd 100644 --- a/drivers/sensor/max30101/Kconfig +++ b/drivers/sensor/max30101/Kconfig @@ -13,6 +13,8 @@ menuconfig MAX30101 if MAX30101 +if !HAS_DTS_I2C_DEVICE + config MAX30101_NAME string prompt "Driver name" @@ -21,9 +23,10 @@ config MAX30101_NAME config MAX30101_I2C_NAME string prompt "I2C device name" - depends on !HAS_DTS_I2C default "I2C_0" +endif # !HAS_DTS_I2C_DEVICE + config MAX30101_SMP_AVE int "Sample averaging" range 0 7 diff --git a/dts/bindings/sensor/max,max30101.yaml b/dts/bindings/sensor/max,max30101.yaml new file mode 100644 index 00000000000..244e1bc054e --- /dev/null +++ b/dts/bindings/sensor/max,max30101.yaml @@ -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" + +...