iio: light: add MAX30100 oximeter driver support
Subsystems (2)
v3 cover iio: light: add MAX30100 oximeter driver support
Changes from v2:
* Add sign extend to temp sensor results
* Measurement function added to deal with non-incrementing FIFO address
* Added FIFO overflow checking support
* Removed some magic values into defines
Important Notes:
* smoke tested on real hardware
Matt Ranostay (1):
iio: light: add MAX30100 oximeter driver support
.../devicetree/bindings/iio/health/max30100.txt | 21 + drivers/iio/Kconfig | 1 + drivers/iio/Makefile | 1 + drivers/iio/health/Kconfig | 21 + drivers/iio/health/Makefile | 7 + drivers/iio/health/max30100.c | 465 +++++++++++++++++++++ 6 files changed, 516 insertions(+) create mode 100644 Documentation/devicetree/bindings/iio/health/max30100.txt create mode 100644 drivers/iio/health/Kconfig create mode 100644 drivers/iio/health/Makefile create mode 100644 drivers/iio/health/max30100.c
Signature · 1 line
1.9.1
PATCH v3 1/1 iio: light: add MAX30100 oximeter driver support
MAX30100 is an heart rate and pulse oximeter sensor that works using two LEDS of different wavelengths, and detecting the light reflected back.
This patchset adds support for both IR and RED LED channels which can be processed in userspace to determine heart rate and blood oxygen levels.
--- .../devicetree/bindings/iio/health/max30100.txt | 21 + drivers/iio/Kconfig | 1 + drivers/iio/Makefile | 1 + drivers/iio/health/Kconfig | 21 + drivers/iio/health/Makefile | 7 + drivers/iio/health/max30100.c | 465 +++++++++++++++++++++ 6 files changed, 516 insertions(+) create mode 100644 Documentation/devicetree/bindings/iio/health/max30100.txt create mode 100644 drivers/iio/health/Kconfig create mode 100644 drivers/iio/health/Makefile create mode 100644 drivers/iio/health/max30100.c
Documentation/devicetree/bindings/iio/health/max30100.txt new file +21 -0
@@ -0,0 +1,21 @@ +Maxim MAX30100 heart rate and pulse oximeter sensor + +* https://datasheets.maximintegrated.com/en/ds/MAX30100.pdf + +Required properties: + - compatible: must be "maxim,max30100" + - reg: the I2c address of the sensor + - interrupt-parent: should be the phandle for the interrupt controller + - interrupts : the sole interrupt generated by the device + + Refer to interrupt-controller/interrupts.txt for generic + interrupt client node bindings. + +Example: + +max30100@057 { + compatible = "maxim,max30100"; + reg = <57>; + interrupt-parent = <&gpio1>; + interrupts = <16 2>; +};
drivers/iio/Kconfig +1 -0
@@ -68,6 +68,7 @@ source "drivers/iio/common/Kconfig" source "drivers/iio/dac/Kconfig" source "drivers/iio/frequency/Kconfig" source "drivers/iio/gyro/Kconfig" +source "drivers/iio/health/Kconfig" source "drivers/iio/humidity/Kconfig" source "drivers/iio/imu/Kconfig" source "drivers/iio/light/Kconfig"
drivers/iio/Makefile +1 -0
@@ -20,6 +20,7 @@ obj-y += common/ obj-y += dac/ obj-y += gyro/ obj-y += frequency/ +obj-y += health/ obj-y += humidity/ obj-y += imu/ obj-y += light/
drivers/iio/health/Kconfig new file +21 -0
@@ -0,0 +1,21 @@ +# +# Health sensors +# +# When adding new entries keep the list in alphabetical order + +menu "Health sensors" + +config MAX30100 + tristate "MAX30100 heart rate and pulse oximeter sensor" + depends on I2C + select REGMAP_I2C + select IIO_BUFFER + select IIO_KFIFO_BUF + help + Say Y here to build I2C interface support for the Maxim + MAX30100 heart rate, and pulse oximeter sensor. + + To compile this driver as a module, choose M here: the + module will be called max30100 + +endmenu
drivers/iio/health/Makefile new file +7 -0
@@ -0,0 +1,7 @@ +# +# Makefile for IIO Health sensors +# + +# When adding new entries keep the list in alphabetical order + +obj-$(CONFIG_MAX30100) += max30100.o
drivers/iio/health/max30100.c new file +465 -0
465 lines not on this page · raw message
Signature · 1 line
1.9.1