mirror of
https://github.com/torvalds/linux.git
synced 2024-11-05 11:32:04 +00:00
f54e9f2be3
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> |
||
---|---|---|
.. | ||
accel | ||
adc | ||
amplifiers | ||
common | ||
dac | ||
frequency | ||
gyro | ||
humidity | ||
imu | ||
light | ||
magnetometer | ||
orientation | ||
pressure | ||
proximity | ||
temperature | ||
trigger | ||
buffer_cb.c | ||
iio_core_trigger.h | ||
iio_core.h | ||
industrialio-buffer.c | ||
industrialio-core.c | ||
industrialio-event.c | ||
industrialio-trigger.c | ||
industrialio-triggered-buffer.c | ||
inkern.c | ||
Kconfig | ||
kfifo_buf.c | ||
Makefile |