Skip to content
Commit 5e9972cd authored by Sanchayan Maity's avatar Sanchayan Maity Committed by Jonathan Cameron
Browse files

iio: adc: vf610: Determine sampling frequencies by using minimum sample time



The driver currently does not take into account the minimum sample time
as per the Figure 6-8 Chapter 9.1.1 12-bit ADC electrical characteristics.
We set a static amount of cycles instead of considering the sample time
as a given value, which depends on hardware characteristics.

Determine sampling frequencies by first reading the device tree property
node and then calculating the required Long Sample Time Adder (LSTAdder)
value, based on the ADC clock frequency and sample time value obtained
from the device tree. This LSTAdder value is then used for calculating
the sampling frequencies possible.

In case the sample time property is not specified through the device
tree, a safe default value of 1000ns is assumed.

Signed-off-by: default avatarSanchayan Maity <maitysanchayan@gmail.com>
Acked-by: default avatarStefan Agner <stefan@agner.ch>
Acked-by: default avatarFugang Duan <B38611@freescale.com>
Signed-off-by: default avatarJonathan Cameron <jic23@kernel.org>
parent f686a36b
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment