09 Feb, 2017

3 commits

  • commit 828f84ee8f84710ea1818b3565add268bcb824c8 upstream.

    FIFO was being read every sample after the "almost full" state was
    reached. This was due to an incorrect placement of the parenthesis
    in the while condition check.

    Note - the fixes tag is not actually correct, but the fix in this patch
    would also be needed for it to function correctly so we'll go with that
    one. Backports should pick up both.

    Signed-off-by: Matt Ranostay
    Fixes: b74fccad7 ("iio: health: max30100: correct FIFO check condition")
    Signed-off-by: Jonathan Cameron
    Signed-off-by: Greg Kroah-Hartman

    Matt Ranostay
     
  • commit a5badd1e97e6caeca78ad74191f12fc923c403a8 upstream.

    The suspend/resume functions were using dev_to_iio_dev() to get
    the iio_dev. That only works on IIO dev's. Replace it with spi
    functions to get the correct iio_dev.

    Signed-off-by: Alison Schofield
    Acked-by: Andrew F. Davis
    Signed-off-by: Jonathan Cameron
    Signed-off-by: Greg Kroah-Hartman

    Alison Schofield
     
  • commit 802ecfc113df1e15af1d028427cbbe785ae9cc4a upstream.

    The suspend/resume functions were using dev_to_iio_dev() to get
    the iio_dev. That only works on IIO dev's. Replace it with i2c
    functions to get the correct iio_dev.

    Signed-off-by: Alison Schofield
    Acked-by: Andrew F. Davis
    Signed-off-by: Jonathan Cameron
    Signed-off-by: Greg Kroah-Hartman

    Alison Schofield
     

10 Jun, 2016

1 commit

  • …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.

    Greg Kroah-Hartman
     

04 May, 2016

13 commits


28 Mar, 2016

1 commit


18 Feb, 2016

3 commits

  • 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
    Fixes: 87aec56e27ef ("iio: health: Add driver for the TI AFE4404 heart monitor")
    Signed-off-by: Jonathan Cameron

    Arnd Bergmann
     
  • 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
    Fixes: eec96d1e2d31 ("iio: health: Add driver for the TI AFE4403 heart monitor")
    Signed-off-by: Jonathan Cameron

    Arnd Bergmann
     
  • 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
    Fixes: eec96d1e2d31 ("iio: health: Add driver for the TI AFE4403 heart monitor")
    Acked-by: Andrew F. Davis
    Signed-off-by: Jonathan Cameron

    Arnd Bergmann
     

07 Feb, 2016

2 commits

  • 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
    Signed-off-by: Jonathan Cameron

    Andrew F. Davis
     
  • 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
    Signed-off-by: Jonathan Cameron

    Andrew F. Davis
     

04 Jan, 2016

1 commit


12 Dec, 2015

1 commit

  • 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
    Signed-off-by: Jonathan Cameron

    Matt Ranostay