summaryrefslogtreecommitdiffstats
path: root/drivers/iio/health/afe440x.h
Commit message (Collapse)AuthorAgeFilesLines
* iio: health/afe440x: Use regmap fieldsAndrew F. Davis2016-05-041-22/+3Star
| | | | | | | | These drivers can use regmap fields to access fields in registers, this allows us to remove some macros/defines and simplify code, do this here. Signed-off-by: Andrew F. Davis <afd@ti.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* iio: health/afe440x: Remove channel namesAndrew F. Davis2016-05-041-4/+4
| | | | | | | | | | | | | | | | | These AFEs have 4 ADC mesuring stages (called LED2, ALED2, LED1, and ALED1 in the datasheet), we map these as channels, these stages can serve different purposes depending on the application. For instance the AFE4404 has an additional LED (LED3), this LED can be timed to be active during stage 2 (or anystage, but the datasheet describes this case and the name of the stage reflects this use). This ability is used further in upcoming parts that tie the front-end gain and the LED timings together. For these reasons we remove explicit naming the channels. Without channel names it is best that the index numbers are in order to match the stage number, reorder the channel numbers. Signed-off-by: Andrew F. Davis <afd@ti.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* iio: health/afe440x: Fix scan_index assignmentAndrew F. Davis2016-05-041-1/+1
| | | | | | | | The LED channels are not scannable and so scan_index should be negative, fix this here. Signed-off-by: Andrew F. Davis <afd@ti.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* iio: health/afe440x: Always use separate gain valuesAndrew F. Davis2016-05-041-12/+3Star
| | | | | | | | | | Locking the two gain stages to the same setting adds no value for us, so initialize them as unlocked and remove the sysfs for unlocking them. This also allows us to greatly simplify showing and setting the gain registers. Signed-off-by: Andrew F. Davis <afd@ti.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* iio: health: Add driver for the TI AFE4404 heart monitorAndrew F. Davis2016-02-061-0/+191
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>