summaryrefslogtreecommitdiffstats
path: root/drivers/iio/health
Commit message (Collapse)AuthorAgeFilesLines
* Merge tag 'iio-for-4.8a' of ↵Greg Kroah-Hartman2016-06-093-401/+254
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-next Jonathan writes: First round of IIO new device support, features and cleanups for the 4.8 cycle. New device support * ads1015 - add ads1115 support * bma220 accelerometer - new driver - triggered buffer support. * bmc150 - add bmm150 support. * bmp280 - bme280 support with addition of humidity channel. * max5487 potentiometer - new driver * MMA7660FC accelerometer. - New driver * st-pressure - support for the lps22hb * loop trigger. - This one is *nasty* but we have real applications (parrot drones) where it is useful. The trigger basically spins as hard as it can firing off a new trigger each time all triggered devices come back to say they are done. It doesn't hang a machine even when doing it on a dummy driver. A lot nicer than having this implemented within lots of device drivers anyway. Core stuff * Add support to create IIO devices via configfs (similar to we did for triggers a while back) + docs. * New channel types - IIO_ELECTRICAL_CONDUCTIVITY * Couple of MAINTAINERS patches to list the device tree bindings. * Make trigger ops structure non optional (comment fix). It hasn't been for an awful long time, but that's not what the description said. New features * ak8975 - support adapters that are limited to byte data only by allowing the emulated block read i2c function that was recently introduced. * atlas-ph - support atlas-ec (electrical conductivity sensor) * bmi160 - add available frequency and scale attributes to make the driver more user friendly (and avoid having to read the datasheet to know what will work). * dummy - move creation to configfs interface. It's not real hardware so we are not that worried about the ABI breakage ;) * mma8452 - oversampling ration support * nau7802 - expose available gains to make life easier for userspace. * st-sensors - allow use of emulation for SMBus block reads as all the st parts support it. * ti-ads1015 - list datasheet names to allow their use by inkernel consumers. * Various module alias additions to help auto probing. Drop one redundant one as well. Cleanups * ad7266, ad7476, ad7887, ad7923, ad799x - use direct mode claim function rather than open coding it during sensor read (prevents switching on buffers mid read). * ad7793, ad7791 - use direct mode claim to prevent frequency changes when buffers running. * afe440x - These are ABI breaking but the driver requires custom userspace code to do anything useful anyway and that is still being written and under control of TI. Ultimately we may have other libraries to do pulse oximetry with these devices but we aren't aware of any yet. - kernel-doc format fixes - drop ifdef fun around of_match_ptr - it's not worth the mess to save a tiny amount of space. - drop some unnecessary register initializations. - drop the weird locked gain modes as they gain us nothing (can just set all gains separately). - remove handling of offset attributes seeing as no channels actually have them (oops) - Drop the LED3 input channel as it's an alias for ALED2. - *big one* remove channel names - an experiment that turned out to not make sense - see patch for details. - use regmap fields to clean up code. - tie the tia gain stages to appropriate channels in the ABI as that is what they really effect. Same with the LED currents. - cleanout some unused defines and fix a missnamed one. * atlas-ph - reorganise to allow support of other similar parts. * bmc150 - document supported chips in kconfig help. * jsa1212 - drop an unneeded i2c functionality check for functionality the driver doesn't use. * mxs-lradc - simply touch screen registration code. - remove the touch screen unregister as all devm based now. - disable only those channels that are masked in hardware stop (others are already dealt with elsewhere) * st-sensors - unexport st_sensors_get_buffer_element as nothing outside the st-sensors core driver uses it. - fix handling of failure to start up regulators. * tpl0102 - drop an i2c functionality test for features that aren't needed. * ti-am335x - use variable name rather than type in sizeof for clarity. - use SIMPLE_DEV_PM_OPS helper macro to tidy up a bit. Tools * Add install / uninstall to makefile. Someone cares, so presumably some people will find it useful! * generic_buffer - rename to iio_generic_buffer to line up with other tools. - handle cleanup when receiving signals - Add a --device-num option and a --trigger-num option rather than relying on naming which doesn't work if you have two of the same part.
| * iio: health/afe4404: ENSEPGAIN is part of CONTROL2 registerAndrew F. Davis2016-05-041-3/+3
| | | | | | | | | | | | | | Rename this definition, no functional changes. Signed-off-by: Andrew F. Davis <afd@ti.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * iio: health/afe440x: Remove unused definitionsAndrew F. Davis2016-05-042-57/+0
| | | | | | | | | | | | | | | | | | These definitions are not currently used and if the functionality they represent is needed the values should be added back to a table for easy userspace use. Signed-off-by: Andrew F. Davis <afd@ti.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * iio: health/afe440x: Match LED currents to stagesAndrew F. Davis2016-05-042-15/+10
| | | | | | | | | | | | | | | | The current channel number for the LEDs should match the stage number that they are active during, fix this here. Signed-off-by: Andrew F. Davis <afd@ti.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * iio: health/afe440x: Make gain settings a modifier for the stagesAndrew F. Davis2016-05-042-24/+44
| | | | | | | | | | | | | | | | | | | | | | | | Currently the TIA gain settings are exported to userspace as sysfs entries that do not clearly represent their internal relation to the sampling stages. The gain settings are enabled on a per-stage basis, this can be seen in figure 24 of the current AFE4404 datasheet. These gain settings should therefore be tied to the channels that are read during these stages. Make this change here. Signed-off-by: Andrew F. Davis <afd@ti.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * iio: health/afe440x: Use regmap fieldsAndrew F. Davis2016-05-043-155/+144
| | | | | | | | | | | | | | | | 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-043-33/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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/afe4404: Remove LED3 input channelAndrew F. Davis2016-05-041-3/+0
| | | | | | | | | | | | | | | | Input channel LED3 is only an alias for stage ALED2, this virtual channel does nothing for us, remove this channel. Signed-off-by: Andrew F. Davis <afd@ti.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * iio: health/afe440x: Remove unneeded offset handlingAndrew F. Davis2016-05-041-17/+0
| | | | | | | | | | | | | | | | No channel in the afe4403 driver has IIO_CHAN_INFO_OFFSET set so remove the handlers for this. 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-043-98/+37
| | | | | | | | | | | | | | | | | | | | 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/afe440x: Remove unneeded initializersAndrew F. Davis2016-05-042-10/+1
| | | | | | | | | | | | | | | | | | The drivers set some register values during initialization that can be set at runtime, these defaults were used in testing but are not necessary, remove these. Signed-off-by: Andrew F. Davis <afd@ti.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * iio: health/afe440x: Remove of_match_ptr and ifdefsAndrew F. Davis2016-05-042-6/+2
| | | | | | | | | | | | | | | | The drivers DT tables are not built-in when OF is not enabled, this does not save us enough to justify ugly ifdefs. Clean this up. Signed-off-by: Andrew F. Davis <afd@ti.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| * iio: health/afe440x: Fix kernel-doc formatAndrew F. Davis2016-05-042-17/+17
| | | | | | | | | | | | | | | | Fix kernel-doc formatting for structs, and while we are making little fixes, clarify the module description and update the copywrite. Signed-off-by: Andrew F. Davis <afd@ti.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* | iio: health: max30100: correct FIFO check conditionMatt Ranostay2016-03-281-1/+2
|/ | | | | | | | | 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>
* iio: health/afe4404: mark suspend/resume functions __maybe_unusedArnd Bergmann2016-02-171-2/+2
| | | | | | | | | | | | | | | | 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: 87aec56e27ef ("iio: health: Add driver for the TI AFE4404 heart monitor") Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* iio: health/afe4403: mark suspend/resume functions __maybe_unusedArnd Bergmann2016-02-171-2/+2
| | | | | | | | | | | | | | | | 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: eec96d1e2d31 ("iio: health: Add driver for the TI AFE4403 heart monitor") Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* iio: health/afe4403: select REGMAP_SPIArnd Bergmann2016-02-171-0/+1
| | | | | | | | | | | | | | | | | 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: eec96d1e2d31 ("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>
* iio: health: Add driver for the TI AFE4403 heart monitorAndrew F. Davis2016-02-063-0/+721
| | | | | | | | | | | | 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>
* iio: health: Add driver for the TI AFE4404 heart monitorAndrew F. Davis2016-02-064-1/+889
| | | | | | | | | | | 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>
* iio: health: max30100: add config for LED currentMatt Ranostay2016-01-031-6/+75
| | | | | | | | | | | | 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>
* iio: light: add MAX30100 oximeter driver supportMatt Ranostay2015-12-123-0/+481
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>
OpenPOWER on IntegriCloud