linux/drivers/iio
Stefan Agner f54e9f2be3 iio: adc: vf610: use ADC clock within specification
Depending on conversion mode used, the ADC clock (ADCK) needs
to be below a maximum frequency. According to Vybrid's data
sheet this is 20MHz for the low power conversion mode.

The ADC clock is depending on input clock, which is the bus
clock by default. Vybrid SoC are typically clocked at at 400MHz
or 500MHz, which leads to 66MHz or 83MHz bus clock respectively.
Hence, a divider of 8 is required to stay below the specified
maximum clock of 20MHz.

Due to the different bus clock speeds, the resulting sampling
frequency is not static. Hence use the ADC clock and calculate
the actual available sampling frequency dynamically.

This fixes bogous values observed on some 500MHz clocked Vybrid
SoC. The resulting value usually showed Bit 9 being stuck at 1,
or 0, which lead to a value of +/-512.

Signed-off-by: Stefan Agner <stefan@agner.ch>
Acked-by: Fugang Duan <B38611@freescale.com>
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2015-03-28 12:00:02 +00:00
..
accel iio: bmc150: change sampling frequency 2015-03-14 18:35:59 +00:00
adc iio: adc: vf610: use ADC clock within specification 2015-03-28 12:00:02 +00:00
amplifiers iio: amplifiers: ad8366: Use right order for type specification 2015-01-01 12:16:57 +00:00
common iio: common: ssp_sensors: Protect PM-only functions to kill warning 2015-02-22 09:46:55 +00:00
dac iio: ad5686: fix optional reference voltage declaration 2015-02-04 16:54:38 +00:00
frequency iio: frequency: ad9523: Increase sleep time in ad9523_store_eeprom 2015-01-01 12:18:26 +00:00
gyro iio: fix drivers that check buffer->scan_mask 2015-03-07 19:17:07 +00:00
humidity IIO: si7020: Allocate correct amount of memory in devm_iio_device_alloc 2015-02-14 11:35:12 +00:00
imu iio:inv-mpu6050: Fix inconsistency for the scale channel 2015-03-14 18:36:21 +00:00
light Second round of IIO fixes for the 4.0 cycle (or round one part two really!) 2015-02-28 07:19:27 -08:00
magnetometer iio: ak8975: fix AK09911 dependencies 2015-02-28 11:26:54 +00:00
orientation iio: hid-sensor-incl-3d: Introduce PM 2015-01-25 22:55:56 +00:00
pressure iio: hid-sensor-press: Introduce PM 2015-01-25 22:56:00 +00:00
proximity iio: fix drivers that check buffer->scan_mask 2015-03-07 19:17:07 +00:00
temperature iio: Add Melexis mlx90614 contact-less infrared temperature sensor driver 2014-05-03 11:38:13 +01:00
trigger iio: trigger: Add a blank line after declarations 2014-12-26 12:15:36 +00:00
buffer_cb.c iio get rid of unneccessary error_ret 2014-02-18 08:46:36 +00:00
iio_core_trigger.h iio: fix semicolon in io_core_trigger.h 2013-08-03 18:40:32 +01:00
iio_core.h iio: Move buffer registration to the core 2014-12-12 12:28:31 +00:00
industrialio-buffer.c iio: Add new operating mode for non triggered sw buffers 2015-01-25 22:53:38 +00:00
industrialio-core.c iio: core: Fix double free. 2015-03-14 18:54:14 +00:00
industrialio-event.c iio: core: Fix double free. 2015-03-14 18:54:14 +00:00
industrialio-trigger.c iio: Remove timestamp argument from iio_trigger_poll() and iio_trigger_poll_chained() 2014-06-14 16:25:59 +01:00
industrialio-triggered-buffer.c iio: kfifo: Remove unused argument in iio_kfifo_allocate 2014-12-26 11:20:38 +00:00
inkern.c First round of IIO new drivers, cleanups and functionality for the 3.20 cycle take 2 2015-01-21 10:13:37 +08:00
Kconfig Merge branch 'kconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild 2015-02-19 10:36:45 -08:00
kfifo_buf.c iio: kfifo: Add resource management devm_iio_kfifo_allocate/free 2014-12-26 11:39:57 +00:00
Makefile iio: Add AS3935 lightning sensor support 2014-03-16 18:00:32 +00:00