Commit graph

8 commits

Author SHA1 Message Date
Matt Ranostay
b74fccad75 iio: health: max30100: correct FIFO check condition
Correct issue that the last entry in FIFO was being read twice due
to an incorrect decrement of entry count variable before condition
check.

Signed-off-by: Matt Ranostay <mranostay@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2016-03-28 10:09:58 +01:00
Arnd Bergmann
0e6071ab76 iio: health/afe4404: mark suspend/resume functions __maybe_unused
The newly added afe4404 driver implements suspend/resume using the
SIMPLE_DEV_PM_OPS() macro, which leaves out references to the actual
functions when CONFIG_PM is disabled, causing a harmless warning:

health/afe4404.c:509:12: error: 'afe4404_suspend' defined but not used
health/afe4404.c:530:12: error: 'afe4404_resume' defined but not used

This marks the functions as __maybe_unused so we don't get those
warnings.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Fixes: 87aec56e27 ("iio: health: Add driver for the TI AFE4404 heart monitor")
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2016-02-17 19:36:01 +00:00
Arnd Bergmann
9e8be75e27 iio: health/afe4403: mark suspend/resume functions __maybe_unused
The newly added afe4403 driver implements suspend/resume using the
SIMPLE_DEV_PM_OPS() macro, which leaves out references to the actual
functions when CONFIG_PM is disabled, causing a harmless warning:

health/afe4403.c:509:12: error: 'afe4403_suspend' defined but not used
health/afe4403.c:530:12: error: 'afe4403_resume' defined but not used

This marks the functions as __maybe_unused so we don't get those
warnings.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Fixes: eec96d1e2d ("iio: health: Add driver for the TI AFE4403 heart monitor")
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2016-02-17 19:35:28 +00:00
Arnd Bergmann
f56293c75b iio: health/afe4403: select REGMAP_SPI
The newly added afe4403 driver uses the regmap facility to abstract
the I2C and SPI access. However, it fails to ensure that regmap_spi
is actually present:

drivers/iio/built-in.o: In function `afe4403_probe':
:(.text+0x9bf8): undefined reference to `__devm_regmap_init_spi'

This adds a Kconfig select statement like the afe4404 I2C driver
has.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Fixes: eec96d1e2d ("iio: health: Add driver for the TI AFE4403 heart monitor")
Acked-by: Andrew F. Davis <afd@ti.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2016-02-17 19:31:06 +00:00
Andrew F. Davis
eec96d1e2d iio: health: Add driver for the TI AFE4403 heart monitor
Add driver for the TI AFE4403 heart rate monitor and pulse oximeter.
This device detects reflected LED light fluctuations and presents an ADC
value to the user space for further signal processing.

Data sheet located here:
http://www.ti.com/product/AFE4403/datasheet

Signed-off-by: Andrew F. Davis <afd@ti.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2016-02-06 21:55:32 +00:00
Andrew F. Davis
87aec56e27 iio: health: Add driver for the TI AFE4404 heart monitor
Add driver for the TI AFE4404 heart rate monitor and pulse oximeter.
This device detects reflected LED light fluctuations and presents an ADC
value to the user space for further signal processing.

Datasheet: http://www.ti.com/product/AFE4404/datasheet

Signed-off-by: Andrew F. Davis <afd@ti.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2016-02-06 18:57:09 +00:00
Matt Ranostay
b11a34607d iio: health: max30100: add config for LED current
Allow the current for both RED and IR LEDs to be set via an device tree
property setting.

This is an optional setting that is useful for applications that have a
known glass attenuation factor.

Signed-off-by: Matt Ranostay <mranostay@gmail.com>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2016-01-03 17:59:49 +00:00
Matt Ranostay
4d33615df5 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.

Signed-off-by: Matt Ranostay <mranostay@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2015-12-12 12:14:37 +00:00